[lxml-dev] installing lxml on MacOS

I am trying to go down the learning curve on lxml. I tried to follow the install instructions to install lxml on my MacOS As root, I did: STATIC_DEPS=true easy_install lxml The install chugged away, but eventually failed: ... Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Traceback (most recent call last): File "/usr/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c7', 'console_scripts', 'easy_install')() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1670, in main with_ei_usage(lambda: File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1674, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 27, in run_setup lambda: execfile( File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 63, in run return func() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 119, in <module> File "/tmp/easy_install-XVh5wp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 208, in build_libxml2xslt File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 158, in call_subprocess Exception: Command "make" returned code 2 Any thing obvious jump out at anyone that I might have missed? thanks in advance sgg Steve Graham sgg@ci.uchicago.edu

Stephen Graham, 06.04.2010 21:41:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory)
I'm so happy no-one forces me to use MacOS-X. My guess is that you are missing some compiler flag. The options are set in buildlibxml.py. Maybe others can give better advice here, but I'd suggest you play with them a little to see if they can be made to work for you. It's also possible that some library (like zlib?) conflicts with your Python installation. I assume you use some package management system? Stefan

Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Traceback (most recent call last): File "/usr/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c7', 'console_scripts', 'easy_install')() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1670, in main with_ei_usage(lambda: File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1674, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 27, in run_setup lambda: execfile( File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 63, in run return func() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 119, in <module> File "/tmp/easy_install-XVh5wp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 208, in build_libxml2xslt File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 158, in call_subprocess Exception: Command "make" returned code 2
Any thing obvious jump out at anyone that I might have missed?
thanks in advance sgg Steve Graham
Hi Steve I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this? Thank you for any help. Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...

Op Do, 2010-04-29 om 22:18 +0200 skryf F Wolff:
Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Traceback (most recent call last): File "/usr/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c7', 'console_scripts', 'easy_install')() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1670, in main with_ei_usage(lambda: File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1674, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 27, in run_setup lambda: execfile( File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 63, in run return func() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 119, in <module> File "/tmp/easy_install-XVh5wp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 208, in build_libxml2xslt File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 158, in call_subprocess Exception: Command "make" returned code 2
Any thing obvious jump out at anyone that I might have missed?
thanks in advance sgg Steve Graham
Hi Steve
I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this?
We finally managed to get a build going by forcing an older version of libxml2 (2.7.3). Why would the build succeed with 2.7.3 but not with 2.7.7? This is with the system python (2.5) if it matters. Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...

F Wolff, 03.05.2010 12:31:
Op Do, 2010-04-29 om 22:18 +0200 skryf F Wolff:
Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory)
I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this?
We finally managed to get a build going by forcing an older version of libxml2 (2.7.3). Why would the build succeed with 2.7.3 but not with 2.7.7? This is with the system python (2.5) if it matters.
Did you make sure that you used the same compiler/linker flags in both cases? The error above suggests that the compiler was not correctly configured, maybe it tried to build for both i386 and ppc (likely because CPython was built for both), but only an i386 build of libxml2 was available for linking. Stefan

Op Ma, 2010-05-03 om 13:13 +0200 skryf Stefan Behnel:
F Wolff, 03.05.2010 12:31:
Op Do, 2010-04-29 om 22:18 +0200 skryf F Wolff:
Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory)
I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this?
We finally managed to get a build going by forcing an older version of libxml2 (2.7.3). Why would the build succeed with 2.7.3 but not with 2.7.7? This is with the system python (2.5) if it matters.
Did you make sure that you used the same compiler/linker flags in both cases? The error above suggests that the compiler was not correctly configured, maybe it tried to build for both i386 and ppc (likely because CPython was built for both), but only an i386 build of libxml2 was available for linking.
Stefan
I used the same command without customising any of the compiler or linker flags. The same version of lxml (latest, 2.2.6) with the differing versions of libxml2 produced the different results. In both cases it was a static build as recommended by the installation documentation. I don't have access to the original machine, but just duplicated the issue with clean lxml from SVN trunk. The commands were just python setup.py clean python setup.py build --static-deps with no files modified. Does this help? Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...

On May 3, 2010, at 15:56, F Wolff wrote:
I don't have access to the original machine, but just duplicated the issue with clean lxml from SVN trunk. The commands were just python setup.py clean python setup.py build --static-deps with no files modified.
Does this help?
The problem appears to be a botched 10.4 SDK. The library under /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libz.dylib does not have a gzdirect although the header file says otherwise. The one in the 10.5 sdk and under /usr/lib have the function. As a test you could try moving the dylib from 10.5 to 10.4 and see if it works. I do not know how to fix that in an easy way that does not break universal builds though. Kind regards, Michael

