Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

I cannot compile TDM, I get this weird error that appears inside the standard library limits. The source code comes from the homepage.

I tried to include and use limits in a small C++ program and I get no problems, so I have no idea how to continue.

 

 

Can anybody help?

 

Here is the log (out of topic, how can I disable the syntax coloring?):

% g++ --version
g++ (GCC) 4.8.2 20131219 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% uname -a
Linux pendulum 3.12.6-1-ARCH #1 SMP PREEMPT Fri Dec 20 19:39:00 CET 2013 x86_64 GNU/Linux

% scons -j2 BUILD_GAMEPAK=1 NO_GCH=0 BUILD=release --debug=explain "$@"
scons: Reading SConscript files ...
Loading build configuration from site.conf:
 BUILD_GAMEPAK='1'
 JOBS='1'
 NO_GCH='0'
 DEDICATED='0'
 SILENT='0'
 GL_HARDLINK='0'
 CC='gcc'
 BUILD_ROOT='build'
 ID_NOLANADDRESS='0'
 ID_MCHECK='2'
 TARGET_CORE='1'
 BUILD='release'
 TARGET_GAME='1'
 TARGET_MONO='0'
 BASEFLAGS=''
 CXX='g++'
 NOCURL='0'
 DEBUG_MEMORY='0'
 IDNET_HOST=''
 LIBC_MALLOC='1'
 ALSA='1'
 TARGET_DEMO='0'
