in reply to getting the error lipo: can't open input file: while compiling modules

http://www.nntp.perl.org/group/perl.macosx/2007/03/msg10229.html
http://switch.richard5.net/isp-in-a-box-v2/installing-apache-on-mac-os-x/
http://www.thescripts.com/forum/thread710839.html
  • Comment on Re: getting the error lipo: can't open input file: while compiling modules

Replies are listed 'Best First'.
Re^2: getting the error lipo: can't open input file: while compiling modules
by boysie (Initiate) on Dec 18, 2007 at 10:21 UTC
    I followed the instructions found at:

    http://www.nntp.perl.org/group/perl.macosx/2007/03/msg10229.html

    Which suggested adding -msse2 to the configuration options.

    I'm still getting the following errors while trying to install DBD::mysql:

    cc -c -I/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DBI -I/usr/local/mysql/include -Os -arch i386 -fno-common -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i686 -arch ppc -msse2 -nostdinc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"4.005\" -DXS_VERSION=\"4.005\" "-I/usr/local/lib/perl5/5.8.8/darwin-2level/CORE"
    dbdimp.c
    dbdimp.c: In function 'mysql_dr_connect':
    dbdimp.c:1533: error: 'ulong' undeclared (first use in this function)
    dbdimp.c:1533: error: (Each undeclared identifier is reported only once
    dbdimp.c:1533: error: for each function it appears in.)
    dbdimp.c:1533: error: parse error before numeric constant
    dbdimp.c:1535: error: parse error before numeric constant
    dbdimp.c: In function 'mysql_dr_connect':
    dbdimp.c:1533: error: 'ulong' undeclared (first use in this function)
    dbdimp.c:1533: error: (Each undeclared identifier is reported only once
    dbdimp.c:1533: error: for each function it appears in.)
    dbdimp.c:1533: error: parse error before numeric constant
    dbdimp.c:1535: error: parse error before numeric constant
    dbdimp.c:1649: error: parse error before numeric constant
    dbdimp.c:1649: error: parse error before numeric constant
    dbdimp.c: In function 'mysql_dr_connect':
    dbdimp.c:1533: error: 'ulong' undeclared (first use in this function)
    dbdimp.c:1533: error: (Each undeclared identifier is reported only once
    dbdimp.c:1533: error: for each function it appears in.)
    dbdimp.c:1533: error: parse error before numeric constant
    dbdimp.c:1535: error: parse error before numeric constant
    dbdimp.c:1649: error: parse error before numeric constant
    lipo: can't open input file: /var/tmp//cciO6iLr.out (No such file or directory)
    make: *** dbdimp.o Error 1


    Any other suggestions?
      Try setting the DYLD_LIBRARY_PATH might help. Or altering the setup.py to add -L/usr/lib.
        I've used realclean and clean to no effect.
        I've made sure the /usr/lib was in the path and am no longer getting the Config.pm errors.

        Now my main problem is getting DBD::mysql to build and install.

        I'm getting the following error on make: Using DBI 1.601 (for perl 5.008008 on darwin-2level) installed in /usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DBI/
        Writing Makefile for DBD::mysql
        bdc:~/habitat/src/DBD-mysql-3.0008 root# make
        cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
        cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
        cp lib/Mysql.pm blib/lib/Mysql.pm
        cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
        cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
        cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
        cc -c -I/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/DBI -I/usr/local/mysql/include -Os -arch i386 -fno-common -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-common -DPERL_DARWIN -no-cpp-precomp -arch i686 -arch ppc -msse2 -nostdinc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"3.0008\" -DXS_VERSION=\"3.0008\" "-I/usr/local/lib/perl5/5.8.8/darwin-2level/CORE" dbdimp.c
        lipo: /var/tmp//ccqO3ZA9.out and /var/tmp//cc7PX3gs.out have the same architectures (i386) and can't be in the same fat output file
        make: *** dbdimp.o Error 1

        I'm not even sure why this is happening, but the last part of the error starting with lipo: is one that I've been struggling with...
      I don't know if this helps but during 'make' I get the following errors for several packages:

      Making XS::APItest (dynamic)
      Makefile out-of-date with respect to ../../../lib/Config.pm
      Cleaning current config before rebuilding Makefile...
      make -f Makefile.old clean > /dev/null 2>&1
      ../../../miniperl "-I../../../lib" "-I../../../lib" Makefile.PL "INSTALLDIRS=perl" "PERL_CORE=1" "LIBPERL_A=libperl.a"
      Checking if your kit is complete...
      Looks good
      Writing Makefile for XS::APItest
      ==> Your Makefile has been rebuilt. <==
      ==> Please rerun the make command. <==
      false
      make2: *** Makefile Error 1
      make config failed, continuing anyway...
      Skip ../../../lib/XS/APItest.pm (unchanged)
      ../../../miniperl "-I../../../lib" "-I../../../lib" ../../../lib/ExtUtils/xsubpp -typemap ../../../lib/ExtUtils/typemap APItest.xs > APItest.xsc && mv APItest.xsc APItest.c
      cc -c -I. -fno-common -DPERL_DARWIN -no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -I/usr/local/include -arch i686 -arch ppc -msse2 -nostdinc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/include/gcc -B/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc -isystem/Developer/SDKs/MacOSX10.4u.sdk/usr/include -F/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks -Wdeclaration-after-statement -I/usr/local/include -I/opt/local/include -O3 -DVERSION=\"0.08\" -DXS_VERSION=\"0.08\" "-I../../.." APItest.c
      Running Mkbootstrap for XS::APItest ()
      chmod 644 APItest.bs
      rm -f ../../../lib/auto/XS/APItest/APItest.bundle
      env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib APItest.o -o ../../../lib/auto/XS/APItest/APItest.bundle \ \

      chmod 755 ../../../lib/auto/XS/APItest/APItest.bundle
      cp APItest.bs ../../../lib/auto/XS/APItest/APItest.bs
      chmod 644 ../../../lib/auto/XS/APItest/APItest.bs


      I'm wondering if I'm having problems because of previous builds. Is there a way to build perl statically, or in other words without linking to the old files/libraries?
      Would that