On May 3, 2010, at 20:34, Michael Guntsche wrote:
The problem appears to be a botched 10.4 SDK. The library under /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libz.dylib does not have a gzdirect although the header file says otherwise. The one in the 10.5 sdk and under /usr/lib have the function. As a test you could try moving the dylib from 10.5 to 10.4 and see if it works. I do not know how to fix that in an easy way that does not break universal builds though.
Answering my own mail. Removing isysroot from the CFLAGS and LDFLAGS fixes the problem. I think this also means that the resulting lib most likely won't work under 10.4. I wonder if this is needed though. /Mike

Op Ma, 2010-05-03 om 20:52 +0200 skryf Michael Guntsche:
On May 3, 2010, at 20:34, Michael Guntsche wrote:
The problem appears to be a botched 10.4 SDK. The library under /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libz.dylib does not have a gzdirect although the header file says otherwise. The one in the 10.5 sdk and under /usr/lib have the function. As a test you could try moving the dylib from 10.5 to 10.4 and see if it works. I do not know how to fix that in an easy way that does not break universal builds though.
Answering my own mail. Removing isysroot from the CFLAGS and LDFLAGS fixes the problem. I think this also means that the resulting lib most likely won't work under 10.4. I wonder if this is needed though.
When I removed the isysroot, it seemed to pass the problematic part of the build (although I then hit issues with cython which I guess is unrelated). Changing 4->5 in the issysroot parameter didn't seem to work well, although the error is entirely different (error building memmove.c which seems to be part of libiconv). Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...

When I removed the isysroot, it seemed to pass the problematic part of the build (although I then hit issues with cython which I guess is unrelated). This should not affect cython in any way as far as I see it.
Changing 4->5 in the issysroot parameter didn't seem to work well, although the error is entirely different (error building memmove.c which seems to be part of libiconv). I would leave it as it is, although it won't work on 10.4 anyway given
On 05 May 10 10:44, F Wolff wrote: the fact that libz does not seem to provide the function. Do you need 10.4 support? /Mike

Op Wo, 2010-05-05 om 10:52 +0200 skryf Michael Guntsche:
When I removed the isysroot, it seemed to pass the problematic part of the build (although I then hit issues with cython which I guess is unrelated). This should not affect cython in any way as far as I see it.
Changing 4->5 in the issysroot parameter didn't seem to work well, although the error is entirely different (error building memmove.c which seems to be part of libiconv). I would leave it as it is, although it won't work on 10.4 anyway given
On 05 May 10 10:44, F Wolff wrote: the fact that libz does not seem to provide the function. Do you need 10.4 support?
I don't need 10.4 support. In fact, I don't even need universal binaries (at the moment, at least). I don't know what would be best to do in lxml trunk for future releases. Should we maybe special case for OSX < 10.5 and force the use an older libxml2? Thanks for your help, Mike. Friedel -- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...

On 05 May 10 11:55, F Wolff wrote:
I don't know what would be best to do in lxml trunk for future releases. Should we maybe special case for OSX < 10.5 and force the use an older libxml2? I would do the same as with iconv, build zlib as well, then we get around the we have an old lib problem.
/Mike

Michael Guntsche, 05.05.2010 12:26:
On 05 May 10 11:55, F Wolff wrote:
I don't know what would be best to do in lxml trunk for future releases. Should we maybe special case for OSX< 10.5 and force the use an older libxml2? I would do the same as with iconv, build zlib as well, then we get around the we have an old lib problem.
This is getting way too complicated by now. Maybe lxml should just switch to requiring buildout for the libraries, instead of trying to build them by itself in its setup.py script. Stefan

