<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>95603</bug_id>
          
          <creation_ts>2005-06-09 13:03 0000</creation_ts>
          <short_desc>gtkscintilla2 compiling crashes due to -fPIC error</short_desc>
          <delta_ts>2005-11-06 02:53:41 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mail@matthiasjansen.de</reporter>
          <assigned_to>gnome@gentoo.org</assigned_to>
          <cc>amd64@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>mail@matthiasjansen.de</who>
            <bug_when>2005-06-09 13:03:51 0000</bug_when>
            <thetext>When trying to emerge gtkscintilla2 it crashes due to the -fPIC error, but in
the ebuild the -fPIC CFLAG is set and it is used for compilation.

Reproducible: Always
Steps to Reproduce:
1. emerge gtkscintilla2
Actual Results:  
I ../include -I ../src  -c ../src/LexYAML.cxx
ar rc ../bin/scintilla.a DocumentAccessor.o WindowAccessor.o KeyWords.o
StyleContext.o Document.o CallTip.o ScintillaBase.o ContractionState.o Editor.o
ExternalLexer.o PropSet.o PlatGTK.o KeyMap.o LineMarker.o ScintillaGTK.o
CellBuffer.o ViewStyle.o RESearch.o Style.o Indicator.o AutoComplete.o
UniConversion.o XPM.o LexAda.o LexAsm.o LexAVE.o LexBaan.o LexBullant.o LexCLW.o
LexConf.o LexCPP.o LexCrontab.o LexCSS.o LexEiffel.o LexErlang.o LexEScript.o
LexForth.o LexFortran.o LexHTML.o LexLisp.o LexLout.o LexLua.o LexMatlab.o
LexMetapost.o LexMMIXAL.o LexMPT.o LexNsis.o LexOthers.o LexPascal.o LexPB.o
LexPerl.o LexPOV.o LexPS.o LexPython.o LexRuby.o LexScriptol.o LexSQL.o LexTeX.o
LexVB.o LexYAML.o
touch ../bin/scintilla.a
make[1]: Leaving directory
`/var/tmp/portage/gtkscintilla2-0.1.0/work/GtkScintilla2-0.1.0/scintilla/gtk&apos;
ar -rs libgtkscintilla2.a scintilla/bin/scintilla.a gtkscintilla.o marshal.o
ar: creating libgtkscintilla2.a
gcc  -Wl,--export-dynamic -L/usr/lib64 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0
-lgmodule-2.0 -ldl -lglib-2.0   -DGTK2 gtkscintilla.o marshal.o -shared
./scintilla/gtk/LexAda.o ./scintilla/gtk/LexAsm.o ./scintilla/gtk/LexAVE.o
./scintilla/gtk/LexBaan.o ./scintilla/gtk/LexBullant.o ./scintilla/gtk/LexCLW.o
./scintilla/gtk/LexConf.o ./scintilla/gtk/LexCPP.o ./scintilla/gtk/LexCrontab.o
./scintilla/gtk/LexCSS.o ./scintilla/gtk/LexEiffel.o ./scintilla/gtk/LexErlang.o
./scintilla/gtk/LexEScript.o ./scintilla/gtk/LexForth.o
./scintilla/gtk/LexFortran.o ./scintilla/gtk/LexHTML.o ./scintilla/gtk/LexLisp.o
./scintilla/gtk/LexLout.o ./scintilla/gtk/LexLua.o ./scintilla/gtk/LexMatlab.o
./scintilla/gtk/LexMetapost.o ./scintilla/gtk/LexMMIXAL.o
./scintilla/gtk/LexMPT.o ./scintilla/gtk/LexNsis.o ./scintilla/gtk/LexOthers.o
./scintilla/gtk/LexPascal.o ./scintilla/gtk/LexPB.o ./scintilla/gtk/LexPerl.o
./scintilla/gtk/LexPOV.o ./scintilla/gtk/LexPS.o ./scintilla/gtk/LexPython.o
./scintilla/gtk/LexRuby.o ./scintilla/gtk/LexScriptol.o ./scintilla/gtk/LexSQL.o
./scintilla/gtk/LexTeX.o ./scintilla/gtk/LexVB.o ./scintilla/gtk/LexYAML.o 
./scintilla/bin/scintilla.a -lstdc++ -o libgtkscintilla2.so.0.1.0
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
gtkscintilla.o: relocation R_X86_64_32 against `a local symbol&apos; can not be used
when making a shared object; recompile with -fPIC
gtkscintilla.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libgtkscintilla2.so.0.1.0] Error 1

!!! ERROR: x11-libs/gtkscintilla2-0.1.0 failed.
!!! Function src_compile, Line 42, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.


workstation  # emerge info
Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.11-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.11
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 13 2005, 16:11:58)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.7.9-r1, 1.6.3, 1.4_p6, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS=&quot;amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CFLAGS=&quot;-march=k8 -pipe -O2 -ffast-math -fomit-frame-pointer&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-march=k8 -pipe -O2 -ffast-math -fomit-frame-pointer&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoaddcvs autoconfig ccache distlocks sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://ftp.uni-erlangen.de/pub/Linux/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/&quot;
LANG=&quot;de_DE&quot;
LC_ALL=&quot;de_DE.UTF-8&quot;
LINGUAS=&quot;de&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;amd64 X Xaw3d acpi alsa bash-completion berkdb bitmap-fonts bzip2 cddb cdr
crypt cups curl dga dvd dvdr dvdread eds encode esd fam flac font-server fortran
gcj gif gimpprint gnome gpm gtk gtk+ gtk2 icq imagemagick ipv6 java jp2 jpeg
junit lirc lzw lzw-tiff mad matroska mp3 mpeg mplayer ncurses nls nvidia ogg
oggvorbis opengl oss pam perl png python quicktime readline real sdl slang speex
spell ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts unicode usb v4l
v4l2 vorbis xml2 xmms xpm xprint xrandr xv xvid zlib linguas_de userland_GNU
kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>stuff@whatafool.com</who>
            <bug_when>2005-07-07 14:09:39 0000</bug_when>
            <thetext>Tried to emerge with the addition of -fPIC in make.conf USE command, suggested
