Bug 6954 - Compile fails on Solaris 10 x86
Summary: Compile fails on Solaris 10 x86
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: 6.5
Hardware: x86 (IA32) Solaris
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-18 01:13 UTC by Corey
Modified: 2015-11-30 23:42 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Here is the output from make solaris-x86-gcc (173.59 KB, text/plain)
2006-05-18 02:24 UTC, Corey
Details
solaris-x86-gcc config for shared libs (588 bytes, text/plain)
2006-05-18 08:50 UTC, Brian Paul
Details

Description Corey 2006-05-18 01:13:55 UTC
XSetWindowColormap                  ../../lib/libglut.a(glut_cindex.o)
XLoadQueryFont                      ../../lib/libglut.a(glut_menu.o)
ld: fatal: Symbol referencing errors. No output written to arbfplight
collect2: ld returned 1 exit status
make[3]: *** [arbfplight] Error 1
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.4.2/progs/demos'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.4.2/progs'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.4.2'
make: *** [solaris-x86-gcc] Error 2
Comment 1 Brian Paul 2006-05-18 01:25:44 UTC
Which Mesa config did you use to build?

It's probably an issue with the GLUT_LIB_DEPS or APP_LIB_DEPS variable.

It'd be interesting to see the original output from building GLUT.
Comment 2 Corey 2006-05-18 01:45:56 UTC
Sorry, i forgot to include that
i used the solaris-x86-gcc config

what do you want me to do to get you the GLUT output and i'll give it to you. 
Is there anything i can do here to fix it so that it will compile?
Comment 3 Brian Paul 2006-05-18 01:56:21 UTC
Do a 'make realclean'.  Then attach to this report the complete output of 'make
solaris-x86-gcc'.  That should give me the info I need.
Comment 4 Corey 2006-05-18 02:24:12 UTC
Created attachment 5656 [details]
Here is the output from make solaris-x86-gcc
Comment 5 Corey 2006-05-18 02:24:44 UTC
i have uploaded the output.
Thanks for the quick responses on everything
~Corey
Comment 6 Brian Paul 2006-05-18 02:38:25 UTC
Try adding -lX11 to the end of the APP_LIB_DEPS line in configs/solaris-x86-gcc

However, I see that this configuration is building static libraries instead of
dynamic libraries.  I'm not sure of the history of this config and why statis
libraries would be generated.  Are you interested in fixing that too?
Comment 7 Corey 2006-05-18 02:41:39 UTC
This is the solaris-x86-gcc file, i would assume it is telling to build static
libraries with MKLIB_OPTIONS = -static

# Configuration for Solaris on x86 with gcc, static libs

include $(TOP)/configs/default

CONFIG_NAME = solaris-x86-gcc

# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
CXXFLAGS = -O3 -m486 -fPIC
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static

GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11
-lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB)
-l$(GLU_LIB) -l$(GL_LIB) -lm

GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
Comment 8 Corey 2006-05-18 04:06:37 UTC
it still seems to by dying at the same point, any other ideas? 
If you tell me how i'll switch it to dynamic.
mklib: Making SunOS static library:  libGLw.a
a - GLwDrawA.o
ar: creating libGLw.a
ar: writing libGLw.a
mklib: Installing libGLw.a in ../../lib
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/src/glw'
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/src'
make[2]: Entering directory `/export/home/cdaley/Desktop/Mesa-6.5/progs'
Making programs for solaris-x86-gcc
make[3]: Entering directory `/export/home/cdaley/Desktop/Mesa-6.5/progs/demos'
cp ../../progs/util/readtex.c .
cp ../../progs/util/readtex.h .
gcc -c -I../../include -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM readtex.c
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
gcc -I../../include -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
arbfplight.c readtex.o -L../../lib -L/usr/openwin/lib -R/usr/openwin/lib -lglut
-lGLU -lGL -lm -lX11 -o arbfplight
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
Undefined                       first referenced
 symbol                             in file
XQueryDeviceState                   ../../lib/libglut.a(glut_input.o)
XShmAttach                          ../../lib/libGL.a(xm_api.o)  (symbol belongs
to implicit dependency /usr/openwin/lib/libXext.so.0)
XShmDetach                          ../../lib/libGL.a(xm_api.o)  (symbol belongs
to implicit dependency /usr/openwin/lib/libXext.so.0)
XFreeDeviceState                    ../../lib/libglut.a(glut_input.o)
XListInputDevices                   ../../lib/libglut.a(glut_input.o)
XOpenDevice                         ../../lib/libglut.a(glut_input.o)
XShmCreateImage                     ../../lib/libGL.a(xm_api.o)  (symbol belongs
to implicit dependency /usr/openwin/lib/libXext.so.0)
XFreeDeviceList                     ../../lib/libglut.a(glut_input.o)
XSelectExtensionEvent               ../../lib/libglut.a(glut_input.o)
XShmPutImage                        ../../lib/libGL.a(xm_api.o)  (symbol belongs
to implicit dependency /usr/openwin/lib/libXext.so.0)
XGetExtensionVersion                ../../lib/libglut.a(glut_input.o)
XmuLookupStandardColormap           ../../lib/libglut.a(glut_cmap.o)
XShmQueryVersion                    ../../lib/libGL.a(xm_api.o)  (symbol belongs
to implicit dependency /usr/openwin/lib/libXext.so.0)
ld: fatal: Symbol referencing errors. No output written to arbfplight
collect2: ld returned 1 exit status
make[3]: *** [arbfplight] Error 1
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs/demos'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5'
make: *** [solaris-x86-gcc] Error 2
Comment 9 Brian Paul 2006-05-18 04:12:25 UTC
Also add -lXext and maybe -lXi also.

