Bug 3485 - unable to compile mesa on solaris 10/amd64
Summary: unable to compile mesa on solaris 10/amd64
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Demos (show other bugs)
Version: 6.2.1
Hardware: x86 (IA32) Solaris
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-06 23:44 UTC by Daniel Stone
Modified: 2015-11-30 23:46 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
result of make (111.48 KB, text/plain)
2005-06-09 05:51 UTC, FreeDesktop Bugzilla Database Corruption Fix User
Details

Description FreeDesktop Bugzilla Database Corruption Fix User 2005-06-06 23:44:56 UTC
after doing make solaris-x86, a file configs/solaris-x86 is created, but don't
contains:
-lglut -lGLU -lGL
in APP_LIB_DEPS
then there is this error:
cc -I../../include -Xa -xO3 -xpentium -KPIC -I/usr/openwin/include -DUSE_XSHM
nurbs.c -L../../lib -L/usr/openwin/lib -R/usr/openwin/lib -lX11 -lXext -lXmu
-lXi -lm -lglut -lGLU -lGL -o nurbs
Undefined                       first referenced
 symbol                             in file
__1cG__CrunMex_rethrow_q6F_v_       ../../lib/libGLU.a(glinterface.o)
__1c2N6FI_pv_                       ../../lib/libGLU.a(tobezier.o)
__1c2n6FI_pv_                       ../../lib/libGLU.a(glinterface.o)
__1c2K6Fpv_v_                       ../../lib/libGLU.a(quilt.o)
__1c2k6Fpv_v_                       ../../lib/libGLU.a(glinterface.o)
ld: fatal: Symbol referencing errors. No output written to nurbs
*** Error code 1
make: Fatal error: Command failed for target `nurbs'
Current working directory /local/henry/Mesa-6.2.1/progs/redbook
Comment 1 Brian Paul 2005-06-07 08:29:57 UTC
configs/solaris-x86 isn't created during compilation; it exists from the start.

I'm adding -lglut -lGLU -lGL to the APP_LIB_DEPS line.

The undefined symbols are probably coming from libGLU which contains C++ code
and needs to be linked with the C++ runtime library.  We probably need to fix
something in the bin/mklib script.

Can you do the following:

rm -f lib/libGLU*
make

Send me the complete output from the 'make' command.  That might give me some ideas.
Comment 2 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 05:51:53 UTC
Created attachment 2855 [details]
result of make
Comment 3 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 05:54:59 UTC
(In reply to comment #1)

> Can you do the following:
> 
> rm -f lib/libGLU*
> make
> 
yes, it works because it does nothing
if i do 
gmake clean
make solaris-x86 |& tee MAKE.LOG

> Send me the complete output from the 'make' command.  That might give me some
ideas.

yes, i sent it

thanks for your help,
Comment 4 Brian Paul 2005-06-09 08:22:32 UTC
Do you want/need static libraries?  That's what's getting built now.  Perhaps
you'd be better off with dynamic libraries.  If you want to try that, edit
configs/solaris-x86 and remove/disable the MKLIB_OPTIONS line.

Otherwise, you'll need to find the name of the C++ runtime library on Solaris. 
It's probably somewhere in /usr/lib/ or /lib/.  The name of the library will
have to be added to the objects put into the static library.  The bin/mklib
script's SunOS section for making a static lib would need lines like this added:

if [ $CPLUSPLUS = 1 ] ; then
   OBJECTS="${OBJECTS} libc++.so"
fi

Comment 5 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 08:45:24 UTC
(In reply to comment #4)

> Otherwise, you'll need to find the name of the C++ runtime library on Solaris. 
> It's probably somewhere in /usr/lib/ or /lib/.  The name of the library will
> have to be added to the objects put into the static library.  The bin/mklib
> script's SunOS section for making a static lib would need lines like this added:

i'm not sure what you mean here, had to something like:
    'SunOS')
        if [ $STATIC = 1 ] ; then
            LIBNAME="lib${LIBNAME}.a"
            echo "mklib: Making SunOS static library: " ${LIBNAME}
            rm -f ${LIBNAME}
if [ $CPLUSPLUS = 1 ] ; then
   OBJECTS="${OBJECTS} libCrun.so.1"
fi
            ar -ruv ${LIBNAME} ${OBJECTS}
            FINAL_LIBS=${LIBNAME}


but errors are about cc used instead of CC?
Had to manually change cc to CC for "nurbs, surface, nurb and trim"

Comment 6 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 08:48:08 UTC
another problem when i need to compile an application that depends on mesa libs,
my application needs GLwCreateMDrawingArea(), and this function is never
compiled because macro __GLX_MOTIF isn't defined anywhere
if i type:
cc -c -I../../include -I/usr/dt/include -I/usr/X11R6/include -Xa -xO3 -xpentium
-KPIC -I/usr/openwin/include -DUSE_XSHM -D__GLX_MOTIF GLwDrawA.c

it works well
what's the meaning of __GLX_MOTIF? what's the best way to define it?

thanks,
Comment 7 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 08:57:09 UTC
another problem i forgot to mentionned is when i did "make install", my
application needs GLwDrawA.h, but this file is never installed, perhaps you have
to add it?
Comment 8 FreeDesktop Bugzilla Database Corruption Fix User 2005-06-09 09:07:07 UTC
(In reply to comment #6)

> what's the meaning of __GLX_MOTIF? what's the best way to define it?
> 

i dont understand when __GLX_MOTIF is defined to 1
GLwMDrawA.c:39:#define __GLX_MOTIF 1
GLwMDrawA.h:39:#define __GLX_MOTIF 1
GLwMDrawAP.h:39:#define __GLX_MOTIF 1

but this GLwDrawA.c that is compiled, and it never uses this above files, isn'it?
Comment 9 Brian Paul 2005-06-20 12:48:59 UTC
The configs/default file has some info about building the Motif GL drawing area
widget.

I'm not sure I understand your comment about mklib.  Did you or did you not
change mklib as I suggested?  If you did change it, did the change work? 

I also don't understand what you meant by "Had to manually change cc to CC for
"nurbs, surface, nurb and trim""

If you've made changes to Mesa, please provide patches so I can incorporate your
fixes.

-Brian
Comment 10 Daniel Stone 2007-03-07 11:39:35 UTC
unfortunately, the reporter's account was lost in the bugzilla disk death.
Comment 11 chemtech 2013-03-26 08:00:28 UTC
Daniel Stone,
Do you still experience this issue with newer soft ?
Please check the status of your issue.
Or close this bug.
Comment 12 Ian Romanick 2015-11-30 23:46:35 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.