and fwiw, I did not succeed in getting lxml built on my Mac, and as with F Wolff, I use the system Python. I will give 2.7.3 a shot tho. sgg On May 3, 2010, at 6:31 AM, F Wolff wrote:
Op Do, 2010-04-29 om 22:18 +0200 skryf F Wolff:
Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham:
I am trying to go down the learning curve on lxml.
I tried to follow the install instructions to install lxml on my MacOS
As root, I did: STATIC_DEPS=true easy_install lxml
The install chugged away, but eventually failed:
...
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/tmp//ccsmIZu8.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Traceback (most recent call last): File "/usr/bin/easy_install", line 8, in <module> load_entry_point('setuptools==0.6c7', 'console_scripts', 'easy_install')() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1670, in main with_ei_usage(lambda: File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1659, in with_ei_usage return f() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 1674, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/ python2.5/distutils/core.py", line 151, in setup dist.run_commands() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/ python2.5/distutils/dist.py", line 974, in run_commands self.run_command(cmd) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ lib/ python2.5/distutils/dist.py", line 994, in run_command cmd_obj.run() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 211, in run self.easy_install(spec, not self.no_deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 471, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs return self.build_and_install(setup_script, setup_base) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install self.run_setup(setup_script, setup_base, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup run_setup(setup_script, args) File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 27, in run_setup lambda: execfile( File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 63, in run return func() File "/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/setuptools/sandbox.py", line 29, in <lambda> {'__file__':setup_script, '__name__':'__main__'} File "setup.py", line 119, in <module> File "/tmp/easy_install-XVh5wp/lxml-2.2.6/setupinfo.py", line 50, in ext_modules File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 208, in build_libxml2xslt File "/tmp/easy_install-XVh5wp/lxml-2.2.6/buildlibxml.py", line 158, in call_subprocess Exception: Command "make" returned code 2
Any thing obvious jump out at anyone that I might have missed?
thanks in advance sgg Steve Graham
Hi Steve
I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this?
We finally managed to get a build going by forcing an older version of libxml2 (2.7.3). Why would the build succeed with 2.7.3 but not with 2.7.7? This is with the system python (2.5) if it matters.
Friedel
-- Recently on my blog: http://translate.org.za/blogs/friedel/en/content/how-should-we-do-high-contr...
_______________________________________________ lxml-dev mailing list lxml-dev@codespeak.net http://codespeak.net/mailman/listinfo/lxml-dev
Steve Graham sgg@ci.uchicago.edu

F Wolff <friedel <at> translate.org.za> writes:
Op Do, 2010-04-29 om 22:18 +0200 skryf F Wolff:
Op Di, 2010-04-06 om 15:41 -0400 skryf Stephen Graham: Hi Steve
I just saw this same issue on someone else's computer (OSX 10.5). Did you ever manage solve this?
We finally managed to get a build going by forcing an older version of libxml2 (2.7.3). Why would the build succeed with 2.7.3 but not with 2.7.7? This is with the system python (2.5) if it matters.
Friedel
So I'm trying to figure this out as well, running on MacOS 10.5.8 with Python 2.4 and trying to install lxml 2.2.6. I tried forcing libxml2 to 2.7.3, but I'm still getting the undefined symbols error: Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/jV /jVkN8QoVGXSIHfVVe53L-k+++TQ/-Tmp-//ccJ1jdEf.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 I'm not sure how to remove isysroot from CFLAGS and LDFLAGS as was mentioned in another post; I'm trying to use a buildout to install currently. Any suggestions anyone could make would be most appreciated. I've been banging my head against this issue for two days straight. Thanks! Lacy K. Fuller

Lacy K. Fuller, 18.05.2010 01:25:
So I'm trying to figure this out as well, running on MacOS 10.5.8 with Python 2.4 and trying to install lxml 2.2.6. I tried forcing libxml2 to 2.7.3
That shouldn't matter.
but I'm still getting the undefined symbols error:
Undefined symbols for architecture i386: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture i386 collect2: ld returned 1 exit status Undefined symbols for architecture ppc: "_gzdirect", referenced from: ___xmlParserInputBufferCreateFilename in libxml2.a(xmlIO.o) ld: symbol(s) not found for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/jV /jVkN8QoVGXSIHfVVe53L-k+++TQ/-Tmp-//ccJ1jdEf.out (No such file or directory) make[2]: *** [xmllint] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
I'm not sure how to remove isysroot from CFLAGS and LDFLAGS as was mentioned in another post
See buildlibxml.py.
I'm trying to use a buildout to install currently.
So the above is from a buildout? Which are you using? Stefan

On 17 May 10 23:25, Lacy K. Fuller wrote: <snip>
I'm not sure how to remove isysroot from CFLAGS and LDFLAGS as was mentioned in another post; I'm trying to use a buildout to install currently.
Any suggestions anyone could make would be most appreciated. I've been banging my head against this issue for two days straight.
Take a look at buildlibxml.py line 282 and 283. Just remove the isysroot there. Hope that helps, Mike
participants (5)
-
F Wolff
-
Lacy K. Fuller
-
Michael Guntsche
-
Stefan Behnel
-
Stephen Graham