in forums.  No change and emerge failure at same point in compile.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zagafuta@kabsi.at</who>
            <bug_when>2005-07-08 07:27:41 0000</bug_when>
            <thetext>Created an attachment (id=62932)
Escapes the slashed in the sed script.

It&apos;s a bug in the ebuild.
GTHREAD_LDFLAGS contains slashes and sed doesn&apos;t like that.
Maybe it&apos;s better to do it directly in the sed command (untested):
sed -e &quot;/CFLAGS/s/-g/${CFLAGS} -fPIC/&quot; \
	-e &quot;s/^LDFLAGS_PRE =/LDFLAGS_PRE = $(echo ${GTHREAD_LDFLAGS} | sed
&apos;s|/|\\/|g&apos;)/&quot; -i Makefile
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jimlaflin@gmail.com</who>
            <bug_when>2005-08-03 14:11:42 0000</bug_when>
            <thetext>Changing
GTHREAD_LDFLAGS=&quot;$(pkg-config gthread-2.0 --libs)&quot;
to
GTHREAD_LDFLAGS=$(echo &quot;$(pkg-config gthread-2.0 --libs)&quot; | sed &apos;s|/|\\/|g&apos;)

as Philipp suggests, allows compilation here

Jim


emerge --info follows
Portage 2.0.51.22-r2 (default-linux/amd64/2005.0, gcc-3.4.3, glibc-2.3.5-r0,
2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;amd64&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-O2 -march=athlon64 -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/gconf /etc/splash /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-O2 -march=athlon64 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;autoconfig distlocks sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://gentoo.blueyonder.co.uk&quot;
MAKEOPTS=&quot;-j2&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/local/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;X aac alsa amarok amd64 avi berkdb bitmap-fonts cdb cdr crypt cups curl dvd
dvdr eds encode esd fam foomaticdb fortran gdbm gif gphoto2 gpm gstreamer gtk
gtk2 imagemagick imlib ipv6 java jpeg junit kde lzw lzw-tiff mad mikmod mp3 mpeg
msn ncurses nls nocd nvidia ogg oggvorbis opengl pam pdflib perl pic png python
qt quicktime readline real ruby sdl spell ssl tcltk tcpd theora tiff truetype
truetype-fonts type1-fonts usb userlocales v4l vcd vorbis xine xml2 xmms xpm xv
zlib userland_GNU kernel_linux elibc_glibc&quot;
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>obz@gentoo.org</who>
            <bug_when>2005-11-05 22:58:51 0000</bug_when>
            <thetext>I&apos;m fine to apply this, amd64 team - does this make sense (-fPIC help needed).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>blubb@gentoo.org</who>
            <bug_when>2005-11-06 02:53:41 0000</bug_when>
            <thetext>since this package only builds libraries (or well, one library ;)), it&apos;s fine to
apply -fPIC to everything. fixed in cvs</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>62932</attachid>
            <date>2005-07-08 07:27 0000</date>
            <desc>Escapes the slashed in the sed script.</desc>
            <filename>sed_bites.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGd0a3NjaW50aWxsYTItMC4xLjAuZWJ1aWxkCTIwMDQtMTAtMTkgMTE6Mzg6MzkuMDAwMDAw
MDAwICswMjAwCisrKyAvdXNyL2xvY2FsL3BvcnRhZ2UveDExLWxpYnMvZ3Rrc2NpbnRpbGxhMi9n
dGtzY2ludGlsbGEyLTAuMS4wLmVidWlsZAkyMDA1LTA3LTA4IDE1OjQwOjA4LjAwMDAwMDAwMCAr
MDIwMApAQCAtMjcsNyArMjcsNyBAQAogCiAJIyBzb21lIHF1aWNrIHRvdWNoZXMgdG8gdGhlIE1h
a2VmaWxlLCBidW1wIHRoZSB2ZXJzaW9uCiAJIyBhbmQgbWFrZSB1c2Ugb2Ygb3VyIENGTEFHUwot
CUdUSFJFQURfTERGTEFHUz0iJChwa2ctY29uZmlnIGd0aHJlYWQtMi4wIC0tbGlicykiCisJR1RI
UkVBRF9MREZMQUdTPSQoZWNobyAiJChwa2ctY29uZmlnIGd0aHJlYWQtMi4wIC0tbGlicykiIHwg
c2VkICdzfC98XFwvfGcnKQogCXNlZCAtZSAiL0NGTEFHUy9zLy1nLyR7Q0ZMQUdTfSAtZlBJQy8i
IFwKIAkJLWUgInMvXkxERkxBR1NfUFJFID0vTERGTEFHU19QUkUgPSAke0dUSFJFQURfTERGTEFH
U30vIiBcCiAJCS1pIE1ha2VmaWxlCg==
</data>        

          </attachment>
    </bug>

</bugzilla>