Subject: pkg/32553: graphics/MesaLib 64bits gcc solaris10 compiler
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 01/17/2006 15:05:03
>Number:         32553
>Category:       pkg
>Synopsis:       graphics/MesaLib 64bits gcc solaris10 compiler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 17 15:05:02 +0000 2006
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic_118844-20 i86pc


>Description:


there is no way to compile MesaLib with a 64 bit gcc solaris10 compiler.
work/Mesa-6.2.1/configs/solaris-x86-gcc is worg in this case


>How-To-Repeat:





>Fix:


Patch for Mesa/Makefile.common
file MesaLib/patches/patch-ac, MesaLib/patches/patch-ak, MesaLib/patches/patch-al


Patch for Mesa/Makefile.common
--------------------------------------
[root@redhot 1249] diff -bu Mesa/Makefile.common.orig Mesa/Makefile.common
--- Mesa/Makefile.common.orig   Tue Nov  8 17:41:30 2005
+++ Mesa/Makefile.common        Tue Jan 17 15:16:32 2006
@@ -47,9 +47,13 @@
 .    if !empty(PKGSRC_COMPILER:Msunpro)
 BUILD_TARGET=          solaris-x86
 .    else
+.      if defined(ABI) && ${ABI} == "64"
+BUILD_TARGET=          solaris-x86-64-gcc
+.      else
 BUILD_TARGET=          solaris-x86-gcc
 .    endif
 .  endif
+.  endif
 .elif ${OPSYS} == "Interix"
 BUILD_TARGET=          interix3
 .else
------------------------------------------------------------
file MesaLib/patches/patch-ac
------------------------------------------------------------
[root@redhot 1250] cat MesaLib/patches/patch-ac
--- Makefile.orig       Sun Dec  5 19:25:19 2004
+++ Makefile    Tue Jan 17 15:21:43 2006
@@ -2,7 +2,7 @@
 
 TOP = .
 
-SUBDIRS = src progs
+SUBDIRS = src
 
 
 default: $(TOP)/configs/current
@@ -64,6 +64,7 @@
 hpux11-64-static \
 hpux9 \
 hpux9-gcc \
+interix3 \
 irix6-64 \
 irix6-64-static \
 irix6-n32 \
@@ -100,10 +101,12 @@
 linux-x86-glide \
 linux-x86-static \
 netbsd \
+pkgsrc \
 openbsd \
 osf1 \
 solaris-x86 \
 solaris-x86-gcc \
+solaris-x86-64-gcc \
 sunos4 \
 sunos4-gcc \
 sunos4-static \
-------------------------------------------------
file MesaLib/patches/patch-ak
-------------------------------------------------
[root@redhot 1251] cat MesaLib/patches/patch-ak
--- configs/solaris-x86-gcc.orig        Mon Sep 13 23:00:36 2004
+++ configs/solaris-x86-gcc     Tue Aug 23 13:03:07 2005
@@ -10,15 +10,15 @@
 CFLAGS = -O3 -m486 -fPIC -I/usr/openwin/include -DUSE_XSHM
 CXXFLAGS = -O3 -m486 -fPIC
 GLUT_CFLAGS = -fexceptions
-MKLIB_OPTIONS = -static
+#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
+APP_LIB_DEPS = -L$(LIB_DIR) -L/usr/openwin/lib -R/usr/openwin/lib -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -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
+#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
------------------------------------------------------------------
file MesaLib/patches/patch-al
------------------------------------------------------------------
[root@redhot 1252] cat MesaLib/patches/patch-al
$

--- /dev/null   Tue Jan 17 13:06:04 2006
+++ configs/solaris-x86-64-gcc  Tue Jan 17 14:33:09 2006
@@ -0,0 +1,17 @@
+# Configuration for Solaris on x86 with gcc, static libs
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = solaris-x86-64-gcc
+
+# Compiler and flags
+CC = gcc
+CXX = g++
+CFLAGS = -m64 -O3 -fPIC -I${X11BASE}/include -DUSE_XSHM
+CXXFLAGS = -m64 -O3 -fPIC
+GLUT_CFLAGS = -fexceptions
+
+GL_LIB_DEPS = -L${X11BASE}/lib/64 -R${X11BASE}/lib/64 -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${X11BASE}/lib/64 -R${X11BASE}/lib/64 -lX11 -lXmu -lXt -lXi -lm
+APP_LIB_DEPS = -L$(LIB_DIR) -L${X11BASE}/lib/64 -R${X11BASE}/lib/64 -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lX11 -lXext -lm
-----------------------------------------------------------------------