Help with solaris 9 install

Help with solaris 9 install

am 11.02.2004 22:29:39 von Ian Miller

Solaris 9 with gcc
mysql 4.0 binary install
perl 5.8.2


the perl MCPAN auto install does not seem to work
so I tried a download and run the config.
I am not the big of a perl guy so I am not sure how to solve this

here is the out put I got

bash-2.05# perl Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
readline() on closed filehandle PIPE at Makefile.PL line 176.
I will use the following settings for compiling and testing:

cflags (guessed) = -I/usr/local/mysql/include
libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
nocatchstderr (default) = 0
nofoundrows (default) = 0
ssl (guessed) = 0
testdb (default) = test
testhost (default) =
testpassword (default) =
testuser (default) =

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

Note (probably harmless): No library found for -lgz
Using DBI 1.40 (for perl 5.008002 on sun4-solaris) installed in
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
Writing Makefile for DBD::mysql



####### Here is my gcc info

bash-2.05# gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2


A point in the right direction or were to look would be great.
Thanks for any help
-Ian

--
Ian Miller
Sr. Systems Engineer
University of Chicago
imiller@bsd.uchicago.edu

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 01:18:50 von Garry Williams

On Wed, Feb 11, 2004 at 15:29:39 -0600, Ian Miller wrote:

[snip]

> bash-2.05# perl Makefile.PL
> Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
> readline() on closed filehandle PIPE at Makefile.PL line 176.

If mysql is installed on the machine, the mysql_config program is not
in your path. The Makefile.PL script uses that program to determine
how to configure the Perl XS module to link with the mysql client
library.

[snip]

> cflags (guessed) = -I/usr/local/mysql/include
> libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz

Without the mysql_config program the guess is that you need libgz.

> nocatchstderr (default) = 0
> nofoundrows (default) = 0
> ssl (guessed) = 0
> testdb (default) = test
> testhost (default) =
> testpassword (default) =
> testuser (default) =
>
> To change these settings, see 'perl Makefile.PL --help' and
> 'perldoc INSTALL'.
>
> Note (probably harmless): No library found for -lgz

If you do need to link with libgz, it cannot be found. This may or
may not be a problem.

I would set the path to find mysql_config and try again.

--
Garry Williams, Zvolve Systems, Inc., +1 770 813-4934

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 01:18:50 von Garry Williams

On Wed, Feb 11, 2004 at 15:29:39 -0600, Ian Miller wrote:

[snip]

> bash-2.05# perl Makefile.PL
> Can't exec "mysql_config": No such file or directory at Makefile.PL line 174.
> readline() on closed filehandle PIPE at Makefile.PL line 176.

If mysql is installed on the machine, the mysql_config program is not
in your path. The Makefile.PL script uses that program to determine
how to configure the Perl XS module to link with the mysql client
library.

[snip]

> cflags (guessed) = -I/usr/local/mysql/include
> libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz

Without the mysql_config program the guess is that you need libgz.

> nocatchstderr (default) = 0
> nofoundrows (default) = 0
> ssl (guessed) = 0
> testdb (default) = test
> testhost (default) =
> testpassword (default) =
> testuser (default) =
>
> To change these settings, see 'perl Makefile.PL --help' and
> 'perldoc INSTALL'.
>
> Note (probably harmless): No library found for -lgz

If you do need to link with libgz, it cannot be found. This may or
may not be a problem.

I would set the path to find mysql_config and try again.

--
Garry Williams, Zvolve Systems, Inc., +1 770 813-4934

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 20:17:44 von Ian Miller

OK I added /usr/local/mysql/bin to the path but know I get a different error
it looks like gcc does not like it ... ?

