Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 13166 - unixODBC fails to compile (ld segfaults)
Summary: unixODBC fails to compile (ld segfaults)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
: 15165 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-01-03 11:01 UTC by Jan Kroken
Modified: 2003-02-07 17:03 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
odbc.diff (diff to ebuild) (odbc.diff,499 bytes, patch)
2003-01-06 06:58 UTC, Paul de Vrieze (RETIRED)
Details | Diff
updated ebuild that doesn't fail sandbox (odbc.diff,758 bytes, patch)
2003-01-06 07:59 UTC, Paul de Vrieze (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kroken 2003-01-03 11:01:14 UTC
This is the last lines of the output of emerge unixODBC:

E_LIBZ=1 -DHAVE_LIBPNG=1 -DSTDC_HEADERS=1 -DHAVE_MALLOC_H=1 
-DHAVE_UNISTD_H=1 -DHAVE_PWD_H=1 -DHAVE_CRYPT_H=1 -DHAVE_LIMITS_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_LOCALE_H=1 -DHAVE_ALLOCA_H=1 
-DHAVE_ALLOCA=1 -DHAVE_VPRINTF=1 -DHAVE_PUTENV=1 -DHAVE_SOCKET=1 
-DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DHAVE_SETENV=1  -I. -I.  -I../include 
-I../libltdl    -march=athlon-tbird -O3 -pipe -pthread -c odbcinst.c
/bin/sh ../libtool --mode=link gcc  -march=athlon-tbird -O3 -pipe -pthread  
-o odbcinst  odbcinst.o ../odbcinst/libodbcinst.la    
../libltdl/libltdlc.la   -lc -lc -lc -lc 
mkdir .libs
gcc -march=athlon-tbird -O3 -pipe -pthread -o .libs/odbcinst odbcinst.o 
../odbcinst/.libs/libodbcinst.so -lc -lc -lc -lc -lc -lc -lc -lc -lc -lc 
-lc -lc -lc -lc -lc -lc -ldl -lc -lc -lc -lc ../libltdl/.libs/libltdlc.al 
-ldl -lc -lc -lc -lc
creating odbcinst
gcc -DPACKAGE=\"unixODBC\" -DVERSION=\"2.0.6\" -DYYTEXT_POINTER=1 
-DHAVE_LIBCRYPT=1 -DHAVE_LIBM=1 -DHAVE_READLINE=1 -DTIME_WITH_SYS_TIME=1 
-DHAVE_SYS_TIME_H=1 -DSIZEOF_LONG=4 -DHAVE_STRCASECMP=1 
-DHAVE_STRNCASECMP=1 -DHAVE_LIBPTHREAD=1 -D_REENTRANT=1 
-DHAVE_LOCALTIME_R=1 -DHAVE_LIBC=1 -DHAVE_LIBC=1 -DHAVE_LIBC=1 
-DHAVE_LIBC=1 -DHAVE_SNPRINTF=1 -DNEED_SEMUNDO_UNION=1 -DCOLLECT_STATS=1 
-DHAVE_LIBZ=1 -DHAVE_LIBPNG=1 -DSTDC_HEADERS=1 -DHAVE_MALLOC_H=1 
-DHAVE_UNISTD_H=1 -DHAVE_PWD_H=1 -DHAVE_CRYPT_H=1 -DHAVE_LIMITS_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_LOCALE_H=1 -DHAVE_ALLOCA_H=1 
-DHAVE_ALLOCA=1 -DHAVE_VPRINTF=1 -DHAVE_PUTENV=1 -DHAVE_SOCKET=1 
-DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DHAVE_SETENV=1  -I. -I.  -I../include 
-I../libltdl    -march=athlon-tbird -O3 -pipe -pthread -c isql.c
/bin/sh ../libtool --mode=link gcc  -march=athlon-tbird -O3 -pipe -pthread  
-o isql  isql.o ../DriverManager/libodbc.la   ../odbcinst/libodbcinst.la    
  -lreadline -lcurses -lc -lc -lc -lc 
gcc -march=athlon-tbird -O3 -pipe -pthread -o .libs/isql isql.o 
../DriverManager/.libs/libodbc.so -lc -lc -lc -lc -lc -lc -lc -lc -lc -lc 
-lc -lc -lc -lc -lc -lc -lc -lc -lc -lc -ldl -lc -lc -lc -lc 
../odbcinst/.libs/libodbcinst.so -lc -lc -lc -lc -lc -lc -lc -lc -lc -lc 
-lc -lc -lc -lc -lc -lc -ldl -lc -lc -lc -lc -lreadline -lcurses -lc -lc 
-lc -lc
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
make[1]: *** [isql] Error 1
make[1]: Leaving directory 
`/var/tmp/portage/unixODBC-2.0.6/work/unixODBC-2.0.6/exe'
make: *** [all-recursive] Error 1

!!! ERROR: dev-db/unixODBC-2.0.6 failed.
!!! Function src_compile, Line 42, Exitcode 2
!!! (no error message)



...and here are my use flags:

USE="3dnow apache2 arts avi bonobo -canna cdr -cjk crypt cups dga
     doc dvd encode esd evo -freewnn -gb gd gdbm ggi ggz gif -gnome
     gpm gtk2 guile -icc imap imlib innodb java jikes jpeg junit
     -kde -ldap libwww mbox mikmod mmx -motif mozilla mpeg -mule
     mysql ncurses -oav -oci8 odbc oggvorbis opengl oss pam -pcmcia
     -pda pdflib perl plotutils png postgres python qtmt quicktime
     readline ruby samba -scanner sdl slang spell ssl svga tcltk tcpd
     tetex tiff truetype wmf X xml2 xmms xv zeo zlib x86"
Comment 1 Chris Carlin 2003-01-05 00:55:17 UTC
FWIW, I get this too.
USE flags:

USE="-3dfx 3dnow -aalib -acl -afs -alsa -apm -arts -atlas avi berkdb -bonobo
-canna -cdr -cjk crypt -cups dga directfb doc -dvd encode -esd -evo fbcon
-flash -freewnn -gb gd gdbm ggi -ggz gif -gnome -gphoto2 -gpm gtk -gtk2
gtkhtml -guile -icc -icc-pgo imap imlib -innodb -ipv6 java jikes jpeg
-junit -kde -kerberos -lcms -ldap -leim libg++ -libgda libwww matrox -maildir
mbox mikmod mmx motif mozilla mpeg -mule -mysql -nas ncurses nls nocardbus -oci8
odbc ogg oggvorbis opengl oss pam -pcmcia -pda pdflib perl pic -plotutils
png pnp postgres python qt qtmt quicktime readline -ruby samba -sasl
-scanner sdl -slang -slp -snmp -socks5 spell -sse ssl -static svga tcltk
tcpd -tetex tiff truetype -trusted -voodoo3 -wavelan wmf X xface xml2 xmms
xv -zeo zlib"

CHOST="i586-pc-linux-gnu"
CFLAGS="-march=k6-2 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
Comment 2 Paul de Vrieze (RETIRED) gentoo-dev 2003-01-05 10:11:24 UTC
The problem is in the configure script. This script checks for functions in the
c library with the wrong function. configure.in needs to be changed according to
the following sed script:

cp configure.in configure.orig
sed -e "s:AC_CHECK_LIB *( *c *,:AC_CHECK_FUNC(:" configure.orig >configure.in

I did get it ok yesterday, but today I could find out how to do a proper
automake. It complains about a missing acinclude.in, so maybe some automake
wizzard could take a look at performing a good automake. The problem is
basically all those -c 's. If the -lc is removed, everything works.
Comment 3 Paul de Vrieze (RETIRED) gentoo-dev 2003-01-06 06:58:23 UTC
Created attachment 7015 [details, diff]
odbc.diff (diff to ebuild)

I made a patch for the ebuild that corrects the configure script and has
unixODBC run as it should.
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2003-01-06 07:59:26 UTC
Created attachment 7016 [details, diff]
updated ebuild that doesn't fail sandbox

An updated diff that also repairs the sandbox violations.
Comment 5 Joachim Blaabjerg (RETIRED) gentoo-dev 2003-01-12 08:17:54 UTC
The patch generates some warnings, though. I'm not an automake wizard, so I don't 
know if it's of any signifigance or not. 
 
You should update your `aclocal.m4' by running aclocal. 
aclocal: configure.in: 8: macro `AM_ACLOCAL_INCLUDE' not found in library 
You should update your `aclocal.m4' by running aclocal. 
libtoolize: `config.guess' exists: use `--force' to overwrite 
libtoolize: `config.sub' exists: use `--force' to overwrite 
libtoolize: `ltmain.sh' exists: use `--force' to overwrite 
ls: ./acinclude.m4: No such file or directory 
autoconf: Undefined macros: 
***BUG in Autoconf--please report*** AC_YYTEXT_POINTER 
***BUG in Autoconf--please report*** AC_YYTEXT_POINTER 
***BUG in Autoconf--please report*** AC_YYTEXT_POINTER 
>>> Source unpacked. 
 
Anyway, the fix seems to work. The sed thing can be replaced by `dosed`, btw. 
 
Ryan; does this warrant a fix in Portage? Even though we are freezed, this is 
supposed to be a stable package.... 
Comment 6 Paul de Vrieze (RETIRED) gentoo-dev 2003-01-12 08:41:38 UTC
I know it generates those warnings. I don't believe they are problematic
although I'm not an automake/conf wizzard either. It seems to work, but maybe
some automake wizzard should take a look at making it behave better.
Comment 7 Yves Van den Hove 2003-02-06 02:00:33 UTC
The patch file is working correctly. It throws some warnings, but it is working correctly. Why not putting it in the portage tree? unixODBC-2.0.6 in portage still fails to compile without it.
Comment 8 SpanKY gentoo-dev 2003-02-06 02:42:14 UTC
*** Bug 15165 has been marked as a duplicate of this bug. ***
Comment 9 Ryan Phillips (RETIRED) gentoo-dev 2003-02-07 17:03:12 UTC
committed