Opened 16 years ago

Closed 14 years ago

#14132 closed defect (duplicate)

cyrus-sasl2 +universal does not build on i386 Tiger

Reported by: ryan@… Owned by: jmpp@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: landonf (Landon Fuller), robbie@…, blb@…, markus.doits@…
Port: cyrus-sasl2

Description

/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc  -L/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o dbconverter-2  dbconverter-2.o ../sasldb/libsasldb.la ../lib/libsasl2.la   -lresolv -lresolv  -lpam
mkdir .libs
/usr/bin/gcc-4.0 -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -L/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o .libs/dbconverter-2 dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv -lresolv -lpam -L../lib/.libs -lsasl2 -ldl -lresolv -lresolv -lpam -lresolv -lresolv -lpam
/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning ../lib/.libs/libsasl2.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/ld: Undefined symbols:
_sasl_dispose
_sasl_done
_sasl_global_utils
_sasl_server_init
_sasl_server_new
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccXswaSm.out (No such file or directory)
make[2]: *** [dbconverter-2] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_cyrus-sasl2/work/cyrus-sasl-2.1.21" && make all " returned error 2
Command output: (cd . && ln -s plugin_common.lo plugin_common.o)
/usr/bin/gcc-4.0 -dynamiclib -undefined error -o .libs/libsasl2.2.0.21.dylib  auxprop.lo canonusr.lo checkpw.lo client.lo common.lo config.lo external.lo md5.lo saslutil.lo server.lo seterror.lo dlopen.lo plugin_common.lo  -L/opt/local/lib -ldl -lresolv -lresolv -lpam -lc  -install_name /opt/local/lib/libsasl2.2.dylib -compatibility_version 3 -current_version 3.21
(cd .libs && rm -f libsasl2.2.dylib && ln -s libsasl2.2.0.21.dylib libsasl2.2.dylib)
(cd .libs && rm -f libsasl2.dylib && ln -s libsasl2.2.0.21.dylib libsasl2.dylib)
creating libsasl2.la
(cd .libs && rm -f libsasl2.la && ln -s ../libsasl2.la libsasl2.la)
Making all in utils
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/opt/local/include -I/opt/local/include  -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -c `test -f 'dbconverter-2.c' || echo './'`dbconverter-2.c
dbconverter-2.c: In function 'good_getopt':
dbconverter-2.c:365: warning: unused parameter 'context'
dbconverter-2.c:366: warning: unused parameter 'plugin_name'
dbconverter-2.c: In function 'good_getopt':
dbconverter-2.c:365: warning: unused parameter 'context'
dbconverter-2.c:366: warning: unused parameter 'plugin_name'
/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc  -L/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o dbconverter-2  dbconverter-2.o ../sasldb/libsasldb.la ../lib/libsasl2.la   -lresolv -lresolv  -lpam
mkdir .libs
/usr/bin/gcc-4.0 -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -L/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o .libs/dbconverter-2 dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv -lresolv -lpam -L../lib/.libs -lsasl2 -ldl -lresolv -lresolv -lpam -lresolv -lresolv -lpam
/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning ../lib/.libs/libsasl2.dylib cputype (7, architecture i386) does not match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/ld: Undefined symbols:
_sasl_dispose
_sasl_done
_sasl_global_utils
_sasl_server_init
_sasl_server_new
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccXswaSm.out (No such file or directory)
make[2]: *** [dbconverter-2] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Warning: the following items did not execute (for cyrus-sasl2): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: The following dependencies failed to build: openldap cyrus-sasl2 db44 popt readline
Error: Status 1 encountered during processing.

Attachments (2)

cyrus-sasl2_universal.tar.bz2 (1.5 KB) - added by blb@… 16 years ago.
diff to Portfile and files/patch-config_ltconfig
cyrus-sasl2_universal.diff (1.3 KB) - added by illogic-al@… 15 years ago.

Download all attachments as: .zip

Change History (13)

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

Cc: landonf@… added
Milestone: Port Bugs
Owner: changed from macports-tickets@… to jmpp@…

Assigning to / Cc'ing maintainers of cyrus-sasl2.

comment:2 in reply to:  1 Changed 16 years ago by robbie@…

Replying to ryandesign@macports.org:

Assigning to / Cc'ing maintainers of cyrus-sasl2.

I just ran into this again on Leopard 10.5.4 (Intel, MacPorts 1.6, just ran a sync) as a dependency of openssl +universal. I get a very similar error.

Cleaning and attempting to install again has no effect.

One thing that I noticed is that it's using the MacOSX10.5.sdk rather than the 10.4u one.

