Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

DBD::SQLite install fails

by Anonymous Monk
on Jun 04, 2014 at 14:35 UTC ( #1088655=perlquestion: print w/replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Error is

Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications

Solaris 10

This is perl 5, version 18, subversion 2 (v5.18.2) built for sun4-sola +ris-thread-multi-64

DBD::SQLite 1.42

gcc version 4.9.0 (GCC)

cpan DBD::SQLite throws:

Running install for module 'DBD::SQLite' Checksum for /app/appname/develop/source/cpan/authors/id/I/IS/ISHIGAKI +/DBD-SQLite-1.42.tar.gz ok Configuring I/IS/ISHIGAKI/DBD-SQLite-1.42.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Using DBI 1.631 (for perl 5.018002 on sun4-solaris-thread-multi-64) in +stalled in /app/appname/perl/lib/site_perl/5.18.2/sun4-solaris-thread +-multi-64/auto/DBI/ Writing Makefile for DBD::SQLite Writing MYMETA.yml and MYMETA.json ISHIGAKI/DBD-SQLite-1.42.tar.gz /app/appname/perl/bin/perl Makefile.PL -- OK Running make for I/IS/ISHIGAKI/DBD-SQLite-1.42.tar.gz cp lib/DBD/ blib/lib/DBD/ cp lib/DBD/SQLite/Cookbook.pod blib/lib/DBD/SQLite/Cookbook.pod /app/appname/perl/bin/perl -p -e "s/~DRIVER~/SQLite/g" /app/appname/pe +rl/lib/site_perl/5.18.2/sun4-solaris-thread-multi-64/auto/DBI/Driver. +xst > SQLite.xsi /app/appname/perl/bin/perl /app/appname/perl/lib/5.18.2/ExtUtils/xsubp +p -typemap /app/appname/perl/lib/5.18.2/ExtUtils/typemap -typemap ty +pemap SQLite.xs > SQLite.xsc && mv SQLite.xsc SQLite.c /app/appname/sfw/bin/gcc -c -I. -I/app/appname/perl/lib/site_perl/5.1 +8.2/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -O2 -DVERSION=\"1.4 +2\" -DXS_VERSION=\"1.42\" -fPIC "-I/app/appname/perl/lib/5.18.2/sun4- +solaris-thread-multi-64/CORE" -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_F +TS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA + -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 -DHAVE_USLEEP=1 SQLite.c /app/appname/sfw/bin/gcc -c -I. -I/app/appname/perl/lib/site_perl/5.1 +8.2/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -O2 -DVERSION=\"1.4 +2\" -DXS_VERSION=\"1.42\" -fPIC "-I/app/appname/perl/lib/5.18.2/sun4- +solaris-thread-multi-64/CORE" -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_F +TS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA + -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 -DHAVE_USLEEP=1 dbdimp.c /app/appname/sfw/bin/gcc -c -I. -I/app/appname/perl/lib/site_perl/5.1 +8.2/sun4-solaris-thread-multi-64/auto/DBI -D_REENTRANT -mcpu=v9 -m64 +-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE - +D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -O2 -DVERSION=\"1.4 +2\" -DXS_VERSION=\"1.42\" -fPIC "-I/app/appname/perl/lib/5.18.2/sun4- +solaris-thread-multi-64/CORE" -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_F +TS3_PARENTHESIS -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_COLUMN_METADATA + -DSQLITE_ENABLE_STAT3 -DNDEBUG=1 -DHAVE_USLEEP=1 sqlite3.c In file included from /usr/include/stdio.h:21:0, from sqlite3.c:8253: /app/appname/sfw/lib/gcc/sparc-sun-solaris2.10/4.9.0/include-fixed/sys +/feature_tests.h:350:2: error: #error "Compiler or options invalid; U +NIX 03 and POSIX.1-2001 applications require the use of c99" #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applica +tions \ ^ gmake: *** [sqlite3.o] Error 1 ISHIGAKI/DBD-SQLite-1.42.tar.gz /usr/sfw/bin/gmake -- NOT OK Failed during this command: ISHIGAKI/DBD-SQLite-1.42.tar.gz : make NO

How can I resolve this?

Replies are listed 'Best First'.
Re: DBD::SQLite install fails
by mje (Curate) on Jun 04, 2014 at 15:51 UTC

    Perhaps adding -std=c99 to the compiler options might help.

      I do cpan DBD::SQLite, what do I have to do to set an option like this?

        Download DBD::SQLite from the CPAN. Untar it, change into the created dir, run perl Makefile.PL then edit the resulting Makefile. Look for line starting CCFLAGS= (be careful it will be in a comment at the start of the file and it is not that one). Add --std=c99 to the end of that line. Type make, make test, make install.

Re: DBD::SQLite install fails
by taint (Chaplain) on Jun 04, 2014 at 16:15 UTC

    Further research seems to indicate the following might be an option:

    I get past this initial error if I change my C compiler from
    /usr/bin/cc to /usr/bin/c99.


    λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

      Please stop guessing posting things you've not tested or random bran dumps. This distracts from the problem. If you don't know, don't post.

        Troll bait, is welcomed here.

        Have a nice day.

        λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Re: DBD::SQLite install fails
by taint (Chaplain) on Jun 04, 2014 at 15:30 UTC
    Greetings, AM.

    Judging from the output; upgrade your compiler -- your version of C/C++ && related tools.
    It appears your copy of (g)cc is too old. Appears that you need (at lease) 9.9 (c99, as emited in your output).

    I'm not running SUN's Solaris. So I don't have any intimate (specific) knowledge to share for your OS. But I would assume that you have the resources to add/move to a newer C && C++ version. Either by way of source, or in some "package" form. Check your documentation, or Sun/Oracle.

    Best wishes.


    UPDATE: See also C99, for greater detail on c99.

    λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

      "It appears your copy of (g)cc is too old. Appears that you need (at lease) 9.9 (c99, as emited in your output)."

      Are you sure you actually read what they posted? OP states they are using GCC 4.9.0, which is the latest release according to gcc. c99 is not a compiler version it's an older version of the C standard. C99.

      "But I would assume"

      That's a different issue ;)

        Thanks, marto. Didn't catch the OP's reference to their version of (g)cc. Was groking the output from the ERROR. which appeared to complain about the c99 requirement.

        Odd that a newer version wouldn't naturally accept depreciated.

        To the OP; please add -Ddepreciated to your make command.

        That should fix it. :)


        λɐp ʇɑəɹ⅁ ɐ əʌɐɥ puɐ ʻꜱdləɥ ꜱᴉɥʇ ədoH

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1088655]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2018-03-18 06:13 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (228 votes). Check out past polls.