Gentoo Archives: gentoo-user

From: Michael Higgins <linux@×××××××.org>
To: gentoo-user@l.g.o
Cc: gentoo-perl@l.g.o
Subject: [gentoo-user] DBD-ODBC installation problem
Date: Wed, 04 Jun 2008 16:14:56
Message-Id: 20080604091220.65ee8b39@lbg2.evolone.org
1 Folks —
2
3 I'm having a problem getting a working *-perl/DBD-ODBC. I had one that
4 was working just fine, but un-merged unixODBC in a fit of pique, or
5 something. I re-emerged it, but then DBD-ODBC segfaults.
6
7 So, getting to debug I:
8
9 export LD_LIBRARY_PATH=/usr LANG="" ODBCHOME=/usr ; FEATURES="nostrip"
10 emerge -aDv DBD-ODBC :
11
12 ...
13
14 Using ODBC in /usr
15
16 Umm, this looks like a unixodbc type of driver manager.
17 We expect to find the sql.h, sqlext.h and (which were
18 supplied with unixODBC) in $ODBCHOME/include directory alongside
19 the /usr/lib/libodbc.a /usr/lib/libodbc.so library in $ODBCHOME/lib
20
21 Warning: LD_LIBRARY_PATH doesn't include /usr
22
23 Checking if your kit is complete...
24 Looks good
25 Using DBI 1.601 (for perl 5.008008 on i586-linux) installed
26 in /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBI/ Using DBI
27 1.601 (for perl 5.008008 on i586-linux) installed
28 in /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBI/ Writing
29 Makefile for DBD::ODBC
30
31 The DBD::ODBC tests will use these values for the database connection:
32 DBI_DSN= e.g. dbi:ODBC:demo
33 DBI_USER=
34 DBI_PASS=
35 Warning: not all required environment variables are set.
36
37 [But these are just for the tests which aren't enabled anyway.]
38
39 . . .
40
41 ' isql -vv TREX user pass ' works just fine. So, unixODBC is working as
42 it should.
43
44 perl -MDBI -e 'use DBI; \
45 my $db=DBI->connect("dbi:mysql:dbtest","user","pass")'
46
47 ... also works, so problem not with DBI.
48
49 Anyway, a simple script:
50
51 perl -MDBI -e 'use DBI; \
52 my $db=DBI->connect("dbi:ODBC:TREX","_user","XXXXXX")'
53
54 Segmentation fault
55
56 I've tried different versions.... no joy. Always, the same result.
57
58 GDB output:
59
60 Program received signal SIGSEGV, Segmentation fault.
61 [Switching to Thread 0xb7dbd6c0 (LWP 23716)]
62 _SQLGetDiagRec (handleType=2, handle=<value optimized out>,
63 numRecord=1, szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
64 szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
65 at error.c:525
66 525 error.c: No such file or directory.
67 in error.c
68 (gdb) bt'
69 #0 _SQLGetDiagRec (handleType=2, handle=<value optimized out>,
70 numRecord=1, szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
71 szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
72 at error.c:525
73 result = <value optimized out>
74 errs = (struct _sql_errors *) 0x8280584
75 p = <value optimized out>
76 odbc_ver = <value optimized out>
77 msgprefix = "[FreeTDS][SQL Server]"
78 #1 0xb7b8cdfb in SQLError (henv=0x827ffd8, hdbc=0x8280568, hstmt=0x0,
79 szSqlState=0xbfdfee2e "", pfNativeError=0xbfdfee34,
80 szErrorMsg=0xbfdfec2e "", cbErrorMsgMax=511, pcbErrorMsg=0xbfdfee3a)
81 at error.c:590
82 result = <value optimized out>
83 errs = (struct _sql_errors *) 0x8280584
84 handle = (SQLHANDLE) 0x8280568
85 #2 0xb7c6eb4d in AllODBCErrors ()
86 from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
87 No symbol table info available.
88 #3 0xb7c75f97 in odbc_db_login6 ()
89 from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
90 No symbol table info available.
91 #4 0xb7c6e206 in XS_DBD__ODBC__db__login ()
92 ---Type <return> to continue, or q <return> to quit---
93 from /usr/lib/perl5/vendor_perl/5.8.8/i586-linux/auto/DBD/ODBC/ODBC.so
94 No symbol table info available.
95 #5 0x080bb04f in Perl_pp_entersub ()
96 No symbol table info available.
97 #6 0x080b98c5 in Perl_runops_standard ()
98 No symbol table info available.
99 #7 0x08065450 in ?? ()
100 No symbol table info available.
101 #8 0x0813cff4 in ?? ()
102 No symbol table info available.
103 #9 0x08140428 in PL_reg_oldsavedlen ()
104 No symbol table info available.
105 #10 0xbfdffaf8 in ?? ()
106 No symbol table info available.
107 #11 0x08066004 in Perl_call_sv ()
108 No symbol table info available.
109 Backtrace stopped: frame did not save the PC
110
111 strace -otracedump perl -MDBI -e 'use DBI; my
112 $db=DBI->connect("dbi:ODBC:TREX","user","pass")'
113
114 output viewable here:
115 http://evolone.org/dbdodbc_stracedump
116
117 What do I do next? I have a working installation on another machine.
118 Versions are all the same. And this was working previously, somehow.
119
120 Can anyone make a clue out of the debug output?
121
122 Are there any gentoo-type methods to employ in an attempt to fix this
123 problem, like some kind of massive re-emergence? I already re-emerged
124 perl, ran perl-cleaner to rebuild all the modules. This after
125 I re-emerged (in order) FreeTDS, unixODBC, DBD-ODBC. No difference.
126
127 What next? This can't be impossible, though I did note that this
128 package is proposed for bugday under "Randomly selected open bugs".
129 Maybe I can just wait 'till Monday (or do I really need to hang out on
130 IRC on Saturday?)
131
132 Emerging 'pidgin', just in case. :(
133
134 emerge --info:
135
136 Portage 2.1.4.4 (default-linux/x86/2006.1, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r8 i686)
137 =================================================================
138 System uname: 2.6.23-gentoo-r8 i686 AMD Athlon(tm) XP 2400+
139 Timestamp of tree: Fri, 30 May 2008 02:06:01 +0000
140 ccache version 2.4 [enabled]
141 app-shells/bash: 3.2_p33
142 dev-java/java-config: 1.3.7, 2.1.4
143 dev-lang/python: 2.4.4-r9
144 dev-python/pycrypto: 2.0.1-r6
145 dev-util/ccache: 2.4-r7
146 sys-apps/baselayout: 2.0.0
147 sys-apps/openrc: 0.2.3
148 sys-apps/sandbox: 1.2.18.1-r2
149 sys-devel/autoconf: 2.13, 2.61-r1
150 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
151 sys-devel/binutils: 2.18-r1
152 sys-devel/gcc-config: 1.4.0-r4
153 sys-devel/libtool: 1.5.26
154 virtual/os-headers: 2.6.23-r3
155 ACCEPT_KEYWORDS="x86"
156 CBUILD="i586-pc-linux-gnu"
157 CFLAGS="-O2 -march=athlon-xp -pipe -ggdb"
158 CHOST="i586-pc-linux-gnu"
159 CONFIG_PROTECT="/etc"
160 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"
161 CXXFLAGS="-O2 -march=athlon-xp -pipe -ggdb"
162 DISTDIR="/portdir/portage/distfiles"
163 FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
164 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 "
165 LANG="en_US.UTF-8"
166 LC_ALL="en_US.UTF-8"
167 LINGUAS="en"
168 MAKEOPTS="-j2"
169 PKGDIR="/portdir/portage/packages"
170 PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
171 PORTAGE_TMPDIR="/portdir/tmp"
172 PORTDIR="/portdir/portage"
173 PORTDIR_OVERLAY="/portdir/portage/local/layman /portdir/portage/local/layman/perl-experimental"
174 SYNC="rsync://rsync.gentoo.org/gentoo-portage"
175 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"
176 Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
177
178 Cheers,
179
180 --
181 |\ /| | | ~ ~
182 | \/ | |---| `|` ?
183 | |ichael | |iggins \^ /
184 michael.higgins[at]evolone[dot]org
185 --
186 gentoo-user@l.g.o mailing list