Skip to main content
Topic: Compile errors in Linux 64-bit (Read 4036 times) previous topic - next topic

Compile errors in Linux 64-bit

Ok I got the latest git from http://github.com/jamespetts/simutrans-experimental.git and tried to compile it with DEBUG=1. There's a lot of compiler warnings (unrecognised option -NDEBUG and ignoring return value in particular I noticed to pop up dozens of times), one that may be especially relevant in this context is "comparison between signed and unsigned integer expressions". I'm guessing you dont want the whole output tho, right?
In the end it fails tho with this this:
===> CXX simgraph16.cc
g++: unrecognized option '-NDEBUG'
simgraph16.cc: ****embler messages:
simgraph16.cc:2233: Error: suffix or operands invalid for `jmp'
make: *** [simgraph16.o] Error 1

steffen@steffen ~/simutrans-git/simutrans-experimental $ gcc -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.2/work/gcc-4.4.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.2 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.2 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.2/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.2/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.2/include/g++-v4 --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.2/python --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.2 p1.0'
Thread model: posix
gcc version 4.4.2 (Gentoo 4.4.2 p1.0)

The uncommented lines in config.default are:
BACKEND = sdl
COLOUR_DEPTH = 16
OSTYPE = linux
FLAGS =  -DSTEPS16 -NDEBUG -DSLIST_FREIGHT
DEBUG=1

I simply typed "make" in the simutrans-experimental directory. Other than creating config.default I made no changes after the git checkout, the exact version is fd325639e88e8ad642d53924123f2668d2d4b5e0

What's going wrong?

Compile errors in Linux 64-bit

Reply #1
I just installed gcc-4.4.3-r2 and I tried make clean && make but same problem. I'm installing gcc-4.3.4 now as well just to see if thats the problem.

Oh and just for the record I completely agree that 64bit should be lower priority, but its nice and I think also important in the medium-long term to keep going at it with low priority :)

Compile errors in Linux 64-bit

Reply #2
Steffen,

thank you for your report. It's quite hard for me to try to piece together the issues here as I don't have either a Linux system or a 64-bit system on which to test. What's worse, the source file in which you have the error (simgraph16.cc) is not a file that has any differences between Standard and Experimental. The first thing to do, therefore, is to try getting the latest Simutrans-Standard code and see whether there are any differences in result there.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Compile errors in Linux 64-bit

Reply #3
Ok I got the latest svn from svn://tron.homeunix.org/simutrans/simutrans/trunk and am getting the same error, but oddly in a different line:
===> CXX simgraph16.cc
g++: unrecognized option '-NDEBUG'
simgraph16.cc: In function ‘void rezoom_img(image_id)’:
simgraph16.cc:1290: warning: comparison between signed and unsigned integer expressions
simgraph16.cc: ****embler messages:
simgraph16.cc:2370: Error: suffix or operands invalid for `jmp'
make: *** [simgraph16.o] Error 1

This is again with gcc-4.4.3-r2

Re: Compile errors in Linux 64-bit

Reply #4
I have split and moved this topic because the issue is not specific to Simutrans-Experimental.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

 

Re: Compile errors in Linux 64-bit

Reply #5
For all future bug reports I'll be sure to check both std and exp :)
Back on topic, a quick diff between the latest exp git version and the latest std svn version reveals 7 pages of differences.

Re: Compile errors in Linux 64-bit

Reply #6
I forgot to mention, the error persists with gcc-4.3.4 (I only tried experimental but I think its safe to ****ume the same for std)

Re: Compile errors in Linux 64-bit

Reply #7
You have to use -DNDEBUG (not -NDEBUG) and add -DUSE_C (the ****embler code is only for x86).

Re: Compile errors in Linux 64-bit

Reply #8
For USE_C, could you add a note of this to config.template?
As for the debug part, that looks like a typo in config.template, can you change it in there?

But with these two changes it now compiles, thanks :)

Re: Compile errors in Linux 64-bit

Reply #9
Just see config.template:
Code: [Select]
# The following conditional compilation flags exist
...
# USE_C: no ****embler for copying (when not using x86 and GCC>=3.x)
# BIG_ENDIAN: MUST by set for PPC/Motorola byte order! (old mac, amiga)
#
# In order to use the flags, add a line like this:
# FLAGS = -DUSE_C -DBIG_ENDIAN

I found this fairly clear ...

Re: Compile errors in Linux 64-bit

Reply #10
Yes you're right, I just searched it for 64 specifically. My bad.

But the "-NDEBUG" still looks like a typo to me?

Re: Compile errors in Linux 64-bit

Reply #11
I find only -DNDEBUG in the Makefile. Is experimental using an older version?

Re: Compile errors in Linux 64-bit

Reply #12
The typo is in config.template on the last line

Re: Compile errors in Linux 64-bit

Reply #13
****it, completely overlooked this topic, and stumbled over the ****embler code yesterday!