Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73622 - courier-authlib: cannot build: "ld: unrecognized option '-DHAVE_ERRNO_AS_DEFINE=1'" - error in mysql_config?
Summary: courier-authlib: cannot build: "ld: unrecognized option '-DHAVE_ERRNO_AS_DEFI...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tuan Van (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-06 21:28 UTC by Alexander Skwar
Modified: 2005-03-29 02:26 UTC (History)
1 user (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 Alexander Skwar 2004-12-06 21:28:59 UTC
When I try to compile courier-authlib-0.50.20041203, I fail with these errors:

i686-pc-linux-gnu-gcc: -DHAVE_ERRNO_AS_DEFINE=1: linker input file unused because linking not done
i686-pc-linux-gnu-gcc: -O1: linker input file unused because linking not done
Linking libcourierauth.la
config.status: creating authlib.3
config.status: executing depfiles commands
Linking libcourierauthsasl.la
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-DHAVE_ERRNO_AS_DEFINE=1'/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make[2]: *** [libcourierauth.la] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: unrecognized option '-DHAVE_ERRNO_AS_DEFINE=1'/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make[2]: *** [libcourierauthsasl.la] Error 1
make[2]: Leaving directory `/var/tmp/portage/courier-authlib-0.50.20041203/work/courier-authlib-0.50.20041203'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/courier-authlib-0.50.20041203/work/courier-authlib-0.50.20041203'
make: *** [all] Error 2

!!! ERROR: net-libs/courier-authlib-0.50.20041203 failed.

As suggested by bug #73513, or rather bug #70367, I changed in /etc/make.conf

  LDFLAGS="-Wl,-O1"

to

  LDFLAGS="-O1"

and appended to CFLAGS the value "-Wl,O1".

After that change, I have recompiled mysql.

Reproducible: Always
Steps to Reproduce:




06:23:22 askwar@alturo:~ $ emerge info
Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-gentoo-r3.PHP2.4kb.cleaned.no-preempt.05 i686)
=================================================================
System uname: 2.6.9-gentoo-r3.PHP2.4kb.cleaned.no-preempt.05 i686 Intel(R)
Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.6.6
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Nov 14 2004, 22:41:19)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.3
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -Wl,-O1"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-fomit-frame-pointer -pipe -O2 -march=pentium4"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-protect distlocks sandbox sfperms"
GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://194.117.158.29/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 apm arts async avi bzlib crypt cscope cups curl curlwrappers
diet djbfft encode exif fam flash foomaticdb ftp fwdzone gd gdbm gif hal
hardened iconv imagemagick imap imlib immqt-bc ithreads javascript jpeg libedit
libg++ libwww lzo lzw lzw-tiff mad maildir mailwrapper mbox mmap mmx mng mpeg
mysql ncurses nls no-old-linux noantlr nobcel nobeanutils nobsh nocommonslogging
nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan
noxerces nptl offensive oggvorbis opengl oss pam parse-clocks pcntl pcre pdflib
perl pic pie png posix postgres pwdb python qt quicktime readline recode sasl
sdl shared slang sockets spell sse ssl sysvipc tcpd tiff truetype unicode vhosts
x86 xfs xml2 xmms xv zlib linguas_de"
Comment 1 Tuan Van (RETIRED) gentoo-dev 2004-12-06 21:43:31 UTC
did you try LDFLAGS="-Wl,-O1" and leave it out of your CFLAGS?
Comment 2 Alexander Skwar 2004-12-06 21:50:25 UTC
No, I did not try LDFLAGS="-Wl,-O1", because that's a wrong syntax, isn't it? Well, with LDFLAGS=-Wl,-O1, I'll get bug #73513, won't I? :)

Hmm...

06:49:32 askwar@alturo:~ $ mysql_config --cflags
-I/usr/include/mysql -march=pentium4 -pipe -fomit-frame-pointer -Wl,-DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS

Hm, why is there -Wl,-DHAVE.... in the output?

In mysql_config:

cflags="-I$pkgincludedir -march=pentium4 -O2 -pipe -fomit-frame-pointer -Wl,-O1 -DHAVE_ERRNO_AS_DEFINE=1 -DUSE_OLD_FUNCTIONS " #note: end space!
Comment 3 Tuan Van (RETIRED) gentoo-dev 2004-12-06 21:50:40 UTC
err, I mean LDFLAGS="-O1"
Comment 4 Alexander Skwar 2004-12-06 21:53:24 UTC
Ah :)

Yes, here's directly from my make.conf:

CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -Wl,-O1"
CXXFLAGS="-fomit-frame-pointer -pipe -O2 -march=pentium4"

LDFLAGS="-O1"


I added -Wl,-O1 to CFLAGS, because bug #70367 explained, that this is the correct syntax, isn't it?
Comment 5 Tuan Van (RETIRED) gentoo-dev 2004-12-06 22:01:55 UTC
I am not a linker guru, I just pass on what I have read ;)
see bug #65002
try with CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer".
I don't think it is a good idea to have -Wl,-O1 in your CFLAGS and LDFLAGS="-O1" (it confuses the linker?), LDFLAGS="-O1" should do what you want.
Comment 6 Alexander Skwar 2004-12-07 01:28:53 UTC
Yes, you're right. Now courier-authlib compiles just fine. Thanks!