############################################################ ##############
Checking if your kit is complete...
Looks good
Using DBI 1.40 (for perl 5.008002 on sun4-solaris) installed in
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
Writing Makefile for DBD::mysql
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
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
-I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" dbdimp.c
gcc: unrecognized option `-Xa'
gcc: language arch=v9 not recognized
gcc: dbdimp.c: linker input file unused because linking not done
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g"
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI/D river.xst > mysql.xsi
/usr/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.2/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 192
Warning: duplicate function definition 'rows' detected in mysql.xs, line 290
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
-I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" mysql.c
gcc: unrecognized option `-Xa'
gcc: language arch=v9 not recognized
gcc: mysql.c: linker input file unused because linking not done
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld gcc -G -L/usr/local/lib dbdimp.o
mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib
-lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
gcc: dbdimp.o: No such file or directory
gcc: mysql.o: No such file or directory
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
/usr/local/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
??
-Ian


Quoting Garry Williams :

> On Wed, Feb 11, 2004 at 15:29:39 -0600, Ian Miller wrote:
>
> [snip]
>
> > bash-2.05# perl Makefile.PL
> > Can't exec "mysql_config": No such file or directory at Makefile.PL line
> 174.
> > readline() on closed filehandle PIPE at Makefile.PL line 176.
>
> If mysql is installed on the machine, the mysql_config program is not
> in your path. The Makefile.PL script uses that program to determine
> how to configure the Perl XS module to link with the mysql client
> library.
>
> [snip]
>
> > cflags (guessed) = -I/usr/local/mysql/include
> > libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
>
> Without the mysql_config program the guess is that you need libgz.
>
> > nocatchstderr (default) = 0
> > nofoundrows (default) = 0
> > ssl (guessed) = 0
> > testdb (default) = test
> > testhost (default) =
> > testpassword (default) =
> > testuser (default) =
> >
> > To change these settings, see 'perl Makefile.PL --help' and
> > 'perldoc INSTALL'.
> >
> > Note (probably harmless): No library found for -lgz
>
> If you do need to link with libgz, it cannot be found. This may or
> may not be a problem.
>
> I would set the path to find mysql_config and try again.
>
> --
> Garry Williams, Zvolve Systems, Inc., +1 770 813-4934
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:
> http://lists.mysql.com/perl?unsub=sugiarto.Then@infotronik.c om
>
>


--
Ian Miller
Sr. Systems Engineer
University of Chicago
imiller@bsd.uchicago.edu

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 20:17:44 von Ian Miller

OK I added /usr/local/mysql/bin to the path but know I get a different error
it looks like gcc does not like it ... ?

############################################################ ##############
Checking if your kit is complete...
Looks good
Using DBI 1.40 (for perl 5.008002 on sun4-solaris) installed in
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
Writing Makefile for DBD::mysql
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
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
-I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" dbdimp.c
gcc: unrecognized option `-Xa'
gcc: language arch=v9 not recognized
gcc: dbdimp.c: linker input file unused because linking not done
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g"
/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI/D river.xst > mysql.xsi
/usr/bin/perl /usr/local/lib/perl5/5.8.2/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.2/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 192
Warning: duplicate function definition 'rows' detected in mysql.xs, line 290
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
-I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
"-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" mysql.c
gcc: unrecognized option `-Xa'
gcc: language arch=v9 not recognized
gcc: mysql.c: linker input file unused because linking not done
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld gcc -G -L/usr/local/lib dbdimp.o
mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib
-lmysqlclient -lposix4 -lcrypt -lgen -lsocket -lnsl -lm
gcc: dbdimp.o: No such file or directory
gcc: mysql.o: No such file or directory
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1
/usr/local/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
??
-Ian


Quoting Garry Williams :

