• folder-name: nix-pkgsStatic-talloc

  • nix build nixpkgs/807c549feabce7eddbf259dbdcec9e0600a0660d#pkgsStatic.talloc

  • alpine can build a static talloc

  • 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
    • 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…

  • —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

learings