Command line: BUILD_GAMEPAK='1'
Command line: NO_GCH='0'
Command line: BUILD='release'
scons: done reading SConscript files.
scons: Building targets ...
scons: building associated VariantDir targets: build/release/core/glimp build/release/core build/release/game
scons: building `game/precompiled_game.h.gch' because it doesn't exist
g++ -o game/precompiled_game.h.gch -x c++-header -c -pipe -Wall -Wno-unknown-pragmas -fmessage-length=0 -fpermissive -fvisibility=hidden -m32 -O3 -march=pentium3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fno-strict-aliasing -Wno-deprecated -Winvalid-pch -fPIC -DGAME_DLL -Igame -Ibuild/release/game/sys/scons -Isys/scons -Iinclude -Iinclude/zlib -Iinclude/minizip -Iinclude/libjpeg -Iinclude/devil -I. game/precompiled_game.h
In file included from game/../idlib/../idlib/math/Math.h:24:0,
			 from game/../idlib/../idlib/Heap.h:23,
			 from game/../idlib/../idlib/Lib.h:157,
			 from game/../idlib/precompiled.h:107,
			 from game/precompiled_game.h:28:
/usr/include/c++/4.8.2/limits:1405:35: error: template argument 1 is invalid
 struct numeric_limits<__int128>
							   ^
/usr/include/c++/4.8.2/limits:1479:44: error: template argument 1 is invalid
 struct numeric_limits<unsigned __int128>
										^
In file included from game/../idlib/../idlib/Heap.h:25:0,
			 from game/../idlib/../idlib/Lib.h:157,
			 from game/../idlib/precompiled.h:107,
			 from game/precompiled_game.h:28:
/usr/include/c++/4.8.2/cstdlib:178:10: error: expected unqualified-id before ‘__int128’
  inline __int128
	  ^
In file included from game/../idlib/../game/Game_local.h:1305:0,
			 from game/../idlib/precompiled.h:172,
			 from game/precompiled_game.h:28:
game/../idlib/../game/ai/AI.h:453:8: warning: extra qualification ‘idAI::’ on member ‘GetBaseAcuity’ [-fpermissive]
 float idAI::GetBaseAcuity(const char *type) const; // grayman #3552
	^
scons: Cannot explain why `build/release/game/game/randomizer/userintf.os' is being rebuilt: No previous build information found
g++ -o build/release/game/game/randomizer/userintf.os -c -fPIC -pipe -Wall -Wno-unknown-pragmas -fmessage-length=0 -fpermissive -fvisibility=hidden -m32 -O3 -march=pentium3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fno-strict-aliasing -Wno-deprecated -Winvalid-pch -fPIC -DGAME_DLL -Igame -Ibuild/release/game/sys/scons -Isys/scons -Iinclude -Iinclude/zlib -Iinclude/minizip -Iinclude/libjpeg -Iinclude/devil -I. game/randomizer/userintf.cpp
scons: building `build/release/game/idlib/Base64.os' because it doesn't exist
g++ -o build/release/game/idlib/Base64.os -c -fPIC -pipe -Wall -Wno-unknown-pragmas -fmessage-length=0 -fpermissive -fvisibility=hidden -m32 -O3 -march=pentium3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -DXTHREADS -fno-strict-aliasing -Iidlib -Ibuild/release/game/sys/scons -Isys/scons -Iinclude -Iinclude/zlib -Iinclude/minizip -Iinclude/libjpeg -Iinclude/devil -I. idlib/Base64.cpp
In file included from idlib/../idlib/math/Math.h:24:0,
			 from idlib/../idlib/Heap.h:23,
			 from idlib/../idlib/Lib.h:157,
			 from idlib/precompiled.h:107,
			 from idlib/Base64.cpp:2:
/usr/include/c++/4.8.2/limits:1405:35: error: template argument 1 is invalid
 struct numeric_limits<__int128>
							   ^
/usr/include/c++/4.8.2/limits:1479:44: error: template argument 1 is invalid
 struct numeric_limits<unsigned __int128>
										^
In file included from idlib/../idlib/Heap.h:25:0,
			 from idlib/../idlib/Lib.h:157,
			 from idlib/precompiled.h:107,
			 from idlib/Base64.cpp:2:
/usr/include/c++/4.8.2/cstdlib:178:10: error: expected unqualified-id before ‘__int128’
  inline __int128
	  ^
In file included from include/boost/filesystem/path_traits.hpp:23:0,
			 from include/boost/filesystem/path.hpp:25,
			 from include/boost/filesystem.hpp:16,
			 from idlib/../idlib/Image.h:29,
			 from idlib/../idlib/Lib.h:230,
			 from idlib/precompiled.h:107,
			 from idlib/Base64.cpp:2:
include/boost/system/error_code.hpp:214:36: warning: ‘boost::system::posix_category’ defined but not used [-Wunused-variable]
 static const error_category &  posix_category = generic_category();
								^
include/boost/system/error_code.hpp:215:36: warning: ‘boost::system::errno_ecat’ defined but not used [-Wunused-variable]
 static const error_category &  errno_ecat	 = generic_category();
								^
include/boost/system/error_code.hpp:216:36: warning: ‘boost::system::native_ecat’ defined but not used [-Wunused-variable]
 static const error_category &  native_ecat	= system_category();
								^
scons: *** [build/release/game/idlib/Base64.os] Error 1
scons: *** [game/precompiled_game.h.gch] Error 1
scons: building terminated because of errors.
OSError: [Errno 2] No such file or directory: 'scons.signatures.dblite':
 File "/usr/lib/python2.7/site-packages/SCons/Script/Main.py", line 1344:
_exec_main(parser, values)
 File "/usr/lib/python2.7/site-packages/SCons/Script/Main.py", line 1308:
_main(parser)
 File "/usr/lib/python2.7/site-packages/SCons/Script/Main.py", line 1072:
nodes = _build_targets(fs, options, targets, target_top)
 File "/usr/lib/python2.7/site-packages/SCons/Script/Main.py", line 1266:
jobs.run(postfunc = jobs_postfunc)
 File "/usr/lib/python2.7/site-packages/SCons/Job.py", line 113:
postfunc()
 File "/usr/lib/python2.7/site-packages/SCons/Script/Main.py", line 1263:
SCons.SConsign.write()
 File "/usr/lib/python2.7/site-packages/SCons/SConsign.py", line 109:
syncmethod()
 File "/usr/lib/python2.7/site-packages/SCons/dblite.py", line 127:
self._os_unlink(self._file_name)
Exception OSError: OSError(2, 'No such file or directory') in <bound method dblite.__del__ of <SCons.dblite.dblite object at 0x1b149d0>> ignored
scons -j2 BUILD_GAMEPAK=1 NO_GCH=0 BUILD=release --debug=explain "$@"  12,59s user 1,88s system 62% cpu 23,085 total

Edited by ezze
Posted (edited)

No-one has any idea? Is this precompiled header really necessary game/precompiled_game.h.gch, or it is just to speed up compilation?

 

Please, I really want to play tdm...

Edited by ezze
Posted (edited)

Edit: My response was regarding compiling DR, not TDM... my bad... anyway... not sure about scons for TDM, but it's not used for building DR anymore...

 

scons?? I thought DR hasn't used scons to build in quite awhile. Double-check the wiki for all deps and then it's:

./autogen.sh <<< I skip this step, else make fails immediately

./configure --enable-darkmod-plugins --prefix=/usr <<< my prefix

make --jobs=4 <<< # cpu cores

sudo make install

 

As for compilation errors, here's mine from Mageia 4b:

In file included from PathEntry.cpp:13:0:
FileChooser.h:104:22: error: extra qualification 'gtkutil::FileChooser::' on member 'getSelectedMapFormat' [-fpermissive]
 virtual std::string FileChooser::getSelectedMapFormat();
				  ^
 CXX	SourceView.lo
Makefile:580: recipe for target 'PathEntry.lo' failed

Hence my Mint 14 dual-boot for running DR :)

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Posted

Make sure that you are in TDM src directory and execute:

 

% touch scons.signatures.dblite

 

Then try again.

 

If that doesn't work, then try:

 

% scons -j2 BUILD_GAMEPAK=1 NO_GCH=1 BUILD=release --debug=explain "$@"

I am the bat. The night is mine.

Posted

According to gcc manual the type is indeed __int128, but it seems that older versions it was __int128_t (and __uint128).

For some reason it seems my gcc seek for the older way when compiling TDM... it does not make sense to me, what can cause this effect?

 

Excluding GCH this is one command that fails:

g++ -o build/release/game/game/AF.os -c -fPIC -pipe -Wall -Wno-unknown-pragmas -fmessage-length=0 -fpermissive -fvisibility=hidden -m32 -O3 -march=pentium3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fno-strict-aliasing -Wno-deprecated -Winvalid-pch -DGAME_DLL -Igame -Ibuild/release/game/sys/scons -Isys/scons -Iinclude -Iinclude/zlib -Iinclude/minizip -Iinclude/libjpeg -Iinclude/devil -I. game/AF.cpp

It is weird that TDM has local copies of the various libraries (afraid of different versions perhaps?), besides is the -m32 really needed in my 64bit system? The rest seems fairly normal to me.

 

:(

Posted

The -m32 is needed since we have to target 32-bit bins. There is still some work required to get the source up to scratch for 64-bit builds. We're already moving away from project-provided libs to local OS shared libs, but there are local modifications to some of the libs, particularly the image libs, for compatibility with the D3 engine (and some of these "local copies" were brought in by Doom3 source).

I am the bat. The night is mine.

Posted

Found! It seems in my system there is no int128 when compiling with -m32!

 

% cat a.cpp
#include <iostream>
#include <limits>

int main() {
   std::cout << sizeof(__int128_t) << "\n";
}


% g++ a.cpp
% g++ -m32 a.cpp
In file included from a.cpp:2:0:
/usr/include/c++/4.8.2/limits:1405:35: error: template argument 1 is invalid
    struct numeric_limits<__int128>
                                  ^
/usr/include/c++/4.8.2/limits:1479:44: error: template argument 1 is invalid
    struct numeric_limits<unsigned __int128>
                                           ^
a.cpp: In function ‘int main()’:
a.cpp:5:25: error: ‘__int128_t’ was not declared in this scope
    std::cout << sizeof(__int128_t) << "\n";
                        ^
%

 

It cannot be possibly just me...

Posted

GCC 4.8.2 is pretty new, so I suspect that other distros probably haven't updated to it just yet. Most of our release builds are done with Debian/Ubuntu, which are usually a bit behind.

I am the bat. The night is mine.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...