> On Wed, Feb 11, 2004 at 15:29:39 -0600, Ian Miller wrote:
>
> [snip]
>
> > bash-2.05# perl Makefile.PL
> > Can't exec "mysql_config": No such file or directory at Makefile.PL line
> 174.
> > readline() on closed filehandle PIPE at Makefile.PL line 176.
>
> If mysql is installed on the machine, the mysql_config program is not
> in your path. The Makefile.PL script uses that program to determine
> how to configure the Perl XS module to link with the mysql client
> library.
>
> [snip]
>
> > cflags (guessed) = -I/usr/local/mysql/include
> > libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lgz
>
> Without the mysql_config program the guess is that you need libgz.
>
> > nocatchstderr (default) = 0
> > nofoundrows (default) = 0
> > ssl (guessed) = 0
> > testdb (default) = test
> > testhost (default) =
> > testpassword (default) =
> > testuser (default) =
> >
> > To change these settings, see 'perl Makefile.PL --help' and
> > 'perldoc INSTALL'.
> >
> > Note (probably harmless): No library found for -lgz
>
> If you do need to link with libgz, it cannot be found. This may or
> may not be a problem.
>
> I would set the path to find mysql_config and try again.
>
> --
> Garry Williams, Zvolve Systems, Inc., +1 770 813-4934
>
> --
> MySQL Perl Mailing List
> For list archives: http://lists.mysql.com/perl
> To unsubscribe:
> http://lists.mysql.com/perl?unsub=sugiarto.Then@infotronik.c om
>
>


--
Ian Miller
Sr. Systems Engineer
University of Chicago
imiller@bsd.uchicago.edu

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:26:31 von WC Jones

>Ian Miller wrote:
>
>> gcc: unrecognized option `-Xa'
>> gcc: language arch=v9 not recognized
>> gcc: dbdimp.c: linker input file unused because linking not done


Hints -

CC="gcc"
CFLAGS="-O3 -mcpu=ultrasparc"

CXX="g++"
CXXFLAGS="-O3 -mcpu=ultrasparc"

LDFLAGS="-L/usr/local/lib"
CPPFLAGS="-I/usr/local/include"

export CC CFLAGS CXX CXXFLAGS LDFLAGS CPPFLAGS


And/or the Solaris crle command as well...

-Sx-


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:26:31 von WC Jones

>Ian Miller wrote:
>
>> gcc: unrecognized option `-Xa'
>> gcc: language arch=v9 not recognized
>> gcc: dbdimp.c: linker input file unused because linking not done


Hints -

CC="gcc"
CFLAGS="-O3 -mcpu=ultrasparc"

CXX="g++"
CXXFLAGS="-O3 -mcpu=ultrasparc"

LDFLAGS="-L/usr/local/lib"
CPPFLAGS="-I/usr/local/include"

export CC CFLAGS CXX CXXFLAGS LDFLAGS CPPFLAGS


And/or the Solaris crle command as well...

-Sx-


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:27:35 von Jochen Wiedmann

Ian Miller wrote:

> gcc: unrecognized option `-Xa'
> gcc: language arch=v9 not recognized
> gcc: dbdimp.c: linker input file unused because linking not done

Looks like you are using binaries from various sources, for example a binary
from www.mysql.com and a Perl compiled by you. It is strongly recommended to
compile everything with a single compiler.


Jochen


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:27:35 von Jochen Wiedmann

Ian Miller wrote:

> gcc: unrecognized option `-Xa'
> gcc: language arch=v9 not recognized
> gcc: dbdimp.c: linker input file unused because linking not done

Looks like you are using binaries from various sources, for example a binary
from www.mysql.com and a Perl compiled by you. It is strongly recommended to
compile everything with a single compiler.


Jochen


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:28:29 von Garry Williams

