Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 174742 - dev-games/crystalspace-1.x fails to compile
Summary: dev-games/crystalspace-1.x fails to compile
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: AMD64 Linux
: Highest major (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 205264 251910 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-04-16 04:46 UTC by Renan T. Inácio
Modified: 2011-07-17 09:36 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
csperl5.h.diff (csperl5.h.diff,287 bytes, patch)
2007-06-25 19:38 UTC, Guido
Details | Diff
Replacemant patch to csperl5.h to correct sloppy crystalspace code and get types right (crystalspace-csperl5.patch,285 bytes, patch)
2007-08-10 17:17 UTC, Ferris McCormick (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Renan T. Inácio 2007-04-16 04:46:08 UTC
MkDir1 ./out/linux/optimize/plugins/cscript/csperl5
RunSwig ./out/linux/optimize/plugins/cscript/csperl5/cswigpl5.inc
./include/bindings/cspace.i:1290: Warning(302): Identifier '~iBase' redefined (ignored),
./include/csutil/scf_interface.h:118: Warning(302): previous definition of '~iBase'.
C++ ./out/linux/optimize/plugins/cscript/csperl5/cswigpl5.o
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
PerlEmbedGlueFile ./out/linux/optimize/plugins/cscript/csperl5/csperlxs.c
Cc ./out/linux/optimize/plugins/cscript/csperl5/csperlxs.o
C++ ./out/linux/optimize/plugins/cscript/csperl5/csperl5.o
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
plugins/cscript/csperl5/csperl5.h: In member function ‘virtual bool csPerl5::Object::SetPointer(iBase*)’:
plugins/cscript/csperl5/csperl5.h:178: error: cast from ‘iBase*’ to ‘int’ loses precision

    x86_64-pc-linux-gnu-g++ -c -o ./out/linux/optimize/plugins/cscript/csperl5/csperl5.o -I. -I./include -I./include -march=k8 -O2 -pipe -pipe -march=k8 -O2 -pipe -Wall -Wno-unknown-pragmas -fvisibility=hidden -I/usr/local/include -march=k8 -O2 -pipe -march=k8 -O2 -pipe -fno-exceptions -fPIC -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/5.8.8/x86_64-linux/CORE -I./out/linux/optimize/plugins/cscript/csperl5 -Wno-unused -Wno-uninitialized  plugins/cscript/csperl5/csperl5.cpp

...failed C++ ./out/linux/optimize/plugins/cscript/csperl5/csperl5.o ...
...skipped csperl5.so for lack of <plugins!cscript!csperl5!>csperl5.o...
...failed updating 1 target(s)...
...skipped 1 target(s)...
...updated 454 target(s)...

!!! ERROR: dev-games/crystalspace-1.0.1 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4827:   Called src_compile
  crystalspace-1.0.1.ebuild, line 93:   Called die

!!! compile failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/var/tmp/portage/dev-games/crystalspace-1.0.1/temp/build.log'.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.11"
JAVACFLAGS="-source 1.5 -target 1.5" COMPILER=""
and of course, the output of emerge --info



Portage 2.1.2.2 (default-linux/amd64/2006.0, gcc-4.1.1, glibc-2.5-r0, 2.6.17-gentoo-r7 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 15 Apr 2007 22:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r7
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.15-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe "
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/mythtv/ /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/"
LANG="pt_BR.UTF-8"
LC_ALL="pt_BR.UTF-8"
LINGUAS="pt_BR"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlay /usr/portage/local/layman/xeffects /usr/portage/local/layman/sunrise /usr/portage/local/layman/pro-audio"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib alsa amd64 apache2 arts asf audiofile avi beagle berkdb bitmap-fonts bzip2 cairo cdr cdrw cegui chm cli cracklib crypt css ctype cups curl dbus dri dssi dvd dvdr dvdread dvdrw eds emboss encode esd fastcgi ffmpeg fftw flac foomaticdb fortran freeimage gcj gd geoip gif glib glx gnome gpm gstreamer gtk gtk2 hal howl iconv imagemagick imlib ipod ipv6 isdnlog jack java jingle jpeg jpeg2k jungle kde ladspa lame latex ldap libsamplerate libvisual lm_sensors lzo lzw lzw-tiff mad matrox midi mikmod mjpeg mng mono mp3 mp4 mpeg mplayer msn musepack musicbrainz mysql mysqli nautilus ncurses nfs nls nptl nptlonly nvidia ogg openal opengl pam patch-loader pcre pdf perl php png portaudio posix pppd python qt qt3 qt4 quicktime readline reflection ruby samba sdl session sndfile spell spl ssl subversion svg tcpd theora threads tiff timidity truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis wavpack x264 xcb xine xls xml xmlrpc xorg xpm xscreensaver xv xvid xvmc zip zlib" ALSA_CARDS="intel8x0 bt87x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt_BR" LIRC_DEVICES="pixelview_pro" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS



im using all the USEs of crystalspace
first time trying to emerge crystal space, didn't try other versions
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-06-10 11:27:29 UTC
Re-assign wrt Bug 171232
Comment 2 Guido 2007-06-25 19:38:54 UTC
Created attachment 123067 [details, diff]
csperl5.h.diff

It seems the file is heavily changed upstream already, also fixing the bug. This patch should fix it for now though.
Comment 3 Ferris McCormick (RETIRED) gentoo-dev 2007-08-10 00:54:23 UTC
Um, for me, that patch results in:
=========================
C++ ./out/linux/optimize/plugins/cscript/csperl5/csperl5.o 
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
plugins/cscript/csperl5/csperl5.h: In member function 'virtual bool csPerl5::Object::SetPointer(iBase*)':
plugins/cscript/csperl5/csperl5.h:178: error: invalid conversion from 'SV*' to 'IV'
plugins/cscript/csperl5/csperl5.h:178: error:   initializing argument 2 of 'void Perl_sv_setiv(SV*, IV)'
===============================
sv_setiv seems to be part of perl (well, it seems to be defined as Perl_sv_setiv).  I can't find it's definition, and don't know what that statement should be.

For what it's worth, if you build with USE='-perl', the build is successful and walktest at least works.
Comment 4 Ferris McCormick (RETIRED) gentoo-dev 2007-08-10 17:17:05 UTC
Created attachment 127498 [details, diff]
Replacemant patch to csperl5.h to correct sloppy crystalspace code and get types right

The code in crystalspace is wrong.  The sv_setiv() function wants an IV-type for its second argument.  If you chase through perl after it gets configured, this is just

Looking further, perl configures to have:
#define        IVTYPE          long
#define        IVSIZE          8 

So, sv_setiv(..., (int)..);
will ALWAYS fail, because sizeof(int) = 4 on amd64.

To get the types right for the Perl_sv_setiv() function call, instead of (SV *) data, you need (IV) data.  If you do that, yod actually do get:

/var/tmp/portage/dev-games/crystalspace-1.0.1/work/crystalspace-src-1.0.1/out/linux/optimize/plugins/cscript/csperl5/csperl5.o

And the plugin builds, as does crystalspace.
=================================
Here is the signature of the sv_setiv function:
=================================
void
Perl_sv_setiv(pTHX_ register SV *sv, IV i)
Comment 5 Ferris McCormick (RETIRED) gentoo-dev 2007-08-10 19:24:04 UTC
(In reply to comment #4)
> Created an attachment (id=127498) [edit]
> Replacemant patch to csperl5.h to correct sloppy crystalspace code and get
> types right
> 
> The code in crystalspace is wrong.  The sv_setiv() function wants an IV-type
> for its second argument.  If you chase through perl after it gets configured,
> this is just

typedef IVTYPE IV;

Sorry about the missing line.
Comment 6 Andrei 2007-09-22 19:20:25 UTC
I get the same error as the reporter, on amd64.
Comment 7 Tristan Heaven (RETIRED) gentoo-dev 2008-01-15 09:35:41 UTC
*** Bug 205264 has been marked as a duplicate of this bug. ***
Comment 8 Evil Compile Person 2008-01-16 19:15:25 UTC
 * ERROR: dev-games/crystalspace-1.2 failed.

Looks like other versions are affected too ...
Comment 9 Peter Sterk 2008-03-08 09:40:24 UTC
The problem in 1.2 appears to be caused by a pointer being cast to an int on line 260 of plugins/cscript/csperl5/csperl5.cpp. On 64-bit architectures, pointers will be 64 bits long, bit ints are still 32 bits. The CS devs know about it and it should be fixed in the trunk version of Crystal Space. The fix can be found at http://trac.crystalspace3d.org/trac/CS/changeset/28852, should someone want to create a patch.
Comment 10 konrad okurowski 2008-07-17 21:04:13 UTC
Same here :/

Portage 2.2_rc1 (default/linux/x86/2008.0, gcc-4.2.4, glibc-2.7-r2, 2.6.26 i686)
=================================================================
System uname: Linux-2.6.26-i686-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-56-with-libc6
Timestamp of tree: Thu, 17 Jul 2008 19:00:02 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="pl_PL.UTF-8"
LC_ALL="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/desktop-effects /usr/local/portage/layman/initng /usr/local/portage/layman/sunrise /usr/local/portage/layman/zen-overlay /usr/local/portage/nelchael /usr/local/portage/artwork /usr/local/portage/layman/gentopia /usr/local/portage/layman/enlightenment /usr/local/portage/layman/pro-audio /usr/local/portage/layman/vmware /usr/local/portage/layman/java-overlay /usr/local/portage/boniek /usr/local/portage/layman/roslin /usr/local/portage/layman/science /usr/local/portage/layman/nx /usr/local/portage/layman/kde4-live"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amr amrnb amrwb avi bash-completion bitmap-fonts bluetooth branding bzip2 cairo captury cdparanoia cdr cdrom cli color-console cracklib crypt cups dbus djvu dri dvd dvdr dvdread flash fortran gif glitz gnutls gpg gpgme gpm gtk hal htmlhandbook iconv id3tag imlib ipv6 isdnlog java jpeg jpeg2k kde kdehiddenvisibility laptop libgcrypt libssh2 loop-aes madwifi md5sum midi mikmod mmx mmxext motif mp3 mpeg mpeg2 mudflap ncurses nls nptl nptlonly nvidia ogg opengl openssl oss otr pam pcre perl pertty pic png postgres ppds pppd python qt3 qt4 readline real reflection risky samba sdl session slang smp spell spl sse sse2 sse3 ssl tcpd threads tiff truetype type1-fonts udev unicode usb v4l v4l2 vcd vim-syntax vorbis wifi wmf x86 xcb xcomposite xft xml xml2 xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pl" USERLAND="GNU" VIDEO_CARDS="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 11 Jeremy Murphy 2008-07-29 14:54:51 UTC
How about adding 1.2.1 to the portage tree?  And/Or perhaps even an svn checkout of 1.3?
Comment 12 Guido 2009-05-07 19:49:21 UTC
(In reply to comment #11)
> How about adding 1.2.1 to the portage tree?  And/Or perhaps even an svn
> checkout of 1.3?

Right, this bug seems to be fixed in version 1.2.1:

http://trac.crystalspace3d.org/trac/CS/ticket/394
Comment 13 Guido 2009-05-09 08:31:49 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > How about adding 1.2.1 to the portage tree?  And/Or perhaps even an svn
> > checkout of 1.3?
> 
> Right, this bug seems to be fixed in version 1.2.1:
> 
> http://trac.crystalspace3d.org/trac/CS/ticket/394
> 

Unfortunaltely, this bug is still there.

CrystalSpace does not build with the java or perl USE flags on amd64. So, as a workaround you can add a line to /etc/portage/package.use that disables those USE flags:

echo "dev-games/crystalspace -java -perl" > /etc/portage/package.use
Comment 14 Christian Faulhammer (RETIRED) gentoo-dev 2009-06-17 09:24:47 UTC
*** Bug 251910 has been marked as a duplicate of this bug. ***
Comment 15 Guido 2010-06-13 09:29:37 UTC
The compilation issues were fixed in crystalspace 1.4. I just emerged it on amd64 without additional USE flags settings in /etc/portage/package.use. It does give a lot of QA warnings about breaking strict aliasing rules.

I was able to run the csbench program. Unfortunately the csdemo program does not work, because the demo data is missing. This seems to be a known issue with CS.
Comment 16 Guido 2010-06-13 09:42:15 UTC
(In reply to comment #15)
> The compilation issues were fixed in crystalspace 1.4. I just emerged it on
> amd64 without additional USE flags settings in /etc/portage/package.use. It
> does give a lot of QA warnings about breaking strict aliasing rules.
> 
> I was able to run the csbench program. Unfortunately the csdemo program does
> not work, because the demo data is missing. This seems to be a known issue with
> CS.
> 
One small issue: the log messages at the end of emerge are not entirely correct, because the data is installed in /usr/share/crystalspace-1.4 (note the version number!).
Comment 17 Tupone Alfredo gentoo-dev 2010-06-15 10:14:06 UTC
(In reply to comment #15)
> The compilation issues were fixed in crystalspace 1.4. 
Java and Perl were disabled inside the ebuild. You should change the ebuild to re-enable
Comment 18 Tupone Alfredo gentoo-dev 2010-06-15 10:15:45 UTC
(In reply to comment #16)
> One small issue: the log messages at the end of emerge are not entirely
> correct, because the data is installed in /usr/share/crystalspace-1.4 (note the
> version number!).
> 
This is now fixed
Comment 19 Guido 2010-06-18 15:49:26 UTC
(In reply to comment #17)
> Java and Perl were disabled inside the ebuild.

And for all archs, not just amd64. Anyway, I'd say the original problem reported in this bug is fixed. Anyone requiring the java or perl interfaces can create a new issue. AFAIC this bug can be closed.
Comment 20 Tupone Alfredo gentoo-dev 2011-07-17 09:36:22 UTC
Looking at the last comments, it is no more present.