Opened 14 years ago

Closed 12 years ago

#29054 closed defect (fixed)

alpine port picks up OpenSSL libraries from /usr/lib instead of Mac Ports installed versions

Reported by: MacPorts.ORG@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: rudloff@…
Port: alpine

Description

Building alpine 2.00 with Mac Ports 1.9.2 on Mac OS X 10.5.x fails:

:info:build /usr/bin/gcc-4.0 -std=gnu99 -g -D_THREAD_SAFE -Dbsd -O2 -arch ppc \
-arch ppc -o alpine addrbook.o adrbkcmd.o after.o alpine.o arg.o busy.o colorconf.o \
confscroll.o context.o dispfilt.o flagmaint.o folder.o help.o imap.o init.o kblock.o \
keymenu.o ldapconf.o listsel.o mailcmd.o mailindx.o mailpart.o mailview.o newuser.o \
pattern.o pipe.o print.o radio.o remote.o reply.o roleconf.o send.o setup.o signal.o \
status.o takeaddr.o titlebar.o smime.o date.o -Wl,-framework -Wl,CoreFoundation \
-framework Carbon -framework ApplicationServices -framework Security  -L/usr/lib \
-lkrb5 -lcom_err -lpam -ldl -L/opt/local/lib ../pico/libpico.a \
../pico/osdep/libpicoosd.a ../pith/libpith.a ../pith/osdep/libpithosd.a \
../pith/charconv/libpithcc.a osdep/libpineosd.a ../c-client/c-client.a \
/opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib /usr/lib/libiconv.dylib -lc \
-lgssapi_krb5 -lldap -lncurses -llber -lssl -lcrypto

:info:build Undefined symbols:
:info:build   "_BIO_method_type", referenced from:
:info:build       _so_seek in libpith.a(store.o)
:info:build ld: symbol(s) not found
:info:build collect2: ld returned 1 exit status
:info:build make[4]: *** [alpine] Error 1
:info:build make[3]: *** [all-recursive] Error 1
:info:build make[2]: *** [all] Error 2
:info:build make[1]: *** [all-recursive] Error 1
:info:build make: *** [all] Error 2
:info:build shell command " cd "/opt/local/var/macports/build/\
_opt_local_var_macports_sources_rsync.macports.org_release_ports_mail_alpine/\
work/alpine-2.00" && /usr/bin/make all SPECIALS="GSSLIB=/opt/local/lib \
SSLDIR=/opt/local" " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for \
details)
:debug:build Backtrace: shell command failed (see log for details)
  while executing
"command_exec build"
  (procedure "portbuild::build_main" line 8)
  invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for alpine): org.macports.destroot org.macports.build
:notice:build Log for alpine is at: /opt/local/var/macports/logs/\
_opt_local_var_macports_sources_rsync.macports.org_release_ports_mail_alpine/\
main.log

"BIO_method_type" is a symbol introduced in libcrypto 0.9.8. Leopard comes with libcrypto 0.9.7; Snow Leopard comes with both libcrypto 0.9.7 and 0.9.8 (active) in /usr/lib.

So alpine builds on Snow Leopard, but checking the dependencies shows it is picking up libcrypto and libssl from /usr/lib instead of from the Mac Ports version of OpenSSL:

[19:08] nightowl:~ % port info --depends alpine | grep lib
depends_lib: port:openssl, port:libiconv, port:gettext, port:openldap, port:ncurses, port:cyrus-sasl2

[19:09] nightowl:~ % otool -L /opt/local/bin/alpine | egrep crypto\|ssl\|iconv
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)
/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)

(It also picks up 'libiconv' twice, which can't possibly be a good thing, either.)

As you can see from the depends_lib it should be picking up libcrypto/libssl/libiconv from the Mac Ports installed versions, but it doesn't.

That's perplexing because as you can see from the link statement, there's a "-L/usr/lib -lkrb5 [...] -L/opt/local/lib [...]" before it gets to the end with "-lssl -lcrypto", so I'm not sure why the "-L/opt/local/lib" is getting overridden by that point.

I also don't see libgssapi_krb5 or libldap linked in anywhere, either:

[19:17] nightowl:~ % otool -L /opt/local/bin/alpine 
/opt/local/bin/alpine:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation \
(compatibility version 150.0.0, current version 550.42.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon \
(compatibility version 2.0.0, current version 152.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices \
(compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security \
(compatibility version 1.0.0, current version 37594.0.0)
/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos \
(compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libpam.2.dylib \
(compatibility version 3.0.0, current version 3.0.0)
/usr/lib/libSystem.B.dylib \
(compatibility version 1.0.0, current version 125.2.10)
/opt/local/lib/libintl.8.dylib \
(compatibility version 10.0.0, current version 10.1.0)
/opt/local/lib/libiconv.2.dylib \
(compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libiconv.2.dylib \
(compatibility version 7.0.0, current version 7.0.0)
/System/Library/Frameworks/LDAP.framework/Versions/A/LDAP \
(compatibility version 1.0.0, current version 2.2.0)
/usr/lib/libncurses.5.4.dylib \
(compatibility version 5.4.0, current version 5.4.0)
/usr/lib/libssl.0.9.8.dylib \
(compatibility version 0.9.8, current version 0.9.8)
/usr/lib/libcrypto.0.9.8.dylib \
(compatibility version 0.9.8, current version 0.9.8)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices \
(compatibility version 1.0.0, current version 44.0.0)

Anyway, looks like the link statement/order needs to be reworked somehow.

Change History (5)

comment:1 Changed 14 years ago by MacPorts.ORG@…

Cc: MacPorts.ORG@… removed

Cc Me!

comment:2 Changed 14 years ago by MacPorts.ORG@…

Cc: MacPorts.ORG@… added

Cc Me!

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Cc: MacPorts.ORG@… removed
Keywords: alpine openssl removed

You do not need to be in cc when you are the reporter.

comment:4 Changed 13 years ago by rudloff@…

Cc: rudloff@… added

Cc Me!

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

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