The Samba-Bugzilla – Bug 7000
Talloc build failure on Mac OS X (darwin)
Last modified: 2015-10-28 12:39:56 UTC
Talloc 2.0.1 failed to build on Mac OS X 10.6.2. I'll attach a patch that seems to solve the compile problem, and all tests pass.
The tail of the failed build looked like:
gcc -dynamiclib -Wl,-search_paths_first -undefined error -o libtalloc.dylib.2.0.1 ./talloc.o ./libreplace/replace.o ./libreplace/snprintf.o ./libreplace/getpass.o ./libreplace/strptime.o libtalloc.dylib.2
i686-apple-darwin10-gcc-4.2.1: libtalloc.dylib.2: No such file or directory
Finding where that command came from in the Makefile, it appears that SONAMEFLAG is being set to "#" on Darwin, and it ends up just not getting included in the command at all.
Looking at how Samba is built, it seemed that SONAMEFLAG on Mac OS X probably ought to be "-install_name ", and making that change solved the problem.
Created attachment 5103 [details]
Patch that fixes the build problem on Mac OS X