Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#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)

main.log (9.5 KB) - added by jmhanly@… 10 years ago.
I was instructed to view attached file.
main.2.log (783.4 KB) - added by jmhanly@… 10 years ago.
usr.local.out (1.5 KB) - added by jmhanly@… 10 years ago.
main.3.log (781.7 KB) - added by jmhanly@… 10 years ago.

Download all attachments as: .zip

Change History (27)

Changed 10 years ago by jmhanly@…

Attachment: main.log added

I was instructed to view attached file.

comment:1 Changed 10 years ago by jmhanly@…

I am running Mac OS 10.9.4

comment:2 Changed 10 years ago by jmhanly@…

Cc: jmhanly@… added

Cc Me!

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 ImageMagickImageMagick: 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:5 Changed 10 years ago by jmhanly@…

i attached the new log file.

comment:6 Changed 10 years ago by jmhanly@…

i did the clean but it failed again...

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:8 Changed 10 years ago by jmhanly@…

yes I just attached output from ls -lrt /usr/local

comment:9 Changed 10 years ago by jmhanly@…

thanks for helping with this..

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:15 Changed 10 years ago by jmhanly@…

should 2nd line be

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:17 Changed 10 years ago by jmhanly@…

really sorry to be such a pest!!!

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 
Last edited 10 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Version 0, edited 10 years ago by jmhanly@… (next)

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: newclosed

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.

Note: See TracTickets for help on using tickets.