Building MesaLib with gccfss

Hi, I'm trying to build a load of packages with gccfss and currently it fails on MesaLib with the following error messages:

gcc -shared -Wl,-h -Wl,libOSMesa.so.6 -o .libs/libOSMesa.so.6.0.4 drivers/osmesa/.libs/osmesa.o -R/opt/pkg.obj/graphics/MesaLib/work.ultra10/Mesa-6.4.2/src/mesa/.libs -R/opt/pkg/lib -L/opt/pkg.obj/graphics/MesaLib/work.ultra10/Mesa-6.4.2/lib ./.libs/libGL.so -L/opt/pkg.obj/graphics/MesaLib/work.ultra10/.x11-buildlink/lib -L/opt/pkg.obj/graphics/MesaLib/work.ultra10/.buildlink/lib -lc

Text relocation remains referenced

against symboloffsetin file

<unknown>0x178/opt/SUNW0scgfss/4.0.4/prod/lib/v8plusa/libmopt.a(f_cos.o)

<unknown>0x18c/opt/SUNW0scgfss/4.0.4/prod/lib/v8plusa/libmopt.a(f_cos.o)

<unknown>0x568/opt/SUNW0scgfss/4.0.4/prod/lib/v8plusa/libmopt.a(f_cos.o)

<unknown>0x640/opt/SUNW0scgfss/4.0.4/prod/lib/v8plusa/libmopt.a(f_cos.o)

... and so on

ld: fatal: relocations remain against allocatable but non-writable sections

collect2: ld returned 1 exit status

*** Error code 1

I don't understand what those error messages mean. I noticed Makefiles in MesaLib pass -ffast-math to gcc, could it be causing problems?

Message was edited by:

segv

[1291 byte] By [segva] at [2007-11-27 6:47:00]
# 1
GCCfss's -O3 and -fast flags include libmopt.a library which seems to cause these messages.Could you try linking without -O3 or -fast flags ? Plain -O2 or -O should do fine.In the mean time we'll try to reproduce this problem.
alexey_a at 2007-7-12 18:19:30 > top of Java-index,Open Source Technologies,OpenSPARC...
# 2

Mesa-6.5.3 builds fine with the following config:

CONFIG_NAME = sunos5-smp

CC = gcc

CXX = g++

CFLAGS = -fPIC -fast -xlibmil -xsafe=mem -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DSOLARIS_2_4_BUG

CXXFLAGS = -fPIC -fast -xlibmil -xsafe=mem -I/usr/openwin/include -I/usr/dt/include

GLUT_CFLAGS = -DSOLARIS_2_4_BUG

Original sunos5-gcc setup fails much earlier than linking on some assembler file.

What kind of setup do you use and what version of MesaLib ?

alexey_a at 2007-7-12 18:19:30 > top of Java-index,Open Source Technologies,OpenSPARC...
# 3

I build it with the following config:

CONFIG_NAME = sunos5-gcc

# Compiler and flags

CC = gcc

CXX = g++

WARN_FLAGS = -Wall

OPT_FLAGS = -O3 -g -fomit-frame-pointer -pipe

PIC_FLAGS = -fPIC

ARCH_FLAGS ?=

DEFINES = -D_REENTRANT -DUSE_XSHM

ASM_SOURCES = $(SPARC_SOURCES) $(SPARC_API)

ASM_FLAGS = -DUSE_SPARC_ASM

CFLAGS= $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \

$(ASM_FLAGS) -std=c99 -ffast-math -I/usr/openwin/include

CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \

-I/usr/openwin/include

GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG

I'll try removing -ffast-math and -O3 and see how that goes. By the way this is Mesa-6.4.2

Message was edited by:

segv

segva at 2007-7-12 18:19:30 > top of Java-index,Open Source Technologies,OpenSPARC...
# 4
OK, removing -ffast-math and -O3 fixed the problem
segva at 2007-7-12 18:19:30 > top of Java-index,Open Source Technologies,OpenSPARC...