Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#12083 closed defect (worksforme)

libgcrypt with universal variant failed to compile on Mac Intel

Reported by: philippe.bernery@… Owned by: sfiera@…
Priority: High Milestone:
Component: ports Version: 1.4.42
Keywords: Cc: jmroot (Joshua Root)
Port: libgcrypt

Description

I have this error when trying to compile libgcrypt with the +universal variant:

Error: Target com.apple.build 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 libgcrypt.la -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/libcipher.la
../mpi/libmpi.la -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]: *** [libgcrypt.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This variant is configured in the global ports config file and I uninstalled every library compiled with macports before launching compilation with this variant. So all dependencies are also compiled with this variant. I asked on the mailing list for help (thread 'libgcrypt and +universal variant') and some people suggest me to add

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

in the portfile.

The compilation worked but I made a 'otool -f' on libgcrypt and it returned nothing...

Then I was suggested to test:

if {[variant_isset universal]} {
    configure.args-append --disable-static
}

but compilation failed with following error:

Portfile changed since last build; discarding previous state.
--->  Fetching libgcrypt
--->  Verifying checksum(s) for libgcrypt
--->  Extracting libgcrypt
--->  Configuring libgcrypt
--->  Building libgcrypt with target all
Error: Target com.apple.build 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: /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)
creating libgcrypt.la
(cd .libs && rm -f libgcrypt.la && ln -s ../libgcrypt.la libgcrypt.la)
Making all in doc
make[2]: Nothing to be done for `all'.
Making all in tests
/usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I. -I.. -I../src
-I/opt/local/include -I/opt/local/include -O2 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -Wall -c prime.c
/bin/sh ../libtool --tag=CC --mode=link /usr/bin/gcc-4.0
-I/opt/local/include -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-arch i386 -arch ppc -Wall  -L/opt/local/lib -arch i386 -arch ppc -o
prime  prime.o ../src/libgcrypt.la
mkdir .libs
/usr/bin/gcc-4.0 -I/opt/local/include -O2 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -Wall -arch i386
-arch ppc -o .libs/prime prime.o  -L/opt/local/lib
../src/.libs/libgcrypt.dylib /opt/local/lib/libgpg-error.dylib
/opt/local/lib/libintl.dylib /opt/local/lib/libiconv.dylib -lc
/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning ../src/.libs/libgcrypt.dylib cputype (7,
architecture i386) does not match cputype (18) for specified -arch
flag: ppc (file not loaded)
/usr/bin/ld: warning prebinding disabled because dependent library:
/Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libgpg-error.0.dylib is
not prebound
/usr/bin/ld: Undefined symbols:
_gcry_check_version
_gcry_control
_gcry_mpi_add_ui
_gcry_mpi_dump
_gcry_mpi_release
_gcry_prime_check
_gcry_prime_generate
_gcry_prime_group_generator
_gcry_prime_release_factors
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccapeII6.out (No such file or directory)
make[2]: *** [prime] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Change History (5)

comment:1 Changed 17 years ago by mdavids@…

I think this might be a more general problem; I get the same thing trying to install cdparanoia or abcde with the +universal variant.

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

Cc: sfiera@… added

Cc'ing maintainer.

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

Cc: jmr@… added; philippe.bernery@… sfiera@… removed

Is this still a problem with libgcrypt 1.4.0?

comment:4 Changed 16 years ago by blb@…

Port: libgcrypt added
Resolution: worksforme
Status: newclosed

No response and works for me.

comment:5 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.