Once we get this going, we can try the dynamic library.
Comment 10 Corey 2006-05-18 04:29:25 UTC
i added the first one and no change, i added the second one and got 
mklib: Making SunOS static library:  libGLw.a
a - GLwDrawA.o
ar: creating libGLw.a
ar: writing libGLw.a
mklib: Installing libGLw.a in ../../lib
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/src/glw'
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/src'
make[2]: Entering directory `/export/home/cdaley/Desktop/Mesa-6.5/progs'
Making programs for solaris-x86-gcc
make[3]: Entering directory `/export/home/cdaley/Desktop/Mesa-6.5/progs/demos'
cp ../../progs/util/readtex.c .
cp ../../progs/util/readtex.h .
gcc -c -I../../include -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM readtex.c
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
gcc -I../../include -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
arbfplight.c readtex.o -L../../lib -L/usr/openwin/lib -R/usr/openwin/lib -lglut
-lGLU -lGL -lm -lX11 -lXext  -lXi -o arbfplight
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
Undefined                       first referenced
 symbol                             in file
XmuLookupStandardColormap           ../../lib/libglut.a(glut_cmap.o)
ld: fatal: Symbol referencing errors. No output written to arbfplight
collect2: ld returned 1 exit status
make[3]: *** [arbfplight] Error 1
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs/demos'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5'
make: *** [solaris-x86-gcc] Error 2
Comment 11 Brian Paul 2006-05-18 05:12:44 UTC
-lXmu should fix that.

Let me know the exact APP_LIB_DEPS line that works for you in the end.
Comment 12 Corey 2006-05-18 05:20:28 UTC
it made it a lot farther, but i get this error now..
`-m486' is deprecated. Use `-march=i486' or `-mcpu=i486' instead.
Undefined                       first referenced
 symbol                             in file
operator new[](unsigned)            ../../lib/libGLU.a(tobezier.o)
operator new(unsigned)              ../../lib/libGLU.a(glinterface.o)
vtable for __cxxabiv1::__si_class_type_info../../lib/libGLU.a(glrenderer.o)
operator delete[](void*)            ../../lib/libGLU.a(quilt.o)
operator delete(void*)              ../../lib/libGLU.a(glinterface.o)
vtable for __cxxabiv1::__vmi_class_type_info../../lib/libGLU.a(slicer.o)
vtable for __cxxabiv1::__class_type_info../../lib/libGLU.a(cachingeval.o)
__gxx_personality_v0                ../../lib/libGLU.a(glinterface.o)
__cxa_pure_virtual                  ../../lib/libGLU.a(basicsurfeval.o)
ld: fatal: Symbol referencing errors. No output written to nurbs
collect2: ld returned 1 exit status
make[3]: *** [nurbs] Error 1
make[3]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs/redbook'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5/progs'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/export/home/cdaley/Desktop/Mesa-6.5'
make: *** [solaris-x86-gcc] Error 2
Comment 13 Brian Paul 2006-05-18 05:24:38 UTC
The GLU library uses some C++ code so you need to link with the C++ runtime
library.  My guess is -lc++ or -lcpp or something like that.  It would probably
be found in /usr/lib or /lib.
Comment 14 Corey 2006-05-18 06:38:36 UTC
after all was said and done, this worked..
# Configuration for Solaris on x86 with gcc, static libs

include $(TOP)/configs/default

CONFIG_NAME = solaris-x86-gcc

# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
CXXFLAGS = -O3 -m486 -fPIC
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS =

GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11
-lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB)
-l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext  -lXi -lXmu

GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a
GLW_LIB_NAME = libGLw.a
OSMESA_LIB_NAME = libOSMesa.a
Comment 15 Brian Paul 2006-05-18 08:50:06 UTC
Created attachment 5672 [details]
solaris-x86-gcc config for shared libs

OK, I'm going to move solaris-x86-gcc to solaris-x86-gcc-static and make the
new solaris-x86-gcc generate a shared lib.  Try the attached config file for
that.
Comment 16 Corey 2006-05-18 22:50:54 UTC
The config you posted does not work, but this one does..

# Configuration for Solaris on x86 with gcc, dynamic libs

include $(TOP)/configs/default

CONFIG_NAME = solaris-x86-gcc

# Compiler and flags
CC = gcc
CXX = g++
CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
CXXFLAGS = -O3 -m486 -fPIC
GLUT_CFLAGS = -fexceptions

GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11
-lXmu -lXt -lXi -lm
APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB)
-l$(GLU_LIB) -l$(GL_LIB) -lm -lX11 -lXext  -lXi -lXmu
~
 you left off all the stuff we added on the end of APP_LIB_DEPS
Comment 17 Brian Paul 2006-05-18 23:55:05 UTC
The idea is to put the dependencies on X11, Xext, etc. into the individual
libraries (GL, GLUT, etc) so that the application developer doesn't have to
worry about libraries not directly used by the application.

This works on Linux and others, but not all unix systems, maybe not Solaris.

I'll check in the config with the extra APP_LIB_DEPS.
Comment 18 Brian Paul 2006-05-19 03:04:48 UTC
I've also updated the compiler flags to use -march=i486 instead of -m486 as the
warning messages indicate.
Comment 19 chemtech 2013-03-15 08:09:37 UTC
Corey,
Do you still experience this issue with newer soft?
Please check the status of your issue.
Comment 20 Ian Romanick 2015-11-30 23:42:25 UTC
I'm going to close this (very old bug).  I know that Mesa has built on Solaris since 2006.  I believe that there are other build problems, and those are tracked by other bugs (submitted by Vinson Lee).


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.