Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148285 - [4.1/bad code] app-text/ghostscript-gpl fails compile with -O0 -fPIC
Summary: [4.1/bad code] app-text/ghostscript-gpl fails compile with -O0 -fPIC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Other
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 140390 145985 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-19 22:13 UTC by Christopher Byrne
Modified: 2006-12-31 07:23 UTC (History)
3 users (show)

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


Attachments
148285.i (148285.i,159 bytes, text/plain)
2006-12-31 07:23 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2006-09-19 22:13:55 UTC
Gentoo Base System version 1.12.5
Portage 2.1.1 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686)
=================================================================
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 2000+
Last Sync: Wed, 20 Sep 2006 03:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-ggdb3 -mtune=i686 -O0 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-ggdb3 -mtune=i686 -O0 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks metadata-transfer sandbox sfperms splitdebug strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS=""
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 berkdb bitmap-fonts bzip2 caps cli crypt cups dbus dlloader dri elibc_glibc fam fortran gdbm gnutls gpm input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog kernel_linux libg++ logrotate ncurses nls nptl nptlonly pam pcre perl ppds pppd python readline reflection samba session spl ssl tcpd truetype-fonts type1-fonts udev unicode userland_GNU video_cards_fbdev video_cards_savage xorg zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

The build proceess dies on linking due to a missing symbol: pdf_xml_attribute_value_data . This is only on gcc 4.1; it does compile on 3.4
Comment 1 Christopher Byrne 2006-09-19 22:15:19 UTC
Here's the last few lines: 

./obj/../soobj/echogs -w ./obj/../soobj/ldt.tr -n - i686-pc-linux-gnu-gcc -fPIC -shared -Wl,-soname=libgs.so.8 -o ./bin/../sobin/libgs.so.8.54
./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -n -s ./obj/../soobj/gs.o -s
cat ./obj/../soobj/ld.tr >>./obj/../soobj/ldt.tr
./obj/../soobj/echogs -a ./obj/../soobj/ldt.tr -s - -lcups -lcupsimage -lm
if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \
XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \
DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \
DEVICE_DEVS_EXTRA= \
/bin/sh <./obj/../soobj/ldt.tr
rm -f ./bin/../sobin/libgs.so.8
ln -s libgs.so.8.54 ./bin/../sobin/libgs.so.8
rm -f ./bin/../sobin/libgs.so
ln -s libgs.so.8.54 ./bin/../sobin/libgs.so
i686-pc-linux-gnu-gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -O2 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wcast-qual -Wwrite-strings -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -ggdb3 -mtune=i686 -O0 -pipe  -I./obj/../soobj -I./src  -g -o ./bin/../sobin/gsc ./src/dxmainc.c -L./bin/../sobin -lgs
./bin/../sobin/libgs.so: undefined reference to `pdf_xml_attribute_value_data'
collect2: ld returned 1 exit status
make[1]: *** [bin/../sobin/gsc] Error 1
make[1]: Leaving directory `/var/tmp/portage/ghostscript-gpl-8.54/work/ghostscript-8.54-gpl'
make: *** [so] Error 2

!!! ERROR: app-text/ghostscript-gpl-8.54 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_install
  ebuild.sh, line 1020:   Called src_install
  ghostscript-gpl-8.54.ebuild, line 131:   Called die

!!! emake install failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-09-20 00:45:47 UTC
Uhm, it compiles just fine here, try with C[XX]FLAGS="-mtune=i686 -O2 -pipe"
Comment 3 Christopher Byrne 2006-09-20 07:46:30 UTC
Yes, now it compiles.

Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-09-20 07:52:47 UTC
OK, let's reduce this further: C[XX]FLAGS="-mtune=i686 -O0 -pipe" also compiles?
Comment 5 Christopher Byrne 2006-09-20 20:22:48 UTC
No, that does not compile.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-09-21 00:28:54 UTC
OK, thanks for testing.
Comment 7 SpanKY gentoo-dev 2006-09-21 08:09:16 UTC
app-text/ghostscript-gpl for sure is a bit broken ... it does a ton of compiling in src_install() ...
Comment 8 SpanKY gentoo-dev 2006-09-21 08:12:48 UTC
this should fix that:

-    emake STDDIRS || die "emake failed"
+    emake STDDIRS so || die "emake failed"
Comment 9 Stefan Schweizer (RETIRED) gentoo-dev 2006-09-22 15:47:23 UTC
but it breaks another setup then:

http://bugs.gentoo.org/show_bug.cgi?id=145985

dont want to go ahead and just do this when it can break other people.
Comment 10 Stefan Schweizer (RETIRED) gentoo-dev 2006-09-22 16:02:30 UTC
I patched the ebuild to filter the flags, please file a bug upstream in case you are interested in fixing the source correctly.
Comment 11 SpanKY gentoo-dev 2006-09-22 19:34:07 UTC
*** Bug 145985 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2006-09-22 19:36:39 UTC
please stop "fixing" things, this is a bug in gcc end of story

ive reverted the wrong flag munging in the ebuild

as for the make targets, that is still broken
Comment 13 SpanKY gentoo-dev 2006-12-31 02:36:32 UTC
so the 4.1.1 release has this failure but it's been fixed in the latest 4.1 branch, so the 4.1.2 release will be OK

i dont think it's worth back tracking to find the actual patch that resolves the issue, so we'll just say:
 - if you use 4.1.[01], dont use -O0
 - if you use 4.1.2+, you'll be OK
Comment 14 SpanKY gentoo-dev 2006-12-31 07:15:58 UTC
*** Bug 140390 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2006-12-31 07:23:01 UTC
Created attachment 105046 [details]
148285.i

reduced testcase