Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

DBD::InterBase (Firebird 1.5.4) compilation troubles on 64 bit Ubuntu 7.10
Hello!

I am trying to compile DBD::InterBase with Firebird 1.5 for a 64bit
(AMD) running
Ubuntu 7.10 (desktop edition) by usage of CPAN (and then manually, look belo
w).

And I got those errors:

cpan> force install DBD::InterBase
Running install for module DBD::InterBase
Running make for E/ED/EDPRATOMO/DBD-InterBase-0.48.tar.gz
Checksum for /root/.cpan/sources/authors/id/E/ED/EDPRATOMO/DBD-
InterBase-0.48.tar.gz ok
DBD-InterBase-0.48/

--cut--

Checking if your kit is complete...
Looks good
Using DBI 1.57 (for perl 5.008008 on x86_64-linux-gnu-thread-multi)
installed in /usr/lib/perl5/auto/DBI/
Writing Makefile for DBD::InterBase
/usr/bin/perl -p -e "s/~DRIVER~/InterBase/g" /usr/lib/perl5/auto/DBI/
Driver.xst > InterBase.xsi
cc -c  -I"/opt/firebird/include" -I"/usr/lib/perl5/auto/DBI" -Wall -
fno-strict-aliasing -O2   -DVERSION=\"0.48\" -DXS_VERSION=\"0.48\" -
fPIC "-I/usr/lib/perl/5.8/CORE"   dbdimp.c
cp lib/DBD/InterBase/TypeInfo.pm blib/lib/DBD/InterBase/TypeInfo.pm
cp InterBase.pm blib/lib/DBD/InterBase.pm
cp lib/DBD/InterBase/GetInfo.pm blib/lib/DBD/InterBase/GetInfo.pm
Running Mkbootstrap for DBD::InterBase ()
/usr/bin/perl /usr/share/perl/5.8/ExtUtils/xsubpp -noprototypes -
typemap /usr/share/perl/5.8/ExtUtils/typemap -typemap typemap
InterBase.xs > InterBase.xsc && mv InterBase.xsc InterBase.c
chmod 644 InterBase.bs
cp InterBase.bs blib/arch/auto/DBD/InterBase/InterBase.bs
chmod 644 blib/arch/auto/DBD/InterBase/InterBase.bs
cc -c  -I"/opt/firebird/include" -I"/usr/lib/perl5/auto/DBI" -Wall -
fno-strict-aliasing -O2   -DVERSION=\"0.48\" -DXS_VERSION=\"0.48\" -
fPIC "-I/usr/lib/perl/5.8/CORE"   InterBase.c
dbdimp.c: In function 'create_cursor_name':
dbdimp.c:60: warning: '0' flag ignored with precision and '%x' printf
format
dbdimp.c:60: warning: format '%016.16x' expects type 'unsigned int',
but argument 3 has type 'isc_stmt_handle'
dbdimp.c: In function 'ib_st_fetch':
dbdimp.c:1459: warning: format '%04d' expects type 'int', but argument
9 has type 'long int'
dbdimp.c:1474: warning: format '%04d' expects type 'int', but argument
6 has type 'long int'
dbdimp.c: In function 'ib_fill_isqlda':
dbdimp.c:2221: warning: format '%d' expects type 'int', but argument 3
has type 'STRLEN'
dbdimp.c:2221: warning: format '%d' expects type 'int', but argument 4
has type 'long unsigned int'
dbdimp.c:2275: warning: format '%d' expects type 'int', but argument 3
has type 'STRLEN'
dbdimp.c:2275: warning: format '%d' expects type 'int', but argument 4
has type 'long unsigned int'
rm -f blib/arch/auto/DBD/InterBase/InterBase.so
LD_RUN_PATH="/opt/firebird/lib" cc  -shared -L/usr/local/lib
InterBase.o dbdimp.o  -o blib/arch/auto/DBD/InterBase/
InterBase.so         \
-L/opt/firebird/lib -lfbclient -ldl          \

