Subject: pkg/32562: audio/nas Solaris10 gcc
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 01/18/2006 14:35:00
>Number:         32562
>Category:       pkg
>Synopsis:       audio/nas Solaris10 gcc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 18 14:35:00 +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:


1) bmake in audio/nas have compile errors and
don't exit with error code, so bmake continue to build!!!
2) -mt is not a gcc3.4.3 option
----------------------------------------------
making all in lib/audio...
rm -f AlibAsync.o unshared/AlibAsync.o
gcc -fpcc-struct-return -c   -I../../include -I/usr/pkg/include  -Dsun -Di386 -DSVR4 -DSYSV   -DXTHREADS
 -mt  -D_REENTRANT -DMALLOC_0_RETURNS_NULL  -O2  AlibAsync.c
cc1: error: invalid option `t'
*** Error code 1
make: Fatal error: Command failed for target `AlibAsync.o'
Current working directory /usr/pkgsrc/audio/nas/work/nas-1.7b/lib/audio
*** Error code 1
The following command caused the error:
case '' in *[ik]*) set +e;; esac; \
for i in audio ;\
do \
(cd $i ; echo "making" all "in lib/$i..."; \
/usr/ccs/bin/make  'CDEBUGFLAGS=-O2' all); \
done
make: Fatal error: Command failed for target `all'
Current working directory /usr/pkgsrc/audio/nas/work/nas-1.7b/lib
making all in ./clients...
making all in clients/audio...
making all in clients/audio/widgets...
gcc -fpcc-struct-return -O2    -I../../../include -I/usr/pkg/include  -Dsun -Di386 -DSVR4 -DSYSV     -I/
usr/pkg/include -c  Slider.c
Slider.c: In function `setValue':
Slider.c:153: warning: cast to pointer from integer of different size
Slider.c: In function `scroll':
Slider.c:164: warning: cast from pointer to integer of different size
rm -f libwidgets.a
/usr/ccs/bin/ar cq libwidgets.a Slider.o
making all in clients/audio/auconvert...
gcc -fpcc-struct-return -O2    -I../../../include -I/usr/pkg/include  -Dsun -Di386 -DSVR4 -DSYSV     -I/
usr/pkg/include -c  auconvert.c
make: Fatal error: Don't know how to make target `../../../lib/audio/libaudio.a'
Current working directory /usr/pkgsrc/audio/nas/work/nas-1.7b/clients/audio/auconvert
*** Error code 1
The following command caused the error:
case '' in *[ik]*) set +e;; esac; \
for i in widgets  auconvert auctl audemo audial auedit auinfo aupanel auplay  aurecord autool auwave aup
hone auscope  util examples ;\
do \
(cd $i ; echo "making" all "in clients/audio/$i..."; \
/usr/ccs/bin/make  'CDEBUGFLAGS=-O2' all); \
done
make: Fatal error: Command failed for target `all'
Current working directory /usr/pkgsrc/audio/nas/work/nas-1.7b/clients/audio
*** Error code 1
The following command caused the error:
case '' in *[ik]*) set +e;; esac; \
for i in audio ;\
do \
(cd $i ; echo "making" all "in clients/$i..."; \
/usr/ccs/bin/make  'CDEBUGFLAGS=-O2' all); \
done
make: Fatal error: Command failed for target `all'
Current working directory /usr/pkgsrc/audio/nas/work/nas-1.7b/clients
making all in ./doc...
making all in doc/man...
making all in doc/man/lib...
making all in ./config...
=> "Unwrapping files-to-be-installed."



>How-To-Repeat:


bmake


>Fix:


patch for audio/nas/Makefile and audio/nas/patch-ag
--------------------------------------------------------------------------------
--- audio/nas/Makefile.orig     Wed Jan 11 12:39:04 2006
+++ audio/nas/Makefile  Wed Jan 18 15:26:17 2006
@@ -49,6 +49,12 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+.include "../../mk/compiler.mk"
+.if ${OPSYS} == "SunOS" && ${OS_VERSION} == "5.10" && !empty(CC_VERSION:Mgcc-3.4*)
+IMAKE_FLAGS+=  -DUseSolaris10gccProject
+XMKMF_FLAGS+=  ${IMAKE_FLAGS}
+.endif
+
 .if ${OPSYS} == "SunOS"
 post-install:
        ${LN} -s ${PREFIX}/lib/libaudio.so.2.3 ${PREFIX}/lib/libaudio.so.2
-------------------------------------------------------------------
file audio/nas/patches/patch-ag
--------------------------------------------------------------
--- config/NetAudio.tmpl.orig   Sun Feb 15 00:38:32 2004
+++ config/NetAudio.tmpl        Wed Jan 18 15:11:05 2006
@@ -287,6 +287,8 @@
 release.h: $(TOP)/RELEASE                                                  @@\
        @echo "static char *release = \"@(#)`cat $(TOP)/RELEASE`\";" > $@   @@\
                                                                            @@\
+includes:: release.h                                                       @@\
+                                                                           @@\
 depend:: release.h                                                         @@\
                                                                            @@\
 clean::                                                    
    @@\
@@ -369,3 +371,14 @@
 #  define ClearmakeOSName /**/
 # endif
 #endif
+
+#ifdef UseSolaris10gccProject
+#undef ProjectThreadsDefines
+#undef ThreadsCompileFlags
+#undef ThreadsCplusplusCompileFlags
+#define ProjectThreadsDefines -DXTHREADS -threads
+#define ThreadsCompileFlags -threads
+#define ThreadsCplusplusCompileFlags -threads
+IMAKE_DEFINES = -DUseSolaris10gccProject
+#endif
+