libgcrypt and +universal variant

Chris Pickel sfiera at
Wed Jun 6 09:43:06 PDT 2007

Near the end, it tries to extract files from the static lib, which  
fails because the lib is built for multiple architectures. In other  
words, the file format is correct insofar as it's being built  
+universal, but the port expects otherwise.

This seems to be because the library builds itself as separate  
libraries, then takes them apart to build the single library. Weird.  
Anyway, I got the port to build +universal by adding this line to the  
Portfile (`port file libgcrypt`):

variant universal { configure.args-append --disable-static }

This disables the static libs that +universal is failing on, which is  
not a great fix, but I don't know if it can be improved on without a  
major patch. I also still can't guarantee that it will /work/ with  
+universal, so I'd be interested in hearing results of that too. (if  
it does, I'll commit that line to the official portfile)


On 06 Jun, 2007, at 12:04, Philippe BERNERY wrote:
> Hi all,
> I've this issue when trying to compile libgcrypt with +universal  
> variant:
> Error: Target returned: shell command " cd
> "/opt/local/var/db/dports/build/ 
> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ 
> dports_devel_libgcrypt/work/libgcrypt-1.2.4"
> && make all " returned error 2
> Command output: make  all-recursive
> Making all in m4
> make[2]: Nothing to be done for `all'.
> Making all in mpi
> make[2]: Nothing to be done for `all'.
> Making all in cipher
> make[2]: Nothing to be done for `all'.
> Making all in src
> /bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-4.0  -O2
> -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -Wall
> -L/opt/local/lib -arch i386 -arch ppc -o -rpath
> /opt/local/lib  -version-info 13:3:2 libgcrypt_la-misc.lo
> libgcrypt_la-global.lo libgcrypt_la-sexp.lo libgcrypt_la-stdmem.lo
> libgcrypt_la-secmem.lo libgcrypt_la-missing-string.lo
> libgcrypt_la-module.lo libgcrypt_la-ath.lo ../cipher/
> ../mpi/ -L/opt/local/lib -lgpg-error
> rm -fr  .libs/libgcrypt.11.2.3.dylib .libs/libgcrypt.11.dylib
> .libs/libgcrypt.dylib .libs/libgcrypt.lax
> /usr/bin/gcc-4.0 -dynamiclib -flat_namespace -undefined suppress -o
> .libs/libgcrypt.11.2.3.dylib  .libs/libgcrypt_la-misc.o
> .libs/libgcrypt_la-global.o .libs/libgcrypt_la-sexp.o
> .libs/libgcrypt_la-stdmem.o .libs/libgcrypt_la-secmem.o
> .libs/libgcrypt_la-missing-string.o .libs/libgcrypt_la-module.o
> .libs/libgcrypt_la-ath.o -all_load  ../cipher/.libs/libcipher.a
> ../mpi/.libs/libmpi.a  -L/opt/local/lib
> /opt/local/lib/libgpg-error.dylib /opt/local/lib/libintl.dylib
> /opt/local/lib/libiconv.dylib -install_name
> /opt/local/lib/libgcrypt.11.dylib -compatibility_version 14
> -current_version 14.3
> (cd .libs && rm -f libgcrypt.11.dylib && ln -s libgcrypt.11.2.3.dylib
> libgcrypt.11.dylib)
> (cd .libs && rm -f libgcrypt.dylib && ln -s libgcrypt.11.2.3.dylib
> libgcrypt.dylib)
> rm -fr .libs/libgcrypt.lax
> mkdir .libs/libgcrypt.lax
> rm -fr .libs/libgcrypt.lax/libcipher.a
> mkdir .libs/libgcrypt.lax/libcipher.a
> (cd .libs/libgcrypt.lax/libcipher.a && ar x
> /opt/local/var/db/dports/build/ 
> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ 
> dports_devel_libgcrypt/work/libgcrypt-1.2.4/src/../cipher/.libs/ 
> libcipher.a)
> ar: /opt/local/var/db/dports/build/ 
> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ 
> dports_devel_libgcrypt/work/libgcrypt-1.2.4/src/../cipher/.libs/ 
> libcipher.a
> is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
> ar: /opt/local/var/db/dports/build/ 
> _opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_ 
> dports_devel_libgcrypt/work/libgcrypt-1.2.4/src/../cipher/.libs/ 
> libcipher.a:
> Inappropriate file type or format
> make[2]: *** [] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> Compilation complains about an appropriate file type. Any idea?
> -- 
> Philippe BERNERY
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url :

More information about the macports-users mailing list