#44729 closed defect (invalid)
ImageMagick: Undefined symbols _crc32 _zlibVersion
Reported by: | jmhanly@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | Cc: | ||
Port: | ImageMagick |
Description
I have been trig to port some packages - geant4 and clhep. They both fail and it seems to occur at ImageMagick part. I tried to update ImageMagick and it failed as well. Before this I update MacPorts and I'm running Version: 2.3.1.
Attachments (4)
Change History (27)
Changed 10 years ago by jmhanly@…
comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jmhanly@… removed |
---|---|
Keywords: | geant4 clhep ImageMagik removed |
Owner: | changed from macports-tickets@… to ryandesign@… |
Port: | ImageMagik added |
Summary: | port install clhep fails at ImageMagick → ImageMagick: Undefined symbols _crc32 _zlibVersion |
This wasn't a clean build. Please run "sudo port clean ImageMagick" and then try again.
comment:4 Changed 10 years ago by mf2k (Frank Schima)
Port: | ImageMagick added; ImageMagik removed |
---|
Changed 10 years ago by jmhanly@…
Attachment: | main.2.log added |
---|
comment:7 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Thanks, I'll compare that log with mine and hopefully spot what's different. Meanwhile, I'll ask about a common cause of problems: do you have anything installed in /usr/local? If so, try removing it, then cleaning ImageMagick and trying again.
Changed 10 years ago by jmhanly@…
Attachment: | usr.local.out added |
---|
comment:10 Changed 10 years ago by jmhanly@…
i don't know how I got so much in my /usr/local directory but i am creating a tar to remove it all.
comment:11 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Knowing what's in /usr/local/include and /usr/local/lib specifically might help. I suspect you may have a copy of zlib or libpng installed there that is interfering. Such interference is why we don't support having software installed in /usr/local while using MacPorts. See wiki:FAQ#usrlocal.
comment:12 Changed 10 years ago by jmhanly@…
in usr/local/lib i have maybe a 100 or so files starting with lib*
and in /usr/local/include i have 2 directories: aquaterm and CLHEP
comment:13 Changed 10 years ago by jmhanly@…
i have tarred the whole directory but now I am afraid to remove all these files...
comment:14 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
You can just rename /usr/local temporarily to see if it helps, e.g.
sudo mv /usr/local{,-off}
And later to bring it back:
sudo mv /usr/local{-off,}
comment:16 Changed 10 years ago by jmhanly@…
i just did as you suggested. then I ran sudo port clean ImageMagick
and then sudo port install ImageMagick
It still crashed...
sorry
Changed 10 years ago by jmhanly@…
Attachment: | main.3.log added |
---|
comment:18 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Looking more closely at your log, I see this line:
:info:build ld: warning: ignoring file /opt/local/lib/libz.dylib, missing required architecture x86_64 in file /opt/local/lib/libz.dylib (2 slices)
MacPorts ensures that the architectures of dependencies (in this case zlib) match the architectures of the port you're about to install (ImageMagick), according to MacPorts' installation registry. Despite that check, it appears that your zlib doesn't actually contain x86_64 code. To verify these things, you can run:
port -v installed zlib lipo -info /opt/local/lib/libz.dylib
The first command shows the architectures MacPorts recorded that it installed the port for, and the latter shows the architecture actually in the file on disk now. If your system is in the state I think it's in, then the first command will show that MacPorts thinks zlib is installed for x86_64, but the second command will show a different architecture (or architectures).
One way this can happen is if you ran a third-party installer that was itself built with MacPorts (configured for different architectures) which overwrote your MacPorts-installed files. Could that be? If so, let us know what third-party installer it was.
To fix this problem for zlib, you should deactivate and reactivate zlib:
sudo port -f deactivate zlib sudo port activate zlib
This will remove all the zlib files, then re-extract them from the archive MacPorts created at original install time.
And then clean ImageMagick and try again.
However, if some third-party installer replaced zlib, who knows what else it replaced. You could ensure that all files of ports you have installed are the ones they should be by deactivating all active ports, then re-activating them again. I can give you instructions on that later if necessary.
comment:19 Changed 10 years ago by jmhanly@…
the two commands you requested:
port -v installed zlib The following ports are currently installed: zlib @1.2.8_0 (active) platform='darwin 13' archs='x86_64'
lipo -info /opt/local/lib/libz.dylib Architectures in the fat file: /opt/local/lib/libz.dylib are: i386 ppc
comment:20 Changed 10 years ago by jmhanly@…
now i get
port -v installed zlib
The following ports are currently installed:
zlib @1.2.8_0 (active) platform='darwin 13' archs='x86_64'
lipo -info /opt/local/lib/libz.dylib Non-fat file: /opt/local/lib/libz.dylib is architecture: x86_64
comment:21 Changed 10 years ago by jmhanly@…
It Worked!!!!!!
port install ImageMagick
ran to completion and said
No broken files found..
I really appreciate your help. This was obviously a self-inflected wound but thank you very much.
Great job...
comment:22 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Glad that worked. But bear in mind what I said: we don't know how that 32-bit zlib got on your system; whatever third-party installer put it there could have also replaced other libraries with 32-bit versions, which may cause similar errors when you try to install other ports in the future. Additionally, the unidentified installer may have installed files belonging to ports that you don't have installed; this would be a problem if you ever in the future try to install those ports, as you will then get an error message that the files already exist.
One solution would be to uninstall MacPorts and all ports, then remove /opt/local entirely, then reinstall MacPorts and the ports you want. But this can be inconvenient and time-consuming.
comment:23 Changed 10 years ago by jmhanly@…
Thanks again. I understand your comments and will keep those in mind.
I was instructed to view attached file.