#15891 closed defect (wontfix)
Undefined symbols: _xmlTextReaderSchemaValidate _xmlTextReaderSchemaValidate
Reported by: | martin@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.6.0 |
Keywords: | php5 libxml2 | Cc: | 0xced (Cédric Luthi) |
Port: |
Description
Running: sudo port install php5 +fastcgi +mysql5 +darwin_8
Fresh install of MacPorts 1.6.0 with gcc43, lighttpd and gsed. On OS X 10.4.11
Trying to install php5 gets me the following error:
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _xmlTextReaderSchemaValidate _xmlTextReaderSchemaValidate collect2: ld returned 1 exit status make: * [sapi/cgi/php-cgi] Error 1
I can't find any solution anywhere.
What do I do?
Change History (13)
comment:1 follow-up: 2 Changed 16 years ago by pmagrath@…
Keywords: | php5 libxml2 added |
---|---|
Milestone: | → Port Bugs |
Priority: | Normal → Low |
Resolution: | → wontfix |
Status: | new → closed |
comment:2 Changed 16 years ago by raimue (Rainer Müller)
Priority: | Low → Normal |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Replying to pmagrath@macports.org:
1) Run locate libxml2.dylib. Delete any obviously unnecessary versions of libxml2. 2) Download a new version of libxml2 from here:http://xmlsoft.org/downloads.html. Do a "./configure && make && sudo make install". This will replace the default version of libxml2 on your system with one that (should) match that you have installed by macports.
This is not a good solution. I assume this will install libxml2 to /usr/local
. First make sure there is no previous version of libxml2 installed there. We should fix this so no additional action is needed outside MacPorts.
comment:3 Changed 16 years ago by raimue (Rainer Müller)
Cc: | cedric.luthi@… added |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Status: | reopened → new |
Assigning to maintainer of php5, CC'ing maintainer of libxml2.
comment:4 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
@raimue: agreed.
@martin: please delete any libxml in /usr/local/lib and /sw/lib and try again. If it still doesn't work please attach your config.log.
comment:5 Changed 16 years ago by martin@…
The problem is the system installed library in /usr/lib/. I changed the symbolic link there to point to the library created by MacPorts and it now works fine.
Thank you
comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
@martin: If you have to muck with your Apple-provided software in order to make a port work, then something is wrong. Since I do not see the problem on my system, which is also Mac OS X 10.4.11 Intel, I need more information to resolve the problem. Please undo your /usr/lib symlink change, "sudo port uninstall php5
", "sudo port configure php5 +fastcgi +mysql5
" and attach the config.log which is now in the source directory, which you should be able to open in the Finder by typing "open `port dir php5`/work/php-5.2.6
"
comment:7 Changed 16 years ago by pmagrath@…
Ticket for issue in PHP issue tracker: http://bugs.php.net/bug.php?id=44294
comment:8 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Ok, in that ticket, a jani@… says to uninstall libxml2 and reinstall it. So try:
sudo port -f uninstall libxml2 sudo port install libxml2
Then clean php5 and try installing it again:
sudo port clean --work php5 sudo port install php5 +fastcgi +mysql5
Does that help?
comment:9 follow-up: 10 Changed 16 years ago by martin@…
During installation the wrong libraries were used. I have MAMP installed with older versions of the same libraries, which might have been the problem.
When I installed MacPorts (2 days ago) I used the package installer, but it did not add anything to my .profile for the environment variables. I followed the instructions from the source install section (http://www.macports.org/install.php) and added the path and display environment variables manually.
Both MAMP and ImageMagick needed the dylib environment variable added to.
I added /opt/local/lib/ to the dylib and now php5 installs fine.
So, is this an issue with the MacPorts installation when other environments are present or is the documentation not clear enough (for me at least)?
comment:10 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to martin@fairfaxconsultancy.com:
During installation the wrong libraries were used. I have MAMP installed with older versions of the same libraries, which might have been the problem.
Is there something from MAMP that you need that's not provided by MacPorts? If so, please let us know so we can add it to MacPorts and you can use MacPorts exclusively.
When I installed MacPorts (2 days ago) I used the package installer, but it did not add anything to my .profile for the environment variables. I followed the instructions from the source install section (http://www.macports.org/install.php) and added the path and display environment variables manually.
That is a known bug in the 1.6.0 binary packages. It will be fixed in the next release of MacPorts.
Both MAMP and ImageMagick needed the dylib environment variable added to.
What environment variable have you set to what value? And are you talking about the ImageMagick port in MacPorts or a different installation of ImageMagick? The ImageMagick port does not need any environment variable set to any value, to the best of my knowledge.
I added /opt/local/lib/ to the dylib and now php5 installs fine.
Added /opt/local/lib to what?
So, is this an issue with the MacPorts installation when other environments are present or is the documentation not clear enough (for me at least)?
Need more information.
comment:11 Changed 16 years ago by martin@…
Sorry to have made it more confusing.
I did not have MacPorts installed until 2 days ago.
I am using MAMP, simply because it is easy. ImageMagick was a standalone installation (so, not the MacPorts version). ImageMagick required the DYLD_LIBRARY_PATH to be extended.
I also added MAMP's lib dir to the DYLD_LIBRARY_PATH.
After installing MacPorts I ran into library conflicts with MAMP and initially prepended /opt/local/lib to DYLD_LIBRARY_PATH
That seemed to work for installation but not for runtime.
I am now running without the DYLD_LIBRARY_PATH changed for MAMP and MacPorts and it all works.
I guess the moral of the story is to keep the .profile as clean as possible.
And I will probably move from MAMP to MacPorts too.
But it all works at the moment so I am reluctant to switch them. Then again, the reason to start using MacPorts is the ability to use variants and to keep up to date with versions.
comment:12 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Ok, I'm going to say the error was caused by setting DYLD_LIBRARY_PATH, which is not recommended and which I can't support for use with MacPorts. MacPorts needs to link with its own ports, and by setting DYLD_LIBRARY_PATH you are telling it to link with other things, which is not supported.
This is caused by multiple conflicting versions of Libxml2. There was a php5 bug tracking this but the devs closed it on the grounds that it isn't caused by php5. It is caused by multiple installs of libxml2 which is a php5 dependency.
1) Run locate libxml2.dylib. Delete any obviously unnecessary versions of libxml2. 2) Download a new version of libxml2 from here:http://xmlsoft.org/downloads.html. Do a "./configure && make && sudo make install". This will replace the default version of libxml2 on your system with one that (should) match that you have installed by macports.
Replying to martin@fairfaxconsultancy.com: