seletz / z3c.recipe.staticlxml

A buildout recipe for building a statically linked lxml library
Other
1 stars 2 forks source link

error: no such file or directory: '/db46' on recent lxml builds on OS X #9

Open jamadden opened 11 years ago

jamadden commented 11 years ago

Using lxml 3.2.3 or .4 (and possibly older), the recipe fails on OS X with this error:

clang: error: no such file or directory: '/db46'
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1

This is because of the code in get_ldshared which replaces "-L/opt/local/lib" with the empty string. Since lxml wants to include the db46 library now, this results in an extra match and an invalid command line, referring to /db46:

lxml: LDSHARED=/usr/bin/clang -bundle -undefined dynamic_lookup   -isysroot / -L/opt/local/lib -Wl,-headerpad_max_install_names -L/opt/local/lib/db46
lxml: OS X detected.
lxml: *** Removing '-L/opt/local/lib' from 'LDSHARED'
lxml: Static build -- adding '-Wl,-search_paths_first'
lxml: LDSHARED'=/usr/bin/clang -bundle -undefined dynamic_lookup   -isysroot /  -Wl,-headerpad_max_install_names /db46   -Wl,-search_paths_first

One workaround is to place a minimum object file at /db46 to make the linker happy:

$ cat main.c
static void f(){}
$ cc -c main.c
$ sudo mv main.o /db46
icemac commented 9 years ago

Nearly the same here with Yosemite (10.10): /db48 is not found.

keul commented 9 years ago

I use macport for OSX dependencies. On Yosemite (10.10) I had the same issue and I soldev installing db46 and db48