bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gettext] While cross-compiling gettext-0.18.3.2 fails to build the


From: Peter Dyballa
Subject: [bug-gettext] While cross-compiling gettext-0.18.3.2 fails to build the proper libasprintf.a
Date: Sat, 3 May 2014 11:15:44 +0200

Hello!

I am using Mac OS X 10.6.8, Snow Leopard, on a Mac with an Intel Core i7 CPU 
and with two installations of Xcode, an old one with support for all platforms 
in /Developer45 and an up-to-date on in the usual /Developer place, which was 
installed last. I am trying to compile gettext for use with WP2LaTeX and to be 
used on G3, G4, G5, i386 and x86_64 platforms. When I configure for G3 and i386 
Ă  la

        time env LANG=C PATH=/Developer45/usr/bin:$PATH ./configure 
--prefix=.../wp2latex.3.65/build --libdir=.../wp2latex.3.65/build/lib-old 
--enable-shared=no --disable-csharp --disable-java --disable-rpath 
--disable-openmp --disable-acl --with-pic 
CPPFLAGS=-I.../wp2latex.3.65/build/include CFLAGS="-H -pipe -fPIC -pthread -Os 
-fno-exceptions -arch ppc -arch i386 -isysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -iwithsysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8" CXXFLAGS="-H 
-pipe -fPIC -pthread -fast -fno-exceptions -fastcp -fconserve-space 
-Wno-non-template-friend -arch ppc -arch i386 -isysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -iwithsysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8" 
LDFLAGS="-L.../wp2latex.3.65/build/Csu-79 -L.../wp2latex.3.65/build/lib-old 
-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t -arch ppc -arch i386 -isysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -iwithsysroot 
/Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8" 
CXX="/Developer45/usr/bin/g++-4.0 -m32 -Xarch_ppc -mcpu=G3 -Xarch_ppc -mtune=G3 
-Xarch_i386 -march=prescott -Xarch_i386 -msse3" 
CC="/Developer45/usr/bin/gcc-4.0 -m32 -Xarch_ppc -mcpu=G3 -Xarch_ppc -mtune=G3 
-Xarch_i386 -march=prescott -Xarch_i386 -msse3" 
CPP=/Developer45/usr/bin/cpp-4.0 CXXCPP="/Developer45/usr/bin/g++-4.0 -E" 
LD=/Developer45/usr/bin/ld AS=/Developer45/usr/bin/as

and build for both platforms, it succeeds:

        file lib-old/libasprintf.a
        lib-old/libasprintf.a: Mach-O fat file with 2 architectures
        lib-old/libasprintf.a (for architecture ppc):   current ar archive 
random library
        lib-old/libasprintf.a (for architecture i386):  current ar archive 
random library

When I try to configure for the remaining three platforms and try to build a 
failure happens because of too old prototypes for G4, presumingly. So I decided 
to build for each platform and then to combine with lipo manually. For G5 a 
failure happens…

Configuration is:

        time env LANG=C PATH=/Developer45/usr/bin:$PATH ./configure --host 
ppc-apple-darwin10.8.0 --prefix=/Users/peter/Quellen/wp2latex.3.65/build 
--libdir=/Users/peter/Quellen/wp2latex.3.65/build/lib-G5 --enable-shared=no 
--disable-native-java --disable-rpath --disable-openmp --disable-acl --with-pic 
CFLAGS="-arch ppc64 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4.8 -m64 -H -pipe -fPIC -fast -mpowerpc-gfxopt 
-faltivec -mabi=altivec -pthread -finline-functions" LDFLAGS="-arch ppc64 
-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t" CC=gcc-4.0 CPP=cpp-4.0 
CCX=g++-4.0 LD=gcc-4.0

The failure is:

        make  all-am
        cp ./autosprintf.in.h autosprintf.h
        /bin/sh ./libtool  --tag=CC   --mode=compile gcc-4.0 -DIN_LIBASPRINTF 
-DHAVE_CONFIG_H -I.     -arch ppc64 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4.8 -m64 -H -pipe -fPIC -fast -mpowerpc-gfxopt 
-faltivec -mabi=altivec -pthread -finline-functions -c -o xsize.lo xsize.c
        libtool: compile:  gcc-4.0 -DIN_LIBASPRINTF -DHAVE_CONFIG_H -I. -arch 
ppc64 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 
-m64 -H -pipe -fPIC -fast -mpowerpc-gfxopt -faltivec -mabi=altivec -pthread 
-finline-functions -c xsize.c  -fno-common -DPIC -o xsize.o
        . ./config.h
        . xsize.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stddef.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/limits.h
        ... 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/syslimits.h
        ... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/limits.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/machine/limits.h
        ..... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/limits.h
        ...... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/ppc/_limits.h
        .... /Developer45/SDKs/MacOSX10.4u.sdk/usr/include/sys/syslimits.h
        .. 
