Subject: pkg/31075: SDL-1.2.8 Solaris10 gcc x86 don't compile
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 08/26/2005 08:30:00
>Number:         31075
>Category:       pkg
>Synopsis:       SDL-1.2.8 Solaris10 gcc x86 don't compile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 26 08:30:00 +0000 2005
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic i86pc


>Description:


cd ../.. && bmake  am--refresh
cd .. && bmake  am--refresh
/bin/ksh ../libtool --mode=link gcc  -O -I/usr/pkg/include -I/usr/include -DGLX_GLXEXT_LEGACY -Wall -D__ELF__ -DENABLE_DUMMYVIDEO -DDISKAUD_SUPPORT -DUSE_DLOPEN -DUSE_ASMBLIT -I./hermes -I../src/hermes  -I/usr/openwin/include -DENABLE_X11 -DXTHREADS -I./include -I./src/video -DXFREE86_VM -DXFREE86_VMGAMMA -DXFREE86_DGAMOUSE -DDEFAULT_DGAMOUSE -DXFREE86_XV -DHAVE_XINERAMA -DENABLE_AALIB -DHAVE_OPENGL -D_REENTRANT -DSDL_USE_PTHREADS -DPTHREAD_NO_RECURSIVE_MUTEX -DHAVE_SIGACTION -DSUNAUDIO_SUPPORT -I../include -I../include/SDL -I../src -I../src/main/solaris -I../src/audio -I../src/video -I../src/video/XFree86/extensions -I../src/events -I../src/joystick -I../src/cdrom -I../src/thread -I../src/timer -I../src/endian -I../src/file -I../src/thread   -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib -o libSDL.la -rpath /usr/pkg/lib -no-undefined            -version-info 1:8:0 SDL.lo SDL_error.lo SDL_fatal.lo SDL_getenv.lo  SDL_loads
 o.lo main/libarch.la               audio/libaudio.la video/libvideo.la events/libevents.la joystick/libjoystick.la cdrom/libcdrom.la thread/libthread.la timer/libtimer.la endian/libendian.la file/libfile.la cpuinfo/libcpuinfo.la hermes/libhermes.la           -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib -lm  -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -L/usr/pkg/lib -R/usr/pkg/lib -laa-x11 -lm -lsocket -lnsl -lX11 -lpthread -lposix4
gcc -shared -Wl,-h -Wl,libSDL.so.1 -o .libs/libSDL.so.1.0.8  .libs/SDL.o .libs/SDL_error.o .libs/SDL_fatal.o .libs/SDL_getenv.o .libs/SDL_loadso.o -Wl,-z -Wl,allextract,main/.libs/libarch.a,audio/.libs/libaudio.a,video/.libs/libvideo.a,events/.libs/libevents.a,joystick/.libs/libjoystick.a,cdrom/.libs/libcdrom.a,thread/.libs/libthread.a,timer/.libs/libtimer.a,endian/.libs/libendian.a,file/.libs/libfile.a,cpuinfo/.libs/libcpuinfo.a,hermes/.libs/libhermes.a -Wl,-z -Wl,defaultextract  -R/usr/sfw/lib -R/usr/pkgsrc/devel/SDL/work/.buildlink/lib -R/usr/sfw/lib -R/usr/pkgsrc/devel/SDL/work/.buildlink/lib -R/usr/openwin/lib -R/usr/pkg/lib -L/usr/pkgsrc/devel/SDL/work/.buildlink/lib -L/usr/pkgsrc/devel/SDL/work/.x11-buildlink/lib /usr/sfw/lib/libstdc++.so -L/usr/sfw/lib -lc -lXext /usr/pkgsrc/devel/SDL/work/.buildlink/lib/libaa-x11.so -lm -lsocket -lnsl -lX11 -lpthread -lposix4 -lc  -Wl,-R/usr/pkg/lib -Wl,-R/usr/openwin/lib
Text relocation remains                         referenced
    against symbol                  offset      in file
<unknown>                           0x3         hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x8e        hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x95        hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x9c        hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x13a       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x141       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x148       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x1e6       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x1f2       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x1f9       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x216       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x220       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x24c       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x25c       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x28d       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x297       hermes/.libs/libhermes.a(mmxp2_32.o)
<unknown>                           0x55        hermes/.libs/libhermes.a(x86_main.o)
<unknown>                           0x5b        hermes/.libs/libhermes.a(x86_main.o)
_copy_row                           0x4cc       video/.libs/libvideo.a(SDL_stretch.o)
_mmxreturn                          0x87        hermes/.libs/libhermes.a(mmxp2_32.o)
_mmxreturn                          0x133       hermes/.libs/libhermes.a(mmxp2_32.o)
_mmxreturn                          0x1df       hermes/.libs/libhermes.a(mmxp2_32.o)
_mmxreturn                          0x2eb       hermes/.libs/libhermes.a(mmxp2_32.o)
_x86return                          0x30        hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0xcd        hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0xf9        hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x191       hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x1cd       hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x27c       hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x2b4       hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x379       hermes/.libs/libhermes.a(x86p_16.o)
_x86return                          0x18        hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x70        hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x8a        hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0xd8        hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0xf1        hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x13a       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x15d       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x1dd       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x200       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x27d       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x2aa       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x348       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x375       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x41b       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x448       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x4e6       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x513       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x5b9       hermes/.libs/libhermes.a(x86p_32.o)
_x86return                          0x66d       hermes/.libs/libhermes.a(x86p_32.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/SDL/work/SDL-1.2.8/src
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/devel/SDL/work/SDL-1.2.8/src
[root@redhot 954] 



>How-To-Repeat:


bmake in SDL


>Fix:


that's a work around add -mimpure-text in makefile or compile the .c file

diff -r ./work/SDL-1.2.8/src/Makefile /net/redhot/usr/pkgsrc/devel/SDL/work/SDL-1.2.8/src/Makefile
144c144
< LDFLAGS = -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib -mimpure-text
---
> LDFLAGS = -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/lib -L/usr/openwin/lib -Wl,-R/usr/openwin/lib