Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks

I am trying to instal DBI-1.53 on a Unix Sun4 Solaris box but get the error message:

*** Error code 1 make: Fatal error: Command failed for target `Perl.o'

Any advice on this or where to go for support would be great.
Thanks
Si

Replies are listed 'Best First'.
Re: CPAN install DBI-1.53
by MonkE (Hermit) on Nov 28, 2006 at 15:02 UTC
    Are you perhaps trying to compile DBI with Sun's Forte C compiler? I can't be sure, because you didn't include the rest of your error messages. They would have been very helpful. However, since you are on Solaris, I suspect that there's a pretty good chance that your version of perl was not compiled with the same compiler that you are trying to build DBI with.

    You need to build the DBI module with the same compiler that Perl was built with. Try running the command "perl -V" (capital V) for more information on the compiler that was used. There is alot about this on Google also.

    Updated: Changed to indicate capital V for the perl -V command.

      Thanks, here is the full error message:

      root@razorhead # make
      gcc -c -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.53\" -DXS_VERSION=\"1.53\" -fPIC "-I/usr/local/ActivePerl-5.8/lib/5.8.0/sun4-solaris-thread-multi/CORE" -W -Wall -Wpointer-arith -Wbad-function-cast -Wno-comment -Wno-sign-compare -Wno-cast-qual Perl.c cc1: Invalid option `-fno-strict-aliasing' Perl.c: In function `XS_DBD__Perl__dr_data_sources': Perl.c:89: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db__login': Perl.c:125: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_selectall_arrayref': Perl.c:160: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_do': Perl.c:283: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_last_insert_id': Perl.c:321: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_commit': Perl.c:351: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_rollback': Perl.c:369: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_disconnect': Perl.c:387: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_STORE': Perl.c:421: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_FETCH': Perl.c:444: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_DESTROY': Perl.c:464: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__db_take_imp_data': Perl.c:531: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st__prepare': Perl.c:595: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_bind_col': Perl.c:649: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_bind_param': Perl.c:701: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_bind_param_inout': Perl.c:744: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_execute': Perl.c:793: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_execute_for_fetch': Perl.c:828: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_fetchall_arrayref': Perl.c:904: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_finish': Perl.c:938: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_blob_read': Perl.c:969: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_STORE': Perl.c:1008: warning: unused parameter `cv' Perl.c: In function `XS_DBD__Perl__st_DESTROY': Perl.c:1054: warning: unused parameter `cv' Perl.c: In function `boot_DBD__Perl': Perl.c:1106: warning: unused parameter `cv' *** Error code 1
      make: Fatal error: Command failed for target `Perl.o'

      The perl -v is: This is perl, v5.8.0 built for sun4-solaris-thread-multi

      Thanks

        You're trying to use gcc to compile DBI, are you sure your perl was compiled with gcc? Note that you need to use perl -V, not  perl -v to see what compiler was used to compile perl. For example,
        $ perl -V | grep -A1 Compiler Compiler: cc='cc', ccflags ='-g -pipe -fno-common -DPERL_DARWIN -no-cpp-prec +omp -fno-strict-aliasing -I/usr/local/include',