/Developer45/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin10/4.0.1/include/stdint.h
        /bin/sh ./libtool  --tag=CC   --mode=compile gcc-4.0 -DIN_LIBASPRINTF 
-DHAVE_CONFIG_H -I.     -arch ppc64 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4.8 -m64 -H -pipe -fPIC -fast -mpowerpc-gfxopt 
-faltivec -mabi=altivec -pthread -finline-functions -c -o lib-asprintf.lo 
lib-asprintf.c
        libtool: compile:  gcc-4.0 -DIN_LIBASPRINTF -DHAVE_CONFIG_H -I. -arch 
ppc64 -isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 
-m64 -H -pipe -fPIC -fast -mpowerpc-gfxopt -faltivec -mabi=altivec -pthread 
-finline-functions -c lib-asprintf.c  -fno-common -DPIC -o lib-asprintf.o
        . ./config.h
        /bin/sh ./libtool  --tag=CXX   --mode=compile g++ -DIN_LIBASPRINTF 
-DHAVE_CONFIG_H -I.     -g -O2 -c -o autosprintf.lo autosprintf.cc
        libtool: compile:  g++ -DIN_LIBASPRINTF -DHAVE_CONFIG_H -I. -g -O2 -c 
autosprintf.cc  -fno-common -DPIC -o autosprintf.o
        /bin/sh ./libtool  --tag=CXX   --mode=link g++  -g -O2  -arch ppc64 
-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t -o libasprintf.la -rpath 
/Users/peter/Quellen/wp2latex.3.65/build/lib-G5  xsize.lo lib-asprintf.lo 
autosprintf.lo   || \
                /bin/sh ./libtool  --tag=CC   --mode=link gcc-4.0  -arch ppc64 
-isysroot /Developer45/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4.8 -m64 -H 
-pipe -fPIC -fast -mpowerpc-gfxopt -faltivec -mabi=altivec -pthread 
-finline-functions  -arch ppc64 -Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t 
-o libasprintf.la -rpath /Users/peter/Quellen/wp2latex.3.65/build/lib-G5  
xsize.lo lib-asprintf.lo autosprintf.lo  
        libtool: link: ar cru .libs/libasprintf.a  xsize.o lib-asprintf.o 
autosprintf.o
        /Developer45/usr/bin/ranlib: archive member: 
.libs/libasprintf.a(autosprintf.o) cputype (16777223) does not match previous 
archive members cputype (16777234) (all members must match)
        libtool: link: ranlib .libs/libasprintf.a
        ranlib: archive member: .libs/libasprintf.a(autosprintf.o) cputype 
(16777223) does not match previous archive members cputype (16777234) (all 
members must match)
        ranlib: for architecture: ppc64 file: .libs/libasprintf.a(xsize.o) has 
no symbols
        ranlib: for architecture: ppc64 file: 
.libs/libasprintf.a(lib-asprintf.o) has no symbols
        ranlib: warning for library: .libs/libasprintf.a for architecture: 
ppc64 the table of contents is empty (no object file members in the library 
define global symbols)
        libtool: link: rm -fr  .libs/libasprintf.a
        libtool: link: ar cru .libs/libasprintf.a  xsize.o lib-asprintf.o 
autosprintf.o
        /Developer45/usr/bin/ranlib: archive member: 
.libs/libasprintf.a(autosprintf.o) cputype (16777223) does not match previous 
archive members cputype (16777234) (all members must match)
        libtool: link: ranlib .libs/libasprintf.a
        ranlib: archive member: .libs/libasprintf.a(autosprintf.o) cputype 
(16777223) does not match previous archive members cputype (16777234) (all 
members must match)
        ranlib: for architecture: ppc64 file: .libs/libasprintf.a(xsize.o) has 
no symbols
        ranlib: for architecture: ppc64 file: 
.libs/libasprintf.a(lib-asprintf.o) has no symbols
        ranlib: warning for library: .libs/libasprintf.a for architecture: 
ppc64 the table of contents is empty (no object file members in the library 
define global symbols)
        make[4]: *** [libasprintf.la] Error 1
        make[3]: *** [all] Error 2
        make[2]: *** [all-recursive] Error 1
        make[1]: *** [all] Error 2
        make: *** [all-recursive] Error 1

The resulting library has:

        file gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a: 
Mach-O fat file with 2 architectures
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a (for 
architecture ppc64):      current ar archive random library
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a (for 
architecture x86_64):     current ar archive random library

When I try to build for G4 I get the same failure and the built library is also 
a bit too "big":

        file gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a: 
Mach-O fat file with 2 architectures
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a (for 
architecture ppc):        current ar archive random library
        gettext-0.18.3.2/gettext-runtime/libasprintf/.libs/libasprintf.a (for 
architecture x86_64):     current ar archive random library

--
Greetings

  Pete

Bake pizza not war!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]