Opened 12 years ago

Closed 11 years ago

#33421 closed defect (worksforme)

libglade2 looks for libexpat in the wrong location

Reported by: cwacek@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: libglade2

Description

When attempting to install libglade2 on OS X Lion (macports 2.0.4), libtool fails to find libexpat because it's searching in /usr/local/lib instead of /opt/local/lib.

:info:build /bin/sh ./libtool --tag=CC   --mode=link /usr/bin/llvm-gcc-4.2  -pipe -O2 -arch x86_64 -Wall -std=c9x  -L/opt/local/lib -arch x86_64 -o test-libglade test-libglade.o glade/libglade-2.0.la -L/opt/local/lib -lxml2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangocairo-1.0 -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lgio-2.0 -lXfixes -lcairo -lX11 -lpango-1.0 -lm -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl   
:info:build libtool: link: cannot find the library `/usr/local/lib/libexpat.la' or unhandled argument `/usr/local/lib/libexpat.la'

Attachments (2)

main.log (118.4 KB) - added by cwacek@… 12 years ago.
Failed install log
main.2.log (192.8 KB) - added by cwacek@… 12 years ago.
main.log with moved /usr/local

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: libglade2 libtool libexpat removed

Please provide the entire main.log file.

Also, let us know what is in /usr/local on your system. If anything is there, we will probably ask you to remove it, clean the port and try again.

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Have you been able to make any progress on this issue?

Changed 12 years ago by cwacek@…

Attachment: main.log added

Failed install log

comment:3 in reply to:  2 Changed 12 years ago by cwacek@…

Replying to ryandesign@…:

Have you been able to make any progress on this issue?

I attached the main.log file. /usr/local/lib contains the following. None of that looks like it should be an issue:

drwxr-xr-x   4 root  wheel     136 Apr 16  2010 ImageMagick-6.6.1/
lrwxr-xr-x   1 root  wheel      58 May 26  2011 libaquaterm.1.0.1.dylib@ -> /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm
lrwxr-xr-x   1 root  wheel      58 May 26  2011 libaquaterm.dylib@ -> /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm
lrwxr-xr-x   1 root  wheel      13 May 10  2011 libfuse.0.dylib@ -> libfuse.dylib
lrwxr-xr-x   1 root  wheel      15 May 10  2011 libfuse.2.7.3.dylib@ -> libfuse.2.dylib
-rwxr-xr-x   1 root  wheel  815392 Dec 31  2010 libfuse.2.dylib*
lrwxr-xr-x   1 root  wheel      15 May 10  2011 libfuse.dylib@ -> libfuse.2.dylib
-rwxr-xr-x   1 root  wheel     795 Dec 31  2010 libfuse.la*
lrwxr-xr-x   1 root  wheel      21 May 10  2011 libfuse_ino64.2.7.3.dylib@ -> libfuse_ino64.2.dylib
-rwxr-xr-x   1 root  wheel  815408 Dec 31  2010 libfuse_ino64.2.dylib*
lrwxr-xr-x   1 root  wheel      21 May 10  2011 libfuse_ino64.dylib@ -> libfuse_ino64.2.dylib
-rwxr-xr-x   1 root  wheel     831 Dec 31  2010 libfuse_ino64.la*
drwxr-xr-x   3 root  wheel     102 May 10  2011 pkgconfig/

comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

What's in /usr/local/lib/pkgconfig? What's in /usr/local/bin?

Generally we can't support the use of MacPorts while anything exists in /usr/local as it often causes interference. To test whether that's the case here, please rename /usr/local to something else (like /usr/local-off), clean libglade2 and try again.

I recommend you use MacPorts to install any programs you want to use; don't compile manually or use installers that install into /usr/local. For example, I see you have a two-year-old version of ImageMagick. You can get a much newer version of ImageMagick in MacPorts. ("sudo port install ImageMagick") I see you have libfuse, which is part of MacFUSE. MacFUSE is dead; you can get its replacement, fuse4x, in MacPorts. ("sudo port install fuse4x") AquaTerm is available in MacPorts too. ("sudo port install aquaterm")

comment:5 in reply to:  4 ; Changed 12 years ago by cwacek@…

Replying to ryandesign@…:

What's in /usr/local/lib/pkgconfig? What's in /usr/local/bin?

I just moved /usr/local to /usr/local-off, cleaned and tried again, with exactly the same result.

For the record, it also doesn't make any sense that things in /usr/local would be causing an issue when macports' prefix is /opt/local. In this case, it seems like libglade is simply looking in the wrong directory for libexpat, since its a dependency, was installed correctly by macports to /opt/local/lib.

Thanks for the heads up on fuse4x. I used MacFUSE for a while, and then gave up on it and haven't cleaned it up.

comment:6 in reply to:  5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to cwacek@…:

Replying to ryandesign@…:

What's in /usr/local/lib/pkgconfig? What's in /usr/local/bin?

I just moved /usr/local to /usr/local-off, cleaned and tried again, with exactly the same result.

Thank you for testing that. Could you attach the new main.log so I can compare it with mine?

For the record, it also doesn't make any sense that things in /usr/local would be causing an issue when macports' prefix is /opt/local.

It is nevertheless the case. Many projects hardcode /usr/local as a place to look for things; although we try to patch these out when we find them, we are unlikely to ever find all such occurrences. More importantly, /usr/local is a special directory: the compiler looks for things in it, even if we don't tell it to; we don't know of a way to tell the compiler not to do that, so the only thing we can do is tell people not to install things there.

Changed 12 years ago by cwacek@…

Attachment: main.2.log added

main.log with moved /usr/local

comment:7 Changed 12 years ago by cwacek@…

Attached the new main.log

comment:8 Changed 12 years ago by jmroot (Joshua Root)

Possibly one of the .la files in /opt/local/lib contains a /usr/local path due to having been built when /usr/local was present. Try e.g.:

find /opt/local/lib -name \*.la -exec grep -l /usr/local {} \;

comment:9 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Were you able to locate any occurrences of /usr/local in /opt/local/lib?

comment:10 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.