Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 16767 - MySQL 3.23.55 *still* fails to compile ("errno")
Summary: MySQL 3.23.55 *still* fails to compile ("errno")
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Donny Davies (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-03 15:50 UTC by Christian Rubbert
Modified: 2003-03-10 23:12 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Rubbert 2003-03-03 15:50:39 UTC
Well I'm sorry to repost, but have you verified the fix from #16480? 
  
The compiler call in question is a g++ one, so you have to add  
-DHAVE_ERRNO_AS_DEFINE=1 to CXXFLAGS. I tried adding it only to  
CXXFLAGS, but found out that you have to add it to CFLAGS as well.  
  
So here's the actual fix:  
+	#glibc-2.3.2_pre fix; bug #16496  
+	export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"  
+	export CXXFLAGS="${CXXFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"
Comment 1 Donny Davies (RETIRED) gentoo-dev 2003-03-03 16:33:42 UTC
yup, you're right.  learned this after adding the first fix ;-)

will fix it again shortly.

Comment 2 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2003-03-04 15:41:32 UTC
How to do this when standing at the prompt?
Comment 3 Cletus Lichte 2003-03-07 17:56:55 UTC
I'm getting an error trying to compile it too:

g++ -O3 -DDBUG_OFF -march=i586 -m3dnow -pipe -O3 -felide-constructors -fno-exceptions -fno-rtti -fno-implicit-templates -fno-exceptions -fno-rtti -rdynamic -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o  -lreadline -lncurses -lstdc++ ../libmysql/.libs/libmysqlclient.so -lz -lcrypt -lnsl -lm -Wl,--rpath -Wl,/usr/lib/mysql
mysql.o(.text+0x19bf): In function `com_source(String*, char*)':
: undefined reference to `errno'
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/tmp/portage/mysql-3.23.55/work/mysql-3.23.55/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/portage/mysql-3.23.55/work/mysql-3.23.55'
make: *** [all] Error 2

!!! ERROR: dev-db/mysql-3.23.55 failed.
!!! Function src_compile, Line 105, Exitcode 2
!!! compile problem
Comment 4 Sébastien Champigny 2003-03-07 18:50:22 UTC
Same error here.
S
Comment 5 Sébastien Champigny 2003-03-07 18:50:22 UTC
Same error here.
Sébastien
Comment 6 Christian Rubbert 2003-03-08 05:39:14 UTC
For a quick fix, edit /usr/portage/devel-db/mysql/mysql-3.23.55.ebuild, search the line 

export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"

and directly beneath it add

export CXXFLAGS="${CXXFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"

So that it looks like

export CFLAGS="${CFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"
export CXXFLAGS="${CXXFLAGS} -DHAVE_ERRNO_AS_DEFINE=1"

DO NOT RSYNC! Changes will be lost then.
Instead, just emerge mysql :)
Comment 7 Donny Davies (RETIRED) gentoo-dev 2003-03-08 06:12:22 UTC
I'll fix this today, with some other cleanups as well ;-)
Comment 8 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2003-03-09 11:57:54 UTC
Well, the problem is not mysql, it is the new glibc that has changed.
Try and search for glibc in the bug database, you will find several topics about it.
Comment 9 Donny Davies (RETIRED) gentoo-dev 2003-03-10 23:12:46 UTC
sorry about that i ensured its fixed properly now.