Subject: fwd: pkgsrc/misc/celestia barf with g++ 2.95.3
To: None <tech-pkg@netbsd.org>
From: =?ISO-8859-1?Q?C=E9sar_Catri=E1n?= C. <ccatrian@eml.cc>
List: tech-pkg
Date: 11/27/2004 12:23:11
Hi.

Can someone (or tech-pkg@?) please take care of this package?
I am unable to test it on a 1.x .=20
Jonathan, thanks for the feedback.

C=E9sar


 --- "Jonathan A. Kollasch" <jakollasch@mcleodusa.net> escribi=F3:=20

Hi,

The Celestia-1.3.2 from pkgsrc (pkgsrc/misc/celestia/Makefile.common versio=
n=20
1.10) fails to build with gcc 2.95.3 (The compiler that comes with NetBSD=20
1.6.2). For location of failure see attached file. When I subsequently trie=
d=20
a non-pkgsrc build on my Mandrakelinux 9.2 box (gcc 3.3.1) the build=20
completed successfully. I then tried (on my 1.6.2 box) forcing celestia to=
=20
use gcc3 (my pkgsrc gcc3 is 3.3.4), see diff below; it then built successfu=
lly.

My (definitely flawed) suggested fix to Makefile.common

----

--- Makefile.common.original    Wed Nov 24 21:29:31 2004
+++ Makefile.common     Thu Nov 25 16:04:11 2004
@@ -16,6 +16,8 @@
 USE_GNU_TOOLS+=3D                make
 USE_LIBTOOL=3D           yes
 USE_X11=3D               yes
+USE_LANGUAGES+=3D                c++
+GCC_REQD=3D              3.0
 GNU_CONFIGURE=3D         yes
 CONFIGURE_ARGS+=3D       --with-lua --with-glut

----

This would not be necessary on machines with commercial C++ compilers,=20
or other free unices that use gcc3 natively. Basically gcc2 cannot be used=
=20
as the compiler (or else celestia-1.3.2.tar.gz/src/celutil/utf8.cpp needs=20
a patch (maybe more files as well)). Perhaps have gcc3 required on NetBSD=20
1.x, this would fix NetBSD and not require others to compile gcc3 from=20
pkgsrc. Whatever, I'm unfamiliar with the "proper" way to fix this.

Jonathan Kollasch



source=3D'utf8.cpp' object=3D'utf8.o' libtool=3Dno \
depfile=3D'.deps/utf8.Po' tmpdepfile=3D'.deps/utf8.TPo' \
depmode=3Dgcc /bin/sh ../../admin/depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I../..   -I/usr/pkg/include -D_REENTRANT=20
-DGLX_GLXE
XT_LEGACY -I/usr/include -I/usr/pkg/include/freetype2 =20
-Wnon-virtual-dtor -Wno-l
ong-long -Wundef -Wall -W -Wpointer-arith -Wmissing-prototypes=20
-Wwrite-strings -
DNDEBUG -DNO_DEBUG -O2 -O2 -pipe -I/usr/pkg/include -D_REENTRANT=20
-DGLX_GLXEXT_LE
GACY -I/usr/include -I/usr/pkg/include/freetype2=20
-DPKG_SYSCONFDIR=3D"\"/usr/pkg/et
c\"" -fno-exceptions -fno-check-new  -Wall -ffast-math=20
-fexpensive-optimizations
 -fomit-frame-pointer -DCELX  -c -o utf8.o `test -f 'utf8.cpp' || echo=20
'./'`utf8
.cpp
utf8.cpp: In function `class string=20
ReplaceGreekLetterAbbr(basic_string<char,str
ing_char_traits<char>,__default_alloc_template<false,0> >)':
utf8.cpp:774: no matching function for call to=20
`basic_string<char,string_char_tr
aits<char>,__default_alloc_template<false,0> >::compare (int, size_t,=20
const basi
c_string<char,string_char_traits<char>,__default_alloc_template<false,0>=20
> &)'
/usr/include/g++/std/bastring.cc:398: candidates are: int=20
basic_string<char,stri
ng_char_traits<char>,__default_alloc_template<false,0> >::compare(const=20
basic_st
ring<char,string_char_traits<char>,__default_alloc_template<false,0> >=20
&, unsign
ed int =3D 0, unsigned int =3D basic_string<charT,traits,Allocator>::npos)=
=20
const
/usr/include/g++/std/bastring.cc:417:                 int=20
basic_string<char,stri
ng_char_traits<char>,__default_alloc_template<false,0> >::compare(const=20
char *,=20
unsigned int, unsigned int) const
/usr/include/g++/std/bastring.h:397:                 int=20
basic_string<char,strin
g_char_traits<char>,__default_alloc_template<false,0> >::compare(const=20
char *, u
nsigned int =3D 0) const
gmake[3]: *** [utf8.o] Error 1
gmake[3]: Leaving directory=20
`/usr/pkgsrc/misc/celestia/work/celestia-1.3.2/src/c
elutil'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory=20
`/usr/pkgsrc/misc/celestia/work/celestia-1.3.2/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory=20
`/usr/pkgsrc/misc/celestia/work/celestia-1.3.2'
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/misc/celestia
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/misc/celestia