Error compiling DBD

Error compiling DBD

am 27.05.2004 22:40:00 von Drew Skinner

Hi;

I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
DBD to compile.

I've added all the suggested cflags and have searched these achives. I
see similar problems were happening for people last september (wrong
ELFCLASS 64). Below is the full output from make (I don't have the
option of not using a 64 bit binary).

Environment is Solaris 9, gcc 3.3.2 (I do also have Sun CC installed
and have tried it as well)

bash-2.05$ make

rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm
ld: fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
class: ELFCLASS64
ld: fatal: File processing errors. No output written to
blib/arch/auto/DBD/mysql/mysql.so
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1


I tried with some additional libraries:


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.3/sun4-solaris/auto/DBI
-I/usr/local/mysql/include/mysql -m64 -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.3/sun4-solaris/CORE" dbdimp.c
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g"
/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/auto/DBI/D river.xst >
mysql.xsi
/usr/bin/perl /usr/local/lib/perl5/5.8.3/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.3/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.3/sun4-solaris/auto/DBI
-I/usr/local/mysql/include/mysql -m64 -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.3/sun4-solaris/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lposix4 -lcrypt -lgen -lsocket
-lnsl -lm
ld: fatal: file dbdimp.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to
blib/arch/auto/DBD/mysql/mysql.so
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/mysql/mysql.so] Error 1


Any suggestions welcome.

Thanks,


Drew.


-----Original Message-----


--



Drew Skinner
Senior Systems Administrator
The Blueprint Initiative

o: (416) 596-6251
c: (416) 700-1400



--
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: Error compiling DBD

am 27.05.2004 22:47:25 von Jochen Wiedmann

Drew Skinner wrote:
> Hi;
>
> I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
> DBD to compile.
>
> I've added all the suggested cflags and have searched these achives. I
> see similar problems were happening for people last september (wrong
> ELFCLASS 64). Below is the full output from make (I don't have the
> option of not using a 64 bit binary).
>
> Environment is Solaris 9, gcc 3.3.2 (I do also have Sun CC installed
> and have tried it as well)
>
> bash-2.05$ make
>
> rm -f blib/arch/auto/DBD/mysql/mysql.so
> LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm ld:
> fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
> class: ELFCLASS64
> ld: fatal: File processing errors. No output written to

Believe it or not: You have mixed binaries, some 32 bit and some 64 bit. I
cannot tell you which, but that's definite.

According to the error message your libmysqlclient.so is indeed compiled
with 64 bit support. Your Perl doesn't seem to be.


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: Error compiling DBD

am 27.05.2004 22:47:25 von Jochen Wiedmann

Drew Skinner wrote:
> Hi;
>
> I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
> DBD to compile.
>
> I've added all the suggested cflags and have searched these achives. I
> see similar problems were happening for people last september (wrong
> ELFCLASS 64). Below is the full output from make (I don't have the
> option of not using a 64 bit binary).
>
> Environment is Solaris 9, gcc 3.3.2 (I do also have Sun CC installed
> and have tried it as well)
>
> bash-2.05$ make
>
> rm -f blib/arch/auto/DBD/mysql/mysql.so
> LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm ld:
> fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
> class: ELFCLASS64
> ld: fatal: File processing errors. No output written to

Believe it or not: You have mixed binaries, some 32 bit and some 64 bit. I
cannot tell you which, but that's definite.

According to the error message your libmysqlclient.so is indeed compiled
with 64 bit support. Your Perl doesn't seem to be.


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: Error compiling DBD

am 27.05.2004 22:51:25 von Rudy Lippan

On Thu, 27 May 2004, Drew Skinner wrote:

> Hi;
>
> I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
> DBD to compile.
>

> rm -f blib/arch/auto/DBD/mysql/mysql.so
> LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm
> ld: fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
> class: ELFCLASS64

It looks like you are tyring to link 64 & 32 bit code together.


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: Error compiling DBD

am 27.05.2004 22:51:25 von Rudy Lippan

On Thu, 27 May 2004, Drew Skinner wrote:

> Hi;
>
> I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
> DBD to compile.
>

> rm -f blib/arch/auto/DBD/mysql/mysql.so
> LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm
> ld: fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
> class: ELFCLASS64

It looks like you are tyring to link 64 & 32 bit code together.


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: Error compiling DBD

am 27.05.2004 22:55:26 von Drew Skinner

--Boundary_(ID_TGt8PSLWG0OjsD+5BrRUPw)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT

Hi;

Thanks (to you and Jochen) -- I'm going to assume my perl compile is
porked and redo it tomorrow.

All the best,

Drew.

Rudy Lippan wrote:

>On Thu, 27 May 2004, Drew Skinner wrote:
>
>
>
>>Hi;
>>
>>I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
>>DBD to compile.
>>
>>
>>
>
>
>
>>rm -f blib/arch/auto/DBD/mysql/mysql.so
>>LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm
>>ld: fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
>>class: ELFCLASS64
>>
>>
>
>It looks like you are tyring to link 64 & 32 bit code together.
>
>
>Rudy
>
>
>
>
>

--



Drew Skinner
Senior Systems Administrator
The Blueprint Initiative

o: (416) 596-6251
c: (416) 700-1400


--Boundary_(ID_TGt8PSLWG0OjsD+5BrRUPw)--

Re: Error compiling DBD

am 27.05.2004 22:55:26 von Drew Skinner

--Boundary_(ID_TGt8PSLWG0OjsD+5BrRUPw)
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT

Hi;

Thanks (to you and Jochen) -- I'm going to assume my perl compile is
porked and redo it tomorrow.

All the best,

Drew.

Rudy Lippan wrote:

>On Thu, 27 May 2004, Drew Skinner wrote:
>
>
>
>>Hi;
>>
>>I have a 64 bit perl and 64 bit mysql 4.0.20 compiled, but I cannot get
>>DBD to compile.
>>
>>
>>
>
>
>
>>rm -f blib/arch/auto/DBD/mysql/mysql.so
>>LD_RUN_PATH="/usr/local/mysql/lib/mysql:/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/mysql -lmysqlclient -lcrypt -lnsl -lm
>>ld: fatal: file /usr/local/mysql/lib/mysql/libmysqlclient.so: wrong ELF
>>class: ELFCLASS64
>>
>>
>
>It looks like you are tyring to link 64 & 32 bit code together.
>
>
>Rudy
>
>
>
>
>

--



Drew Skinner
Senior Systems Administrator
The Blueprint Initiative

o: (416) 596-6251
c: (416) 700-1400


--Boundary_(ID_TGt8PSLWG0OjsD+5BrRUPw)--