-
folder-name: nix-pkgsStatic-talloc
-
nix build nixpkgs/807c549feabce7eddbf259dbdcec9e0600a0660d#pkgsStatic.talloc
-
alpine can build a static talloc
- they just ar all the .o files into one .a library…
- https://pkgs.alpinelinux.org/package/v3.14/main/x86/talloc-static
- https://git.alpinelinux.org/aports/tree/main/talloc?h=3.14-stable
-
fails at “Simple C programm check” see: ./original-config.log
- removing the “-Wl-Bdynamic” would solve that
- pathing ./third_party/waf/waflib/Configure.py makes that work
- adding
kw["env"].update({"SHLIB_MARKER": ""})"
to the beginning of the run_build func
- adding
- TODO: find better way to disable the shlib_maker…
-
next fail: Checking for header Python.h : Could not build a Python embedded interpreter
- undefined reference to Py_Initialize … which they call from thery test code
-
the normal talloc package in nix also makes the .a file…
- https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/libraries/talloc/default.nix#L70
- so the correct way to fix this is just to build a non-static version and use the .a file
- but the problem does not come from anything pkgsStatic changes … rather from the fact that in pkgsStatic all dependencies/compiler/linker are static too
- is the compiler/linker really a static binary in pkgsStatic???
-
—disable-python makes it build … yay finally!!!!
finding better patch
in wsbuild we recurse to lib/replace … this recurses to buildtools/wafsamba configure in ./buildtools/wafsamba/wsbuild calles conf.CHECK_CODE() to check for this c programm this calles conf.check() files containing ‘def check(’
./buildtools/wafsamba/samba_conftests.py:def check(self, *k, **kw):
./buildtools/wafsamba/samba_waf18.py:def check(self, *k, **kw):
./third_party/waf/waflib/Scripting.py: def check(self):
./third_party/waf/waflib/Tools/c_config.py:def check(self, *k, **kw):
in ./third_party/waf/waflib/Tools/c.py - the SHLIB_MARKER is just included into the run string for any c programm to be compiled… - which on alpine is not a problem aparently (there -Bstatic and -Bdynamic are on the cmdline and it works) … but on nix it is