First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 182534
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: AMD64 Project <amd64@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kyle Hunter <keletmaster@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 182534 depends on: Show dependency tree
Show dependency graph
Bug 182534 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-06-19 04:20 0000
Doesn't compile with -fPIC and/or -DPIC either.
libpcre 6.6 works fine.

x86_64-pc-linux-gnu-gcc   -shared -o pcre.so   pcre..o    -L/usr/lib64
/usr/lib64/libpcre.a -ldl -lnsl -lncurses -lm  -lc 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld:
/usr/lib64/libpcre.a(pcre_compile.o): relocation R_X86_64_32S against
`_pcre_utf8_table4' can not be used when making a shared object; recompile with
-fPIC
/usr/lib64/libpcre.a: could not read symbols: Bad value
collect2: ld returned 1 exit status


emerge --info:
Portage 2.1.3_rc4 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6-r0,
2.6.21-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor
4800+
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 18 Jun 2007 03:00:01 +0000
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=k8 -pipe -msse3"
DISTDIR="/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo "
LANG="en_US.UTF-8"
MAKEOPTS="-j1"
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
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/porttmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/kports"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X a52 acpi alsa amd64 bash-completion berkdb bitmap-fonts bzip2
cairo cddb cdinstall cdparanoia cdr cli cracklib crypt cups curl d dedicated
dri dvd dvdr dvdread eds emboss encode evo fam ffmpeg firefox flac fortran gif
glitz glut gmp gtk iconv imagemagick imlib isdnlog joystick jpeg libcaca libg++
mad midi mikmod minimal mmap mmx mp3 mpeg mplayer mudflap ncurses nls nptl
nptlonly nsplugin offensive ogg openal opengl openmp pam pcre pdf perl png ppds
pppd python qt4 quicktime readline reflection ruby savedconfig sdl session
slang smp sox speex spell spl sse sse2 ssl svg symlink tcpd theora tiff
truetype truetype-fonts type1-fonts unicode usb videos vim-syntax vorbis x264
xml xorg xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy
dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear
meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc"
INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
VIDEO_CARDS="nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Simon Cooper 2007-06-19 10:54:57 0000 -------
Confirmed. Recompiling libpcre-7.1 with CFLAGS="-fPIC" fixes this

Portage 2.1.2.7 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.5-r2,
2.6.21-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r3 x86_64 AMD Turion(tm) 64 X2 Mobile Technology
TL-56
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 17 Jun 2007 01:47:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.32
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild
/etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache collision-protect distlocks fixpackages
metadata-transfer multilib-strict sandbox sfperms strict test userpriv"
GENTOO_MIRRORS="http://www.mirror.ac.uk/mirror/distro.ibiblio.org/pub/linux/distributions/gentoo
http://gentoo.virginmedia.com http://distfiles.gentoo.org
http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en en_GB"
MAKEOPTS="-j3"
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
--filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/enlightenment
/usr/portage/local/layman/sunrise /usr/portage/local"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow X Xaw3d a52 aac acpi alsa amd64 audiofile berkdb bitmap-fonts
branding bzip2 cairo cddb cdparanoia cdr cli cracklib cups curl dbus dri dts
dvb dvd dvdr dvdread emboss encode evo exif expat fam ffmpeg firefox foomaticdb
gdbm gif glitz gs gtk guile hal iconv icu imagemagick imlib isdnlog ithreads
java javascript jpeg libg++ libwww lirc logrotate mad midi mmap mmx mmxext mp3
msn mudflap ncurses nls nptl nptlonly nsplugin ogg openal opengl openmp pam
pcre pdf perl png ppds pppd python qt3support qt4 readline reflection sdl
session sndfile spl sse sse2 ssl svg symlink tcl tcpd test threads tiff tk
truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vorbis x264 xcb xml
xorg xosd xscreensaver xv zlib" ALSA_CARDS="hda-intel usb-audio"
ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file
hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route
share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics
ps2mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780
lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" LIRC_DEVICES="mceusb2"
USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #2 From Thomas Anderson 2007-06-19 11:42:41 0000 -------
@thecoop, adding -fPIC, while nice for testing whether it is a valid bug, is
not a good fix. The proper way is to patch the Makefile so that only the shared
libraries get built with -fPIC. If the binaries are made with -fPIC, then
everything will be much slower. 

/me goes off to figure out how to patch the Makefile.

------- Comment #3 From Simon Cooper 2007-06-19 12:07:13 0000 -------
Ay, I know. I was just checking it was a standard fPIC issue.

------- Comment #4 From Kyle Hunter 2007-06-19 17:06:49 0000 -------
Yeah compiling libpcre with -fPIC fixes it. I tried compiling zsh with -fPIC
(as the original report says "Doesn't compile with -fPIC" -- Figured I'd clear
that up.

------- Comment #5 From Simon Cooper 2007-06-20 10:06:59 0000 -------
submitted Makefile patch 

------- Comment #6 From Jakub Moc 2007-06-20 11:10:02 0000 -------

*** This bug has been marked as a duplicate of bug 182652 ***

------- Comment #7 From Dawid Węgliński 2007-09-03 16:58:44 0000 -------
*** Bug 191164 has been marked as a duplicate of this bug. ***

------- Comment #8 From Andrei Slavoiu 2007-09-19 07:51:36 0000 -------
This bug is caused by the zsh ebuild, not by libpcre, so bug #182652 is invalid
and this is not a duplicate of it.
Simply commenting out the following line in the ebuild fixes compilation on
amd64:
sed -i -e "/LIBS/s%-lpcre%/usr/$(get_libdir)/libpcre.a%" Makefile

I'm not sure what exactly that line was supposed to fix, but I suppose the
developer's intention was to avoid users using zsh as the default shell not
being able to login after a libpcre update that breaks the ABI.

------- Comment #9 From Kevin J Meagher 2007-09-19 10:05:34 0000 -------
I can confirm Andrei's statement. This bug is NOT resolved

------- Comment #10 From Jakub Moc 2007-09-25 16:22:15 0000 -------
*** Bug 193764 has been marked as a duplicate of this bug. ***

------- Comment #11 From Jakub Moc 2007-09-25 16:23:06 0000 -------
Reopen wrt Bug 182652 Comment #7

------- Comment #12 From Christoph Mende 2007-09-27 18:49:07 0000 -------
usata: any comments? any known breakage when zsh is compiled with -lpcre? the
sed in the ebuild doesn't make much sense imho and just leads to zsh failing to
compile with libpcre-7

------- Comment #13 From wyvern5@gmail.com 2007-10-09 23:01:18 0000 -------
(In reply to comment #12)
> usata: any comments? any known breakage when zsh is compiled with -lpcre? the
> sed in the ebuild doesn't make much sense imho and just leads to zsh failing to
> compile with libpcre-7
> 

If you ./configure --enable-pcre the default zsh sources, they compile just
fine with -lpcre.

------- Comment #14 From wyvern5@gmail.com 2007-10-11 17:09:37 0000 -------
(In reply to comment #12)
> usata: any comments? any known breakage when zsh is compiled with -lpcre? the
> sed in the ebuild doesn't make much sense imho and just leads to zsh failing to
> compile with libpcre-7
> 

From reading old bugs, it looks like the decision to statically link pcre was
made because pcre is the only dynamic link required for core zsh (as opposed to
add-on modules). So, if your disk is broken and /usr doesn't mount, you'd still
be able to use zsh, but tab completion and things like that wouldn't work. 

Personally, I'm in favor of letting zsh live in /usr/bin and letting it
dynamically link against whatever it pleases. Leave other shells to fulfill the
minimalistic works-in-an-emergency role.

------- Comment #15 From Joshua J. Berry 2007-10-22 23:07:18 0000 -------
I can confirm this with zsh 4.3.4 and libpcre 7.4.

My preference is opposite wyvern5@gmail.com's -- I would like to see zsh
continue to be in /bin and usable as an emergency shell.

------- Comment #16 From Togge 2007-10-24 05:18:10 0000 -------
Why isn't this incorporated into the exsisting "static" use flag?

------- Comment #17 From Andrei Slavoiu 2007-10-24 07:45:54 0000 -------
(In reply to comment #15)
> I can confirm this with zsh 4.3.4 and libpcre 7.4.
> 
> My preference is opposite wyvern5@gmail.com's -- I would like to see zsh
> continue to be in /bin and usable as an emergency shell.
> 

This bug has nothing to do with zsh's ability to be used as an emergency shell.
/bin/zsh does not use libpcre, just it's pcre module
(/usr/lib64/zsh/4.3.4/zsh/pcre.so).

------- Comment #18 From Dawid Węgliński 2007-10-24 17:36:45 0000 -------
*** Bug 196947 has been marked as a duplicate of this bug. ***

------- Comment #19 From Chris Gianelloni (RETIRED) 2007-11-06 00:38:48 0000 -------
OK.  I've removed the sed line.  This means that people with USE="pcre -static"
that have zsh as a login shell might have some issues if /usr doesn't mount,
but if anyone is that worried about it, they can USE=static.

First Last Prev Next    No search results available      Search page      Enter new bug