This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cross compilation of libffi on MacOS 10.5 (i386) for PPC


Hi,

I'm currently trying to cross-compile libffi for PPC on a MacOS 10.5/i386 build host.

I tried compiling with these options:

vmac04:libffi-3.0.10 zedv$ ./configure --build=powerpc-apple-darwin9.8.0
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
continue configure in default builddir "./powerpc-apple-darwin9.8.0"
....exec /bin/sh .././configure "--srcdir=.." "--enable-builddir=powerpc-apple-darwin9.8.0" "darwin9.8.0"
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking target system type... powerpc-apple-darwin9.8.0
checking for gsed... sed
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ../install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert powerpc-apple-darwin9.8.0 file names to powerpc-apple-darwin9.8.0 format... func_convert_file_noop
checking how to convert powerpc-apple-darwin9.8.0 file names to toolchain format... func_convert_file_noop
checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for C compiler vendor... gnu
checking whether C compiler accepts -fstrict-aliasing... yes
checking whether C compiler accepts -ffast-math... yes
checking for gcc architecture flag... 
checking whether C compiler accepts -march=i486... yes
checking for gcc architecture flag... -march=i486
checking whether C compiler accepts -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math -march=i486... yes
checking CFLAGS for maximum warnings... -Wall
checking whether to enable maintainer-specific portions of Makefiles... no
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for mmap... yes
checking for sys/mman.h... (cached) yes
checking for mmap... (cached) yes
checking whether read-only mmap of a plain file works... yes
checking whether mmap from /dev/zero works... no
checking for MAP_ANON(YMOUS)... yes
checking whether mmap with MAP_ANON(YMOUS) works... yes
checking for ANSI C header files... (cached) yes
checking for memcpy... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking size of double... 8
checking size of long double... 16
checking whether byte ordering is bigendian... no
checking assembler .cfi pseudo-op support... no
checking whether .eh_frame section should be read-only... no
checking for __attribute__((visibility("hidden")))... no
configure: creating ./config.status
config.status: creating include/Makefile
config.status: creating include/ffi.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating man/Makefile
config.status: creating libffi.pc
config.status: creating fficonfig.h
config.status: fficonfig.h is unchanged
config.status: linking ../src/powerpc/ffitarget.h to include/ffitarget.h
config.status: executing buildir commands
config.status: reusing top_srcdir/Makefile from earlier configure
config.status: build in powerpc-apple-darwin9.8.0 (HOST=)
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing include commands
config.status: executing src commands
vmac04:libffi-3.0.10 zedv$ make
MAKE i386-apple-darwin9.8.0 :        0 * all-all
make: *** [all-all] Error 1

Initially, I tried building it with Macports:

version:1
:debug:main Executing org.macports.main (libffi)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 500
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.configure (libffi)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Sat Jan 28 17:45:41 CET 2012
:notice:build --->  Building libffi
:debug:build Executing org.macports.build (libffi)
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.5'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10" && /usr/bin/make -w all'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10" && /usr/bin/make -w all 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10'
:info:build MAKE i386-apple-darwin9.8.0 :        0 * all
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build /usr/bin/make "AR_FLAGS=" "CC_FOR_BUILD=" "CFLAGS=-pipe -O2 -arch ppc -Wall -fexceptions" "CXXFLAGS=" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "JC1FLAGS=" "LDFLAGS=-L/opt/local/lib -arch ppc" "LIBCFLAGS=" "LIBCFLAGS_FOR_TARGET=" "MAKE=/usr/bin/make" "MAKEINFO=/bin/sh /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/missing --run makeinfo " "PICFLAG=" "PICFLAG_FOR_TARGET=" "RUNTESTFLAGS=" "SHELL=/bin/sh" "exec_prefix=/opt/local" "infodir=/opt/local/share/info" "libdir=/opt/local/lib" "mandir=/opt/local/share/man" "prefix=/opt/local" "AR=ar" "AS=as" "CC=/usr/bin/gcc-4.0" "CXX=g++" "LD=/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld" "NM=/usr/bin/nm -p" "RANLIB=ranlib" "DESTDIR=" all-recursive
:info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build Making all in include
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/include'
:info:build make[3]: Nothing to be done for `all'.
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/include'
:info:build Making all in testsuite
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/testsuite'
:info:build make[3]: Nothing to be done for `all'.
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/testsuite'
:info:build Making all in man
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/man'
:info:build make[3]: Nothing to be done for `all'.
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0/man'
:info:build make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build depbase=`echo src/x86/darwin.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
:info:build 	/bin/sh ./libtool   --mode=compile /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I..  -I. -I../include -Iinclude -I../src -I/opt/local/include -I. -I../include -Iinclude -I../src -pipe -O2 -arch ppc -MT src/x86/darwin.lo -MD -MP -MF $depbase.Tpo -c -o src/x86/darwin.lo ../src/x86/darwin.S &&\
:info:build 	mv -f $depbase.Tpo $depbase.Plo
:info:build libtool: compile:  /usr/bin/gcc-4.0 -DHAVE_CONFIG_H -I. -I.. -I. -I../include -Iinclude -I../src -I/opt/local/include -I. -I../include -Iinclude -I../src -pipe -O2 -arch ppc -MT src/x86/darwin.lo -MD -MP -MF src/x86/.deps/darwin.Tpo -c ../src/x86/darwin.S  -fno-common -DPIC -o src/x86/.libs/darwin.o
:info:build ../src/x86/darwin.S:44:Invalid mnemonic 'pushl'
:info:build ../src/x86/darwin.S:46:Invalid mnemonic 'movl'
:info:build ../src/x86/darwin.S:48:Invalid mnemonic 'subl'
:info:build ../src/x86/darwin.S:50:Invalid mnemonic 'movl'
:info:build ../src/x86/darwin.S:51:Invalid mnemonic 'subl'
:info:build ../src/x86/darwin.S:53:Invalid mnemonic 'movl'
:info:build ../src/x86/darwin.S:56:Invalid mnemonic 'subl'
:info:build ../src/x86/darwin.S:57:Invalid mnemonic 'pushl'
:info:build ../src/x86/darwin.S:58:Invalid mnemonic 'pushl'
:info:build ../src/x86/darwin.S:59:Invalid mnemonic 'call'
:info:build ../src/x86/darwin.S:62:Invalid mnemonic 'addl'
:info:build ../src/x86/darwin.S:64:Invalid mnemonic 'call'
:info:build ../src/x86/darwin.S:67:Invalid mnemonic 'movl'
:info:build ../src/x86/darwin.S:70:Invalid mnemonic 'pushl'
:info:build ../src/x86/darwin.S:73:Parameter syntax error
:info:build ../src/x86/darwin.S:74:Invalid mnemonic 'jne'
:info:build ../src/x86/darwin.S:78:Parameter syntax error
:info:build ../src/x86/darwin.S:79:Invalid mnemonic 'jne'
:info:build ../src/x86/darwin.S:80:Invalid mnemonic 'fstp'
:info:build ../src/x86/darwin.S:82:Parameter syntax error (parameter 1)
:info:build ../src/x86/darwin.S:85:Invalid mnemonic 'call'
:info:build ../src/x86/darwin.S:105:Invalid mnemonic 'pop'
:info:build ../src/x86/darwin.S:106:Parameter syntax error (parameter 1)
:info:build ../src/x86/darwin.S:107:Missing operand value assumed absolute 0.
:info:build ../src/x86/darwin.S:107:Relocation error. Absolute 0 assumed
:info:build ../src/x86/darwin.S:107:Can't relocate expression. Absolute 0 assumed.
:info:build /usr/libexec/gcc/powerpc-apple-darwin9/4.0.1/as: fatal error in /usr/bin/../libexec/gcc/darwin/ppc/as
:info:build make[3]: *** [src/x86/darwin.lo] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build make[2]: *** [all-recursive] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build make[1]: *** [all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10/i386-apple-darwin9.8.0'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10'
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/work/libffi-3.0.10" && /usr/bin/make -w all " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for libffi): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for libffi is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libffi/libffi/main.log

Anyone can point me into the right direction? It seems that I'm configuring the package wrong so it
still tries to build for i386 instead of PPC.

Thanks,

Adrian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]