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

Hello Monks, got a problem compiling/installing the DBD::mysql module on my Solaris 10 machine. I already installed Perl 5.10.1 (5.8.4 was installed, I just installed 5.10.1 too) as well as the DBI module, the Solaris Studio 12.x (for the C/C++ compiler) as well as gcc. If i try to "make" DBD::mysql I always get thousands of theses errors:

"/opt/csw/lib/perl/5.10.1/CORE/proto.h", line 2932: warning:  attribute "unused" is unknown, ignored

as well as

"dbdimp.c", line 2024: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 2157: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 2191: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 2472: warning: implicit function declaration: mysql_g +et_client_version "dbdimp.c", line 2551: warning: implicit function declaration: mysql_g +et_server_version "dbdimp.c", line 3416: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 3478: syntax error before or at: if "dbdimp.c", line 3478: warning: old-style declaration or incorrect typ +e for: row_num "dbdimp.c", line 3478: warning: old-style declaration or incorrect typ +e for: my_ulonglong "dbdimp.c", line 3478: identifier redeclared: my_ulonglong current : int previous: unsigned long long : "/usr/sfw/include/mysql/mysql.h +", line 95 "dbdimp.c", line 3478: syntax error before or at: - "dbdimp.c", line 3492: warning: syntax error: empty declaration "dbdimp.c", line 3493: warning: old-style declaration or incorrect typ +e for: imp_sth "dbdimp.c", line 3493: warning: old-style declaration or incorrect typ +e for: done_desc "dbdimp.c", line 3494: warning: old-style declaration or incorrect typ +e for: imp_sth "dbdimp.c", line 3494: syntax error before or at: -> "dbdimp.c", line 3494: warning: old-style declaration or incorrect typ +e for: fetch_done "dbdimp.c", line 3495: syntax error before or at: } "dbdimp.c", line 3498: warning: old-style declaration or incorrect typ +e for: imp_sth "dbdimp.c", line 3498: warning: old-style declaration or incorrect typ +e for: warning_count "dbdimp.c", line 3500: syntax error before or at: if "dbdimp.c", line 3500: syntax error before or at: -> "dbdimp.c", line 3500: warning: old-style declaration or incorrect typ +e for: com "dbdimp.c", line 3500: warning: old-style declaration or incorrect typ +e for: std "dbdimp.c", line 3500: warning: old-style declaration or incorrect typ +e for: dbistate "dbdimp.c", line 3500: warning: old-style declaration or incorrect typ +e for: debug "dbdimp.c", line 3512: warning: old-style declaration or incorrect typ +e for: imp_sth "dbdimp.c", line 3512: warning: old-style declaration or incorrect typ +e for: row_num "dbdimp.c", line 4028: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 4097: warning: attribute "unused" is unknown, ignore +d "dbdimp.c", line 5219: cannot recover from previous errors cc: acomp failed for dbdimp.c *** Error code 2 make: Fatal error: Command failed for target `dbdimp.o' CAPTTOFU/DBD-mysql-4.020.tar.gz /usr/ccs/bin/make -- NOT OK CPAN: YAML loaded ok (v0.72) Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: CAPTTOFU/DBD-mysql-4.020.tar.gz : make NO

As I'm very new to solaris and perl, I don't quite understand what I should do to solve the problem, maybe someone can help me?

Replies are listed 'Best First'.
Re: DBD::mysql on Solaris 10
by Anonymous Monk on Mar 29, 2012 at 19:40 UTC
      OK, I just installed Perl 5.14.2, with GCC I get a KPIC error message :/ I think I will reinstall the whole system and prepare it for just one C Compiler.