• Bug#265214: newt: FTBFS on amd64: Missing '-fPIC'

    From Andreas Jochens@1:229/2 to All on Thu Aug 12 10:00:12 2004
    From: [email protected]

    Package: newt
    Severity: normal
    Tags: patch

    When building 'newt' on amd64 I get the following error:

    cc -shared -fPIC -o whiptcl.so whiptcl.o dialogboxes.o -L . -lnewt -ltcl8.3 -lslang -lpopt -lm
    /usr/bin/ld: ./libnewt.a(newt.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
    ./libnewt.a: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make[1]: *** [whiptcl.so] Error 1
    make[1]: Leaving directory `/newt-0.51.6/build-tree/newt-0.51.6'

    With the attached patch 'newt' can be compiled on amd64.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/newt-0.51.6/debian/patches/995_fPIC.patch ./debian/patches/995_fPIC.patch
    --- ../tmp-orig/newt-0.51.6/debian/patches/995_fPIC.patch 1970-01-01 01:00:00.000000000 +0100
    +++ ./debian/patches/995_fPIC.patch 2004-08-12 09:29:23.600996364 +0200
    @@ -0,0 +1,11 @@
    +--- Makefile.in 2004-08-12 08:53:27.050362000 +0200
    ++++ newt-0.51.6/Makefile.in 2004-08-12 09:29:12.539099756 +0200
    +@@ -3,7 +3,7 @@
    + LIBTCL = -ltcl8.3
    +
    + GPM_SUPPORT=@gpm_support@
    +-CFLAGS = $(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -g -O2 -DUTF8
    ++CFLAGS = $(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -g -O2 -DUTF8 -fPIC
    +
    + SHLIBFLAGS= -Wl,-O1 -Wl,--version-script,newt.0.51.ver
    + VERSION = @VERSION@



    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)