FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

LinkBack Thread Tools
Old 06-04-2008, 04:12 PM
Michael Higgins
Default DBD-ODBC installation problem

Folks —

I'm having a problem getting a working *-perl/DBD-ODBC. I had one that
was working just fine, but un-merged unixODBC in a fit of pique, or
something. I re-emerged it, but then DBD-ODBC segfaults.

So, getting to debug I:

export LD_LIBRARY_PATH=/usr LANG="" ODBCHOME=/usr ; FEATURES="nostrip"
emerge -aDv DBD-ODBC :


Using ODBC in /usr

Umm, this looks like a unixodbc type of driver manager.
We expect to find the sql.h, sqlext.h and (which were
supplied with unixODBC) in $ODBCHOME/include directory alongside
the /usr/lib/libodbc.a /usr/lib/libodbc.so library in $ODBCHOME/lib

Warning: LD_LIBRARY_PATH doesn't include /usr

Checking if your kit is complete...
Looks good
Using DBI 1.601 (for perl 5.008008 on i586-linux) installed
in /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBI/ Using DBI
1.601 (for perl 5.008008 on i586-linux) installed
in /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBI/ Writing
Makefile for DBD::ODBC

The DBD::ODBC tests will use these values for the database connection:
DBI_DSN= e.g. dbi:ODBC:demo
Warning: not all required environment variables are set.

[But these are just for the tests which aren't enabled anyway.]

. . .

' isql -vv TREX user pass ' works just fine. So, unixODBC is working as
it should.

perl -MDBI -e 'use DBI;
my $db=DBI->connect("dbi:mysql:dbtest","user","pass")'

... also works, so problem not with DBI.

Anyway, a simple script:

perl -MDBI -e 'use DBI;
my $db=DBI->connect("dbi:ODBC:TREX","_user","XXXXXX")'

Segmentation fault

I've tried different versions.... no joy. Always, the same result.

GDB output:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7dbd6c0 (LWP 23716)]
_SQLGetDiagRec (handleType=2, handle=<value optimized out>,
numRecord=1, szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
at error.c:525
525 error.c: No such file or directory.
in error.c
(gdb) bt'
#0 _SQLGetDiagRec (handleType=2, handle=<value optimized out>,
numRecord=1, szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
at error.c:525
result = <value optimized out>
errs = (struct _sql_errors *) 0x8280584
p = <value optimized out>
odbc_ver = <value optimized out>
msgprefix = "[FreeTDS][SQL Server]"
#1 0xb7b8cdfb in SQLError (henv=0x827ffd8, hdbc=0x8280568, hstmt=0x0,
szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
at error.c:590
result = <value optimized out>
errs = (struct _sql_errors *) 0x8280584
handle = (SQLHANDLE) 0x8280568
#2 0xb7c6eb4d in AllODBCErrors ()
from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
No symbol table info available.
#3 0xb7c75f97 in odbc_db_login6 ()
from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
No symbol table info available.
#4 0xb7c6e206 in XS_DBD__ODBC__db__login ()
---Type <return> to continue, or q <return> to quit---
from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
No symbol table info available.
#5 0x080bb04f in Perl_pp_entersub ()
No symbol table info available.
#6 0x080b98c5 in Perl_runops_standard ()
No symbol table info available.
#7 0x08065450 in ?? ()
No symbol table info available.
#8 0x0813cff4 in ?? ()
No symbol table info available.
#9 0x08140428 in PL_reg_oldsavedlen ()
No symbol table info available.
#10 0xbfdffaf8 in ?? ()
No symbol table info available.
#11 0x08066004 in Perl_call_sv ()
No symbol table info available.
Backtrace stopped: frame did not save the PC

strace -otracedump perl -MDBI -e 'use DBI; my

output viewable here:

What do I do next? I have a working installation on another machine.
Versions are all the same. And this was working previously, somehow.

Can anyone make a clue out of the debug output?

Are there any gentoo-type methods to employ in an attempt to fix this
problem, like some kind of massive re-emergence? I already re-emerged
perl, ran perl-cleaner to rebuild all the modules. This after
I re-emerged (in order) FreeTDS, unixODBC, DBD-ODBC. No difference.

What next? This can't be impossible, though I did note that this
package is proposed for bugday under "Randomly selected open bugs".
Maybe I can just wait 'till Monday (or do I really need to hang out on
IRC on Saturday?)

Emerging 'pidgin', just in case.

emerge --info:

Portage (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 i686)
================================================== ===============
System uname: 2.6.23-gentoo-r8 i686 AMD Athlon(tm) XP 2400+
Timestamp of tree: Fri, 30 May 2008 02:06:01 +0000
ccache version 2.4 [enabled]
app-shells/bash: 3.2_p33
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python: 2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache: 2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc: 0.2.3
sys-devel/autoconf: 2.13, 2.61-r1
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils: 2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 1.5.26
virtual/os-headers: 2.6.23-r3
CFLAGS="-O2 -march=athlon-xp -pipe -ggdb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -ggdb"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://www.gtlib.gatech.edu/pub/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://mirror.datapipe.net/gentoo ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://ftp.wwc.edu/pub/mirrors/ftp.gentoo.org "
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR_OVERLAY="/portdir/portage/local/layman /portdir/portage/local/layman/perl-experimental"
USE="X aalib alsa apache2 bash-completion berkdb cdr cli cpudetection cracklib crypt cups dri dvd encode exif expat fastcgi flac fontconfig fortran gcj gd gdbm gif gimpprint gnome gpm gtk gtk2 iconv isdnlog jack jack-tmpfs jbig jpeg jpg lcms libsamplerate midi modperl mudflap mysql ncurses netjack nls nocxx nptl nptlonly nsplugin odbc ogg opengl openmp pam par pcre perl png ppds pppd python qt3support qt4 readline reflection session spell spl sqlite ssl tcpd tiff unicode x86 xorg zlib" ALSA_CARDS="ens1371 ice1712 usb-audio" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="s3 vesa nv fbdev"


| /| | | ~ ~
| / | |---| `|` ?
| |ichael | |iggins ^ /
gentoo-user@lists.gentoo.org mailing list

Thread Tools

All times are GMT. The time now is 11:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org