/usr/bin/ld: skipping incompatible /opt/firebird/lib/libfbclient.so
when searching for -lfbclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/
4.1.3/../../../../lib/libfbclient.so when searching for -lfbclient
/usr/bin/ld: skipping incompatible /usr/lib/../lib/libfbclient.so when
searching for -lfbclient
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libfbclient.so when
searching for -lfbclient
/usr/bin/ld: skipping incompatible /usr/lib64/libfbclient.so when
searching for -lfbclient
/usr/bin/ld: skipping incompatible /usr/lib/libfbclient.so when
searching for -lfbclient
/usr/bin/ld: cannot find -lfbclient
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/DBD/InterBase/InterBase.so] Error 1
/usr/bin/make -j3 -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible

cpan>

--CUT--

As you see it complains about incompatible version of libfbclient (for 1.x).
I assumed this is about libfbclient not being able to link in 64 bit env. (?
)

[..]

So I installed all 32bit, multilib related packages and manually tweaked

THIS:
--------

"LD_RUN_PATH="/opt/firebird/lib" cc  -shared -L/usr/local/lib
InterBase.o dbdimp.o  -o blib/arch/auto/DBD/InterBase/
InterBase.so  -L/opt/firebird/lib -lfbclient -ldl"

INTO THAT:
-----------------

"LD_RUN_PATH="/opt/firebird/lib" ld -melf_i386  -shared
-L/usr/local/lib InterBase.o dbdimp.o  -o
blib/arch/auto/DBD/InterBase/InterBase.so  -L/opt/firebird/lib
-lfbclient"

--> So it did build and I installed it, however running `a script'
fails to load the shared lib:


SYSTEM--ROOT@zen:/home/ZEN-NET-DB# perl groups-list.pl
install_driver(InterBase) failed: Can't load
'/usr/local/lib/perl/5.8.8/auto/DBD/InterBase/InterBase.so' for module
DBD::InterBase:
/usr/local/lib/perl/5.8.8/auto/DBD/InterBase/InterBase.so: wrong ELF
class: ELFCLASS32 at /usr/lib/perl/5.8/DynaLoader.pm line 225.
at (eval 3) line 3
Compilation failed in require at (eval 3) line 3.
Perhaps a required shared library or dll isn't installed where expected
at groups-list.pl line 5


--> InterBase.so is built against 32-bit libs:

ROOT@zen:/home/ZEN-NET-DB# ldd
/usr/local/lib/perl/5.8.8/auto/DBD/InterBase/InterBase.so
linux-gate.so.1 =>  (0xffffe000)
libfbclient.so.1 => /opt/firebird/lib/libfbclient.so.1 (0xf7e91000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xf7dc6000)
libncurses.so.5 => /lib32/libncurses.so.5 (0xf7d82000)
libcrypt.so.1 => /lib32/libcrypt.so.1 (0xf7d54000)
libm.so.6 => /lib32/libm.so.6 (0xf7d2f000)
libc.so.6 => /lib32/libc.so.6 (0xf7be5000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7be1000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7bc9000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7bbd000)
/lib/ld-linux.so.2 (0x56555000)


--> BUT DBI.so is built againts 64-bit libs:

ROOT@zen:/home/ZEN-NET-DB# ldd /usr/local/lib/perl/5.8.8/auto/DBI/DBI.so
libc.so.6 => /lib/libc.so.6 (0x00002b71f3e6c000)
/lib64/ld-linux-x86-64.so.2 (0x0000555555554000)


My question is: if I build DBI against 32-bit libs will it then work
all together with my the default perl distro in Ubuntu or do I have to
rebuild it also? How to pass `-m32'  and `ld -melf_i386' to respective
sections of CPAN built  Makefiles? How deep should I dig into
rebuilding wit/for 32 bit?

Is my way of tackling with this problem a sane one? If not: what am I
doing wrong?

TIA,
Cheers,

Pawel

--
Registered Linux user #145057 running @ ARM / MIPS / PowerPC / x86 / x86_64
main(){printf("%c%c%c%c%c%c%d%c" ,0x68,0x61,0x78,0x6f,0x72,0x10,0x539,0x0
a);}

Report this thread to moderator Post Follow-up to this message
Old Post
Pawel Suchanecki
04-30-08 09:52 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL DBI archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:40 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.