I found this page (http://www.theronge.com/2006/04/15/how-to-compile-cyrus-sasl-as-universal/) , which suggests configuring with 10.4u instead of 10.5 ... I'm unfamiliar with modifying portfiles, otherwise I would have a patch.

Thanks, Robert Iannucci Jr.

Begin trace

--->  Building cyrus-sasl2 with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_cyrus-sasl2/work/cyrus-sasl-2.1.21" && make all " returned error 2
Command output: (cd .libs && rm -f libsasl2.la && ln -s ../libsasl2.la libsasl2.la)
Making all in utils
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/opt/local/include -I/opt/local/include  -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc -c `test -f 'dbconverter-2.c' || echo './'`dbconverter-2.c
dbconverter-2.c: In function 'good_getopt':
dbconverter-2.c:365: warning: unused parameter 'context'
dbconverter-2.c:366: warning: unused parameter 'plugin_name'
dbconverter-2.c: In function 'good_getopt':
dbconverter-2.c:365: warning: unused parameter 'context'
dbconverter-2.c:366: warning: unused parameter 'plugin_name'
/bin/sh ../libtool --mode=link /usr/bin/gcc-4.0  -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc  -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o dbconverter-2  dbconverter-2.o ../sasldb/libsasldb.la ../lib/libsasl2.la   -lresolv -lresolv  -lpam
mkdir .libs
/usr/bin/gcc-4.0 -Wall -W -O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch i386 -arch ppc -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib -arch i386 -arch ppc -o .libs/dbconverter-2 dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv -lresolv -lpam -L../lib/.libs -lsasl2 -ldl -lresolv -lresolv -lpam -lresolv -lresolv -lpam
ld: warning in ../lib/.libs/libsasl2.dylib, file is not of required architecture
Undefined symbols for architecture ppc:
  "_sasl_global_utils", referenced from:
      _sasl_global_utils$non_lazy_ptr in dbconverter-2.o
...
  "_sasl_server_new", referenced from:
      _main in dbconverter-2.o
ld: symbol(s) not found for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//cc3iRxlR.out (No such file or directory)
make[2]: *** [dbconverter-2] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

comment:3 Changed 16 years ago by robbie@…

Cc: robbie@… added

Cc Me!

comment:4 in reply to:  3 Changed 16 years ago by robbie@…

Replying to robbie@rail.com:

Cc Me!

Sorry for the confusion, it was a dependency of subversion, not openssl. I just checked dependents of cyrus-sasl2, and it looks like there are none... it would be nice to have this compile cleanly for subversion, but oh well.

comment:5 Changed 16 years ago by blb@…

Cc: blb@… added
Port: cyrus-sasl2 added

Attaching a tarball with two files: a diff to the Portfile and files/patch-config_ltconfig.

The Portfile updates to 2.1.22 (markd@'s patch from ticket #11386) and adds universal support. This is done by patching config/ltconfig prior to configure to get the right SDK root to use (put into configure.universal_sysroot by port), then when configure is done libtool looks like how the link robbie@ posted above.

Changed 16 years ago by blb@…

diff to Portfile and files/patch-config_ltconfig

Changed 15 years ago by illogic-al@…

Attachment: cyrus-sasl2_universal.diff added

comment:6 Changed 15 years ago by illogic-al@…

Two things a) the binaries generated from that patch don't work (ppc portion missing libs) and b) using the portgroup are so much easier.

Index: Source/macports-trunk/dports/security/cyrus-sasl2/Portfile
===================================================================
--- Source/macports-trunk/dports/security/cyrus-sasl2/Portfile	(revision 49527)
+++ Source/macports-trunk/dports/security/cyrus-sasl2/Portfile	(working copy)
@@ -1,9 +1,11 @@
 # $Id$
 
 PortSystem	1.0
+PortGroup   muniversal 1.0
 
 name			cyrus-sasl2
 version			2.1.22
+revision		1
 categories		security net
 maintainers		jmpp landonf
 description		SASL is an authentication library.
@@ -44,8 +46,6 @@
 
 use_parallel_build  yes
 
-universal_variant no
-
 # This is a start towards universal... lib/Makefile.am and sasldb/Makefile.am need to be updated to not do blind ar-fu
 #depends_build \
 #	port:autoconf \

comment:7 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:8 Changed 14 years ago by peimei@…

Similar problem on Snow Leopard.

--->  Building cyrus-sasl2
--->  Building cyrus-sasl2 for architecture x86_64
--->  Building cyrus-sasl2 for architecture i386
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_cyrus-sasl2/work/cyrus-sasl-2.1.23-i386" && /usr/bin/make -j2 all " returned error 2
Command output:       _main in saslpasswd.o
      _main in saslpasswd.o
      _main in saslpasswd.o
  "_prop_dispose", referenced from:
      _main in saslpasswd.o
  "_sasl_errstring", referenced from:
      _exit_sasl in saslpasswd.o
  "_prop_request", referenced from:
      _main in saslpasswd.o
  "_sasl_dispose", referenced from:
      _main in saslpasswd.o
  "_sasl_done", referenced from:
      _main in saslpasswd.o
  "_sasl_server_init", referenced from:
      _main in saslpasswd.o
  "_prop_new", referenced from:
      _main in saslpasswd.o
  "_sasl_setpass", referenced from:
      _main in saslpasswd.o
  "_sasl_auxprop_store", referenced from:
      _main in saslpasswd.o
  "_sasl_server_new", referenced from:
      _main in saslpasswd.o
  "_sasl_version", referenced from:
      _main in saslpasswd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [saslpasswd2] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: Unable to upgrade port: 1

comment:9 Changed 14 years ago by markus.doits@…

same for me, +universal does not build on snow leopard: linking fails.

:info:build make[2]: *** Waiting for unfinished jobs....:info:build ld: warning: in /opt/local/lib/libsasl2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

comment:10 Changed 14 years ago by markus.doits@…

Cc: markus.doits@… added

Cc Me!

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

Resolution: duplicate
Status: newclosed

Looks like this was taken care of in #17328 and #17357.

Note: See TracTickets for help on using tickets.