Bug 3243 - libGLU not built properly on Solaris with Sun C++ compiler
Summary: libGLU not built properly on Solaris with Sun C++ compiler
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Build/Monolithic (show other bugs)
Version: git
Hardware: All Solaris
: high normal
Assignee: Alan Coopersmith
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-08 14:01 UTC by Alan Coopersmith
Modified: 2011-10-15 15:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch to fix libGLU/glxinfo builds on Solaris (2.21 KB, patch)
2005-05-08 14:06 UTC, Alan Coopersmith
alan.coopersmith: 6.8-branch?
Details | Splinter Review

Description Alan Coopersmith 2005-05-08 14:01:55 UTC
If you use the Sun compilers to build on Solaris, glxinfo fails to
build because it can't find libGLU:

LD_RUN_PATH=/usr/X11R6/lib cc -o glxinfo -xO4 -xbuiltin=%all -xlibmil -xstrconst
-xpentium -xregs=no%frameptr -Xa -v -zlazyload -zcombreloc -xstrconst -xildoff 
-Wl,-M,/usr/lib/ld/map.noexstk -mt  -L../../exports/lib   glxinfo.o -lGLU -lGL
-lXext -lX11   -lm -lsocket -lnsl  -Wl,-z,lazyload -xO4 -xbuiltin=%all -xlibmil
-xstrconst -xpentium -xregs=no%frameptr
ld: fatal: library -lGLU: not found
ld: fatal: File processing errors. No output written to glxinfo
*** Error code 1

This is because the C++ library building rule only installed a symlink for
libGLU.so.1.3 in ../../exports/lib and not a libGLU.so symlink.

Fixing that allows libGLU to be found, but glxinfo still won't link:
LD_RUN_PATH=/usr/X11R6/lib cc -o glxinfo -xO4 -xbuiltin=%all -xlibmil -xstrconst
-xpentium -xregs=no%frameptr -Xa -v -zlazyload -zcombreloc -xstrconst -xildoff 
-Wl,-M,/usr/lib/ld/map.noexstk -mt  -L../../exports/lib   glxinfo.o -lGLU -lGL
-lXext -lX11   -lm -lsocket -lnsl  -Wl,-z,lazyload -xO4 -xbuiltin=%all -xlibmil
-xstrconst -xpentium -xregs=no%frameptr
Undefined                       first referenced
 symbol                             in file
__1cG__CrunKpure_error6F_v_         ../../exports/lib/libGLU.so
__1cG__CrunMex_rethrow_q6F_v_       ../../exports/lib/libGLU.so
__1c2N6FI_pv_                       ../../exports/lib/libGLU.so
__1c2n6FI_pv_                       ../../exports/lib/libGLU.so
__1c2K6Fpv_v_                       ../../exports/lib/libGLU.so
__1c2k6Fpv_v_                       ../../exports/lib/libGLU.so
ld: fatal: Symbol referencing errors. No output written to glxinfo
*** Error code 1

This is because the library dependencies for libGLU on Solaris aren't set to
include the C++ runtime library.

Fixing that allows glxinfo to build successfully.   Patch to do so follows next.
Comment 1 Alan Coopersmith 2005-05-08 14:06:29 UTC
Created attachment 2635 [details] [review]
Patch to fix libGLU/glxinfo builds on Solaris

Patch to change Imake config files to:
 - Set C++ runtime library to -lCrun when using Sun C++ 5.0 or newer
 - Make .so -> .so.$REV links in $TOP/export/lib for C++ libraries on
   SVR4 in the same way we already do for C libraries
 - Set libGLU required libraries list for Solaris
Comment 2 Alan Coopersmith 2005-05-08 14:14:58 UTC
Fix committed to CVS head:

CVSROOT:	/cvs/xorg
Module name:	xc
Changes by:	alanc@gabe.freedesktop.org	05/05/08 14:13:36

Log message:
  2005-05-08  Alan Coopersmith  <alan.coopersmith@sun.com>
  
          * xc/config/cf/sun.cf:
          * xc/config/cf/sunLib.tmpl:
          * xc/config/cf/sv4Lib.rules:
          Bugzilla #3243: https://bugs.freedesktop.org/show_bug.cgi?id=3243
          Patch #2635: https://bugs.freedesktop.org/attachment.cgi?id=2635
          libGLU/glxinfo build fixes for Sun C++ compiler on Solaris:
           - Set C++ runtime library to -lCrun when using Sun C++ 5.0 or newer
           - Make .so -> .so.$REV links in $TOP/export/lib for C++ libraries on
             SVR4 in the same way we already do for C libraries
           - Set libGLU required libraries list for Solaris

Modified files:
      ./:
        ChangeLog 
      xc/config/cf/:
        sun.cf sunLib.tmpl sv4Lib.rules 
  
  Revision      Changes    Path
  1.913         +13 -0     xc/ChangeLog
  1.12          +5 -0      xc/config/cf/sun.cf
  1.7           +2 -1      xc/config/cf/sunLib.tmpl
  1.5           +4 -0      xc/config/cf/sv4Lib.rules



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.