On Thu, Feb 12, 2004 at 13:17:44 -0600, Ian Miller wrote:
> OK I added /usr/local/mysql/bin to the path but know I get a different error
> it looks like gcc does not like it ... ?
>
> ############################################################ ##############
> Checking if your kit is complete...
> Looks good
> Using DBI 1.40 (for perl 5.008002 on sun4-solaris) installed in
> /usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
> Writing Makefile for DBD::mysql
> 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
> gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
> -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
> "-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" dbdimp.c
> gcc: unrecognized option `-Xa'
> gcc: language arch=v9 not recognized

This tells me that the mysql client libraries were built with the Sun
compiler originally. The -Xa option and -xarch=v9 are Sun compiler
options -- not gcc options. I assume that mysql_config supplied
these.

On the other hand, your Perl was built with gcc apparently, because
the compiler command is a part of the Perl installation that MakeMaker
uses.

One possibility would be to obtain the mysql distribution and build it
yourself with gcc. Another would be to explicitly supply ccflags and
ldflags to the perl Makefile.PL step according to the documentation.

I probably would do the former. That way I wouldn't be fighting the
system. :-)

[snip]

--
Garry Williams, Zvolve Systems, Inc., +1 770 813-4934

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: Help with solaris 9 install

am 12.02.2004 21:28:29 von Garry Williams

On Thu, Feb 12, 2004 at 13:17:44 -0600, Ian Miller wrote:
> OK I added /usr/local/mysql/bin to the path but know I get a different error
> it looks like gcc does not like it ... ?
>
> ############################################################ ##############
> Checking if your kit is complete...
> Looks good
> Using DBI 1.40 (for perl 5.008002 on sun4-solaris) installed in
> /usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
> Writing Makefile for DBD::mysql
> 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
> gcc -c -I/usr/local/lib/perl5/site_perl/5.8.2/sun4-solaris/auto/DBI
> -I/usr/local/mysql/include -Xa -xstrconst -mt -D_FORTEC_ -xarch=v9
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE
> -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.9003\" -DXS_VERSION=\"2.9003\" -fPIC
> "-I/usr/local/lib/perl5/5.8.2/sun4-solaris/CORE" dbdimp.c
> gcc: unrecognized option `-Xa'
> gcc: language arch=v9 not recognized

This tells me that the mysql client libraries were built with the Sun
compiler originally. The -Xa option and -xarch=v9 are Sun compiler
options -- not gcc options. I assume that mysql_config supplied
these.

On the other hand, your Perl was built with gcc apparently, because
the compiler command is a part of the Perl installation that MakeMaker
uses.

One possibility would be to obtain the mysql distribution and build it
yourself with gcc. Another would be to explicitly supply ccflags and
ldflags to the perl Makefile.PL step according to the documentation.

I probably would do the former. That way I wouldn't be fighting the
system. :-)

[snip]

--
Garry Williams, Zvolve Systems, Inc., +1 770 813-4934

--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

DBD::mysql - Setting a SELECT result set to a Scalar

am 16.02.2004 19:34:41 von Nick Thomson

Hi there mysql community! Based on the subject line of this e-mail, I
imagine it is quite evident that I am a newbie when it comes to
DBD::mysql. I'm using the Perl Mod: DBD::mysql and the script below is
a customization of a script I pulled off of the mod's doc found at:

http://search.cpan.org/~rudy/DBD-mysql-2.9003/lib/DBD/mysql. pm

Basically, my goal is to connect to my DB (profit_test), run the
following query: SELECT Date FROM links where Pkey = "2"; and set the
result set of the query to a scalar... all within a perl program.

I looked over the man page at the URL mentioned above to come up with
the following script:


#!/usr/bin/perl

use DBI();

# Connect to the database.
my $dbh =
DBI->connect("DBI:mysql:database=profit_test;host=localhost" ,
"arrow", "head",
{'RaiseError' => 1});

my $sth = $dbh->prepare("SELECT Date FROM links where Pkey = "2");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
print "Found a row: id = $ref->{'Date'}, name = $ref->{'links'}\n";
}
print $sth;
print $dbh;

$sth->finish();

After running this script, I run into the following error message:


Number found where operator expected at sql1.pl line 10, near ""SELECT
Date FROM links where Pkey = "2"
(Missing operator before 2?)
String found where operator expected at sql1.pl line 13, near "print ""
(Might be a runaway multi-line "" string starting on line 10)
(Missing semicolon on previous line?)
Bareword found where operator expected at sql1.pl line 13, near "print
"Found"
(Do you need to predeclare print?)
syntax error at sql1.pl line 10, near ""SELECT Date FROM links where
Pkey = "2"
Execution of sql1.pl aborted due to compilation errors.

As mentioned earlier, all I really want to accomplish is to run the
following query: SELECT Date FROM links where Pkey = "2"; and set the
result set of the query to a scalar. I am using a mySQL database, is
DBD::mysql the wrong Mod to accomplish this? Is there an easier method
that I am unaware of?

Any assistance with regards to setting a SELECT result set to a Scalar
would be greatly appreciated!


Thanks in advance,

-Nick



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

DBD::mysql - Setting a SELECT result set to a Scalar

am 16.02.2004 19:34:41 von Nick Thomson

Hi there mysql community! Based on the subject line of this e-mail, I
imagine it is quite evident that I am a newbie when it comes to
DBD::mysql. I'm using the Perl Mod: DBD::mysql and the script below is
a customization of a script I pulled off of the mod's doc found at:

http://search.cpan.org/~rudy/DBD-mysql-2.9003/lib/DBD/mysql. pm

Basically, my goal is to connect to my DB (profit_test), run the
following query: SELECT Date FROM links where Pkey = "2"; and set the
result set of the query to a scalar... all within a perl program.

I looked over the man page at the URL mentioned above to come up with
the following script:


#!/usr/bin/perl

use DBI();

# Connect to the database.
my $dbh =
DBI->connect("DBI:mysql:database=profit_test;host=localhost" ,
"arrow", "head",
{'RaiseError' => 1});

my $sth = $dbh->prepare("SELECT Date FROM links where Pkey = "2");
$sth->execute();
while (my $ref = $sth->fetchrow_hashref()) {
print "Found a row: id = $ref->{'Date'}, name = $ref->{'links'}\n";
}
print $sth;
print $dbh;

$sth->finish();

After running this script, I run into the following error message:


Number found where operator expected at sql1.pl line 10, near ""SELECT
Date FROM links where Pkey = "2"
(Missing operator before 2?)
String found where operator expected at sql1.pl line 13, near "print ""
(Might be a runaway multi-line "" string starting on line 10)
(Missing semicolon on previous line?)
Bareword found where operator expected at sql1.pl line 13, near "print
"Found"
(Do you need to predeclare print?)
syntax error at sql1.pl line 10, near ""SELECT Date FROM links where
Pkey = "2"
Execution of sql1.pl aborted due to compilation errors.

As mentioned earlier, all I really want to accomplish is to run the
following query: SELECT Date FROM links where Pkey = "2"; and set the
result set of the query to a scalar. I am using a mySQL database, is
DBD::mysql the wrong Mod to accomplish this? Is there an easier method
that I am unaware of?

Any assistance with regards to setting a SELECT result set to a Scalar
would be greatly appreciated!


Thanks in advance,

-Nick



--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql - Setting a SELECT result set to a Scalar

am 16.02.2004 19:49:57 von Rudy Lippan

On Mon, 16 Feb 2004, Nick Thomson wrote:

> #!/usr/bin/perl
>
> use DBI();
>
> # Connect to the database.
> my $dbh =
> DBI->connect("DBI:mysql:database=profit_test;host=localhost" ,
> "arrow", "head",
> {'RaiseError' => 1});
>
> my $sth = $dbh->prepare("SELECT Date FROM links where Pkey = "2");
^^ ^^^^^^

You have a syntax error here. Just as a suggestion, you might want to look
into q and qq when quoting data that contains quotes.

$dbh->prepare(q{SELECT Date FROM links WHERE Pkey = '2'});


Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org

Re: DBD::mysql - Setting a SELECT result set to a Scalar

am 16.02.2004 19:49:57 von Rudy Lippan

On Mon, 16 Feb 2004, Nick Thomson wrote:

> #!/usr/bin/perl
>
> use DBI();
>
> # Connect to the database.
> my $dbh =
> DBI->connect("DBI:mysql:database=profit_test;host=localhost" ,
> "arrow", "head",
> {'RaiseError' => 1});
>
> my $sth = $dbh->prepare("SELECT Date FROM links where Pkey = "2");
^^ ^^^^^^

You have a syntax error here. Just as a suggestion, you might want to look
into q and qq when quoting data that contains quotes.

$dbh->prepare(q{SELECT Date FROM links WHERE Pkey = '2'});


Rudy


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org