Opened 15 years ago

Closed 14 years ago

#17357 closed defect (fixed)

cyrus-sasl2 needs a change in order to build the universal variant

Reported by: Veence (Vincent) Owned by: jmpp@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: universal Cc: landonf (Landon Fuller), jeremyhu (Jeremy Huddleston Sequoia), cbowns@…, robin@…, jay+macports@…, nox@…, eborisch@…
Port: cyrus-sasl2

Description

The cyrus-sasl2 package, needed by subversion, must be minutly modified in order to build +universal. The "libtool" file bundled with the package does not link universal lib. At line 178 of the script, instead of this:

archive_cmds = "$(CC) ..."

it should be:

archive_cmds = "$(CC) -arch i386 -arch ... (etc. depending on the archs that should be built) ..."

With that patch everything goes fine.

Attachments (2)

cyrus-sasl2_universal.diff (1.3 KB) - added by illogic-al@… 15 years ago.
compile universal cyrus-sasl2 (methinks)
Portfile-universalhackaround.diff (1.1 KB) - added by erik.abair@… 14 years ago.
Here's an alternative patch that limits the change to i386 arch, though in an awful hacky way

Download all attachments as: .zip

Change History (20)

comment:1 Changed 15 years ago by mf2k (Frank Schima)

Cc: landonf@… added
Keywords: cyrus-sasl2 removed
Owner: changed from macports-tickets@… to jmpp@…

Assigning to maintainers.

comment:2 Changed 15 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Cc: jeremyhu@… added

Cc Me!

Changed 15 years ago by illogic-al@…

Attachment: cyrus-sasl2_universal.diff added

compile universal cyrus-sasl2 (methinks)

comment:3 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:4 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:5 Changed 15 years ago by cbowns@…

Cc: cbowns@… added

Cc Me!

comment:6 Changed 15 years ago by cbowns@…

Doesn't build for me on 10A354, with universal_archs set to x86_64, and +universal in variants.conf.

sudo port clean cyrus-sasl2 && sudo port install cyrus-sasl2

dies with the following:

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.22" && make -j2 all " returned error 2
Command output: ntlm.c:1787: warning: pointer targets in passing argument 2 of 'load_buffer' differ in signedness
ntlm.c:1789: warning: pointer targets in passing argument 2 of 'load_buffer' differ in signedness
ntlm.c: In function 'create_response':
ntlm.c:1834: warning: pointer targets in assignment differ in signedness
ntlm.c:1844: warning: pointer targets in passing argument 2 of 'load_buffer' differ in signedness
ntlm.c:1846: warning: pointer targets in passing argument 2 of 'load_buffer' differ in signedness
ntlm.c:1849: warning: pointer targets in passing argument 2 of 'load_buffer' differ in signedness
ntlm.c: In function 'ntlm_client_mech_new':
ntlm.c:1857: warning: unused parameter 'glob_context'
ntlm.c: In function 'ntlm_client_mech_step1':
ntlm.c:1881: warning: unused parameter 'serverin'
ntlm.c:1882: warning: unused parameter 'serverinlen'
ntlm.c:1883: warning: unused parameter 'prompt_need'
ntlm.c:1886: warning: unused parameter 'oparams'
ntlm.c: In function 'ntlm_client_mech_step2':
ntlm.c:1990: warning: pointer targets in passing argument 2 of 'unload_buffer' differ in signedness
ntlm.c:2003: warning: pointer targets in initialization differ in signedness
ntlm.c:2012: warning: pointer targets in passing argument 5 of 'V2' differ in signedness
ntlm.c:2012: warning: pointer targets in passing argument 6 of 'V2' differ in signedness
mkdir .libs
(cd . && ln -s sasldb.lo sasldb.o)
(cd . && ln -s sasldb_init.lo sasldb_init.o)
(cd . && ln -s plugin_common.lo plugin_common.o)
../libtool: line 2449: test: too many arguments
/usr/bin/gcc-4.2 -bundle -undefined error -o .libs/libsasldb.2.0.22.so  sasldb.lo sasldb_init.lo plugin_common.lo -all_load  ../sasldb/.libs/libsasldb.al  -L/opt/local/lib -lresolv -lresolv -lresolv -lresolv -lc  -install_name  /opt/local/lib/sasl2/libsasldb.2.so 
i686-apple-darwin10-gcc-4.2.1: -install_name only allowed with -dynamiclib
make[2]: *** [libsasldb.la] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Let me know what other config info you need, happy to provide it. Should I file a new ticket for this instead of piggybacking on this one?

comment:7 Changed 15 years ago by ari@…

I can confirm that the patch suggested by illogic-al does not work for me on 10A354 either. The error is as per the previous post.

comment:8 Changed 15 years ago by robin@…

illogic-al's patch works for me with cyrus-sasl2 2.1.23 on 10A380 with universal_archs="i386 x86_64".

comment:9 Changed 15 years ago by robin@…

Cc: robin@… added

Cc Me!

comment:10 in reply to:  7 Changed 15 years ago by jay+macports@…

Replying to ari@…:

I can confirm that the patch suggested by illogic-al does not work for me on 10A354 either. The error is as per the previous post.

Me as well, using just arch x86_64. The original proposed patch in this ticket, adding -arch x86_64 to the one line in libtool, does work for me.

comment:11 Changed 15 years ago by jay+macports@…

Cc: jay+macports@… added

Cc Me!

comment:12 Changed 15 years ago by nox@…

Cc: nox@… added

Cc Me!

comment:13 Changed 15 years ago by nox@…

I can confirm illogic-al's patch works on Snow Leopard.

Changed 14 years ago by erik.abair@…

Here's an alternative patch that limits the change to i386 arch, though in an awful hacky way

comment:14 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

A side issue of this is that it looks like it prefers the installed lib over the built one when linking... /sigh

/usr/bin/gcc-4.2 -Wall -W -O2 -arch i386 -L/opt/local/lib -Wl,-rpath,/opt/local/lib -L/opt/local/lib -arch i386 -o .libs/dbconverter-2 dbconverter-2.o ../sasldb/.libs/libsasldb.al -lresolv -lresolv -L../lib/.libs -lsasl2 -ldl -lresolv -lresolv -lresolv -lresolv
ld: warning: in /opt/local/lib/libsasl2.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Undefined symbols:
  "_sasl_global_utils", referenced from:
      _sasl_global_utils$non_lazy_ptr in dbconverter-2.o
     (maybe you meant: _sasl_global_utils$non_lazy_ptr)
  "_sasl_dispose", referenced from:
      _main in dbconverter-2.o
  "_sasl_done", referenced from:
      _main in dbconverter-2.o
  "_sasl_server_init", referenced from:
      _main in dbconverter-2.o
  "_sasl_server_new", referenced from:
      _main in dbconverter-2.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [dbconverter-2] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2


comment:15 Changed 14 years ago by jeremyhu (Jeremy Huddleston Sequoia)

r61539 has some motion here, but I'm leaving the ticket open.

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

Cc: eborisch@… added

eborisch noted in #22903 that this fix only works on Snow Leopard. I made the fix more general in r61672 to make it work on Leopard too.

comment:17 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

With r61674 it now also supports the user changing build_arch in macports.conf.

comment:18 Changed 14 years ago by nox@…

Resolution: fixed
Status: newclosed

Should be fixed now, right?

Note: See TracTickets for help on using tickets.