When I try to emerge current (scim-1.0.2) I receive multiple undefined
reference errors.
An example:
i686-pc-linux-gnu-g++ -O3 -fweb -frename-registers -march=pentium4 -pipe
-mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer
-ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse
-maccumulate-outgoing-args -fprefetch-loop-arrays -fvisibility-inlines-hidden
-fvisibility=hidden -o .libs/scim scim.o -ldl ./.libs/libscim-1.0.so
scim.o(.text+0x27): In function `check_socket_frontend()':
: undefined reference to
`scim::SocketAddress::SocketAddress(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)'
scim.o(.text+0x45): In function `check_socket_frontend()':
: undefined reference to `scim::SocketClient::SocketClient()'
scim.o(.text+0x4d): In function `check_socket_frontend()':
: undefined reference to `scim::scim_get_default_socket_frontend_address()'
scim.o(.text+0x5c): In function `check_socket_frontend()':
...
Also when I try to emerge testing (scim-1.1.3) I receive undefined reference
errors. Similar errors result.
For full details, see attached log files.
Reproducible: Always
Steps to Reproduce:
1. Setup portage and build environment as described by my "emerge info" below
2. "emerge scim" OR "ACCEPT_KEYWORDS=~x86 emerge scim"
3. Receive
Actual Results:
<see details>
Expected Results:
Emerge without error
Output of 'emerge info':
gundam root # cat emerge-info.txt
Gentoo Base System version 1.4.16
Portage 2.0.51-r15 (default-linux/x86/2004.3, gcc-3.4.3-20050110,
glibc-2.3.4.20050125-r0, 2.6.10-gentoo-r6 i686)
=================================================================
System uname: 2.6.10-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz
Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 17 2005,
02:36:26)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[disabled]
ccache version 2.3 [enabled]
dev-lang/python: 2.3.4-r1
sys-devel/autoconf: 2.59-r6, 2.13
sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils: 2.15.92.0.2-r1
sys-devel/libtool: 1.5.10-r4
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS=" -O3 -fweb -frename-registers -march=pentium4 -pipe -mtune=pentium4
-fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer
-funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse
-maccumulate-outgoing-args -fprefetch-loop-arrays "
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -O3 -fweb -frename-registers -march=pentium4 -pipe
-mtune=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer
-ftracer -funroll-loops -falign-functions -fmerge-all-constants
-mfpmath=sse
-maccumulate-outgoing-args -fprefetch-loop-arrays
-fvisibility-inlines-hidden
-fvisibility=hidden "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks maketest newuse sandbox
sfperms
test"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo
http://mirrors.tds.net/gentoo
ftp://mirrors.tds.net/gentoo http://mirror.datapipe.net/gentoo
http://mirror.datapipe.net/gentoo http://www.gigaload.org/gentoo.org/
http://gentoo.osuosl.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 16bit X Xaw3d a52 aac aalib acpi alsa apache2 avi bash-completion
canna
cdr cjk cross crypt cups curl dio directfb divx4linux dvd dvdr dvdread emacs
emboss encode esd exif f77 fbcon foomaticdb fortran freetype freewnn gdbm ggi
gif gnome gnustep gphoto2 gpm gstreamer gtk gtk2 hal imlib immqt-bc ipv6
ithreads jack java jikes joystick jpeg junit libg++ libwww lm_sensors m17n-lib
mad matroska memlimit mikmod mime mmx mozilla mp3 mpeg nas ncurses nls nptl ogg
oggvorbis openal opengl pam pcmcia pda pdflib perl png pnp portaudio posix ppds
profile pthreads python qt quicktime radeon readline samba sdl slang soap
sockets source spell sse ssl svg svga tcltk tcpd threads tiff truetype
truetype-fonts trusted type1-fonts unicode usb v4l vcd videos wifi xine
xinerama
xml2 xmlrpc xmms xosd xpm xprint xsl xv xvid zlib video_cards_radeon"
Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Toolchain info:
output of 'gcc -v':
gundam root # gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/specs
Configured with: /var/tmp/portage/gcc-3.4.3.20050110/work/gcc-3.4.3/configure
--enable-version-specific-runtime-libs --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.3-20050110
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include/g++-v3
--host=i686-pc-linux-gnu --disable-altivec --enable-nls
--without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu
--with-system-zlib --disable-checking --disable-werror
--disable-libunwind-exceptions --enable-shared --enable-threads=posix
--disable-multilib --disable-libgcj --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110, ssp-3.4.3.20050110-0,
pie-8.7.7)
output of '/lib/libc.so.6':
gundam root # /lib/libc.so.6
GNU C Library stable release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110,
ssp-3.4.3.20050110-0, pie-8.7.7).
Compiled on a Linux 2.6.8 system on 2005-02-17.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
output of 'uname -a':
gundam root # uname -a
Linux gundam 2.6.10-gentoo-r6 #1 Thu Feb 17 19:15:47 EST 2005 i686 Intel(R)
Pentium(R) 4 CPU 2.20GHz GenuineIntel GNU/Linux
I didn't quite remove all the CXXFLAGS but just elminiated some extra
CXXFLAGS...
gundam root # cat /etc/make.conf | grep -v '#' | grep FLAG
CFLAGS="${CFLAGS} -O3 "
CFLAGS="${CFLAGS} -fweb "
CFLAGS="${CFLAGS} -frename-registers "
CFLAGS="${CFLAGS} -march=pentium4 -pipe "
CFLAGS="${CFLAGS} -mtune=pentium4 "
CFLAGS="${CFLAGS} -fforce-addr "
CFLAGS="${CFLAGS} -momit-leaf-frame-pointer "
CFLAGS="${CFLAGS} -fomit-frame-pointer "
CFLAGS="${CFLAGS} -ftracer "
CFLAGS="${CFLAGS} -funroll-loops "
CFLAGS="${CFLAGS} -falign-functions "
CFLAGS="${CFLAGS} -fmerge-all-constants "
CFLAGS="${CFLAGS} -mfpmath=sse "
CFLAGS="${CFLAGS} -maccumulate-outgoing-args "
CFLAGS="${CFLAGS} -fprefetch-loop-arrays "
CXXFLAGS="${CFLAGS} "
I changed my flags to this and it emerges fine now. The question is why?
I'm VERY rusty with C/C++ (Java programmer actually)...what makes the flags
"-fvisibility-inlines-hidden" and "-fvisibility=hidden" so bad?
The point is not all packages support all the flags gcc provides, and
here SCIM doesn't support them. All that I can do for you is to filter
problematic C[XX]FLAGS from scim ebuild. If you are not satisfied with
it, please talk it to the upstream (James Su), and he might be interested
in fixing this (but he is already busy doing other improvements on scim
and Unified API for immodule).
Thanks anyway for the bug report.
Sorry, I forgot about submitting this.
I have toned down my aggressive flags since reporting this bug. I was not experienced yet in the implications it would have on various packages but have now become more aware.
My recommendation would be to not filter the CFLAGS and CXXFLAGS and just let what you said be, sometimes code isn't able to handle the extreme optimizations.