mysql_server_init: referenced symbol not found

mysql_server_init: referenced symbol not found

am 30.03.2007 22:33:45 von lance.preston

------_=_NextPart_001_01C7730A.B694BE18
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

After compiling and installing DBI 1.54 and DBD:mysql 4.004 on Solaris 8
(64-bit sparc), I get a "referenced symbol not found" error:

ld.so.1: test_mysql_access.pl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o: symbol mysql_server_init: referenced symbol not found

I believe I'm having trouble linking to
/usr/local/mysql/lib/libmysqlclient.a, because running "ldd -r" on
mysql.so turns up lots of missing references:

# ldd -r
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o
librt.so.1 =3D> /usr/lib/librt.so.1
libgen.so.1 =3D> /usr/lib/libgen.so.1
libsocket.so.1 =3D> /usr/lib/libsocket.so.1
libnsl.so.1 =3D> /usr/lib/libnsl.so.1
libm.so.1 =3D> /usr/lib/libm.so.1
libc.so.1 =3D> /usr/lib/libc.so.1
libaio.so.1 =3D> /usr/lib/libaio.so.1
libdl.so.1 =3D> /usr/lib/libdl.so.1
libmp.so.2 =3D> /usr/lib/libmp.so.2
symbol not found: main
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
symbol not found: mysql_real_escape_string
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_server_init
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_init
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_options
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_real_connect
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_errno
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_error
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_sqlstate
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_commit
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_rollback
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)

<<<<<<<< Output Truncated >>>>>>>>>>>>>>>>>

But I am including the location of mysql.h (/usr/local/mysql/include)
and libmysqlclient.a (/usr/local/mysql/lib) in the build:

# /usr/local/bin/perl Makefile.PL
--mysql_config=3D/usr/local/mysql/bin/mysql_config.lap =
PREFIX=3D/usr/local
I will use the following settings for compiling and testing:

cflags (mysql_config) =3D -I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a
embedded (guessed ) =
libs (mysql_config) =3D -lz -lposix4 -lgen -lsocket -lnsl -lm
-L/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE -lperl
-L/usr/local/mysql/lib -lmysqlclient
mysql_config (Users choice) =3D /usr/local/mysql/bin/mysql_config.lap
nocatchstderr (default ) =3D 0
nofoundrows (default ) =3D 0
ssl (guessed ) =3D 0
testdb (default ) =3D test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =

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

Using DBI 1.54 (for perl 5.008007 on sun4-solaris) installed in
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/

# make
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI
-I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=3D64 -O -DVERSION=3D\"4.004\" =
-DXS_VERSION=3D\"4.004\"
-fPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE" dbdimp.c
gcc: /usr/local/mysql/lib/libmysqlclient.a: linker input file unused
because linking not done
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI
-I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=3D64 -O -DVERSION=3D\"4.004\" =
-DXS_VERSION=3D\"4.004\"
-fPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE" mysql.c
gcc: /usr/local/mysql/lib/libmysqlclient.a: 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=3D"/usr/lib" /usr/local/bin/perl myld gcc -G =
-L/usr/local/lib
dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -lz -lposix4
-lgen -lsocket -lnsl -lm -L/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
-lperl -L/usr/local/mysql/lib -lmysqlclient =20
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Bundle::DBD::mysql.3

# make install
Installing
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree
Writing
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/.packli
st
Appending installation info to
/usr/local/lib/perl5/5.8.7/sun4-solaris/perllocal.pod


I am using Perl 5.8.7, gcc 3.4.6, make 3.81, and mysql 4.1.22 (64-bit)

I also tried adding /usr/local/mysql/lib to my LD_LIBRARY_PATH, but that
does not help. I also had the same issue with DBI 1.53 and DBD:mysql
4.003.=20

Why do I get "referenced symbol not found" when the missing references
are defined in libmysqlclient.a and that path is included in the linker?
And what can I do to fix this?

Thanks for your help!

Lance Preston

------_=_NextPart_001_01C7730A.B694BE18--

RE: mysql_server_init: referenced symbol not found

am 26.04.2007 23:57:01 von lance.preston

I never received a response to this question, and this is still an issue
for me.=20
Anyone have any ideas of what to try? I'm out of guesses.

Thanks.
Lance



-----Original Message-----
From: Preston, Lance A
Sent: Friday, March 30, 2007 3:34 PM
To: perl@lists.mysql.com
Subject: mysql_server_init: referenced symbol not found


After compiling and installing DBI 1.54 and DBD:mysql 4.004 on Solaris 8
(64-bit sparc), I get a "referenced symbol not found" error:

ld.so.1: test_mysql_access.pl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o: symbol mysql_server_init: referenced symbol not found

I believe I'm having trouble linking to
/usr/local/mysql/lib/libmysqlclient.a, because running "ldd -r" on
mysql.so turns up lots of missing references:

# ldd -r
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o
librt.so.1 =3D> /usr/lib/librt.so.1
libgen.so.1 =3D> /usr/lib/libgen.so.1
libsocket.so.1 =3D> /usr/lib/libsocket.so.1
libnsl.so.1 =3D> /usr/lib/libnsl.so.1
libm.so.1 =3D> /usr/lib/libm.so.1
libc.so.1 =3D> /usr/lib/libc.so.1
libaio.so.1 =3D> /usr/lib/libaio.so.1
libdl.so.1 =3D> /usr/lib/libdl.so.1
libmp.so.2 =3D> /usr/lib/libmp.so.2
symbol not found: main
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
/usr/platform/SUNW,Sun-Fire-V440/lib/libc_psr.so.1
symbol not found: mysql_real_escape_string
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_server_init
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_init
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_options
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_real_connect
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_errno
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_error
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_sqlstate
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_commit
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)
symbol not found: mysql_rollback
(/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/ mysql/mysql.
so)

<<<<<<<< Output Truncated >>>>>>>>>>>>>>>>>

But I am including the location of mysql.h (/usr/local/mysql/include)
and libmysqlclient.a (/usr/local/mysql/lib) in the build:

# /usr/local/bin/perl Makefile.PL
--mysql_config=3D/usr/local/mysql/bin/mysql_config.lap =
PREFIX=3D/usr/local I
will use the following settings for compiling and testing:

cflags (mysql_config) =3D -I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a
embedded (guessed ) =
libs (mysql_config) =3D -lz -lposix4 -lgen -lsocket -lnsl -lm
-L/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE -lperl
-L/usr/local/mysql/lib -lmysqlclient
mysql_config (Users choice) =3D /usr/local/mysql/bin/mysql_config.lap
nocatchstderr (default ) =3D 0
nofoundrows (default ) =3D 0
ssl (guessed ) =3D 0
testdb (default ) =3D test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =

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

Using DBI 1.54 (for perl 5.008007 on sun4-solaris) installed in
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI/

# make
gcc -c -I/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI
-I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=3D64 -O -DVERSION=3D\"4.004\" =
-DXS_VERSION=3D\"4.004\"
-fPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE" dbdimp.c
gcc: /usr/local/mysql/lib/libmysqlclient.a: linker input file unused
because linking not done gcc -c
-I/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBI
-I/usr/local/mysql/include
-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
/usr/local/mysql/lib/libmysqlclient.a -DDBD_MYSQL_INSERT_ID_IS_GOOD -g
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=3D64 -O -DVERSION=3D\"4.004\" =
-DXS_VERSION=3D\"4.004\"
-fPIC "-I/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE" mysql.c
gcc: /usr/local/mysql/lib/libmysqlclient.a: 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=3D"/usr/lib"
/usr/local/bin/perl myld gcc -G -L/usr/local/lib
dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -lz -lposix4
-lgen -lsocket -lnsl -lm -L/usr/local/lib/perl5/5.8.7/sun4-solaris/CORE
-lperl -L/usr/local/mysql/lib -lmysqlclient =20
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3
Manifying blib/man3/DBD::mysql::INSTALL.3
Manifying blib/man3/Bundle::DBD::mysql.3

# make install
Installing
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/mysql.s
o
Files found in blib/arch: installing files in blib/lib into architecture
dependent library tree Writing
/usr/local/lib/perl5/site_perl/5.8.7/sun4-solaris/auto/DBD/m ysql/.packli
st
Appending installation info to
/usr/local/lib/perl5/5.8.7/sun4-solaris/perllocal.pod


I am using Perl 5.8.7, gcc 3.4.6, make 3.81, and mysql 4.1.22 (64-bit)

I also tried adding /usr/local/mysql/lib to my LD_LIBRARY_PATH, but that
does not help. I also had the same issue with DBI 1.53 and DBD:mysql
4.003.=20

Why do I get "referenced symbol not found" when the missing references
are defined in libmysqlclient.a and that path is included in the linker?
And what can I do to fix this?

Thanks for your help!

Lance Preston

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

RE: mysql_server_init: referenced symbol not found

am 27.04.2007 08:52:33 von User Patrice

Hello

I have this problem too on freebsd.
I have posted what i think in : http://lists.mysql.com/perl/4043
i have deleted the line in #else (mysql_server_init(-1,...)) and now, this works fine.

-----Message d'origine-----
De : Preston, Lance A [mailto:lance.preston@eds.com]
Envoyé : jeudi 26 avril 2007 23:57
À : perl@lists.mysql.com
Objet : RE: mysql_server_init: referenced symbol not found

I never received a response to this question, and this is still an issue
for me.
Anyone have any ideas of what to try? I'm out of guesses.

Thanks.
Lance



--
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