Jump to content
The Dark Mod Forums

Compiling Problem


ezze

Recommended Posts

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

:(

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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

    • snatcher

      TDM Modpack v4.5 released!
      Introducing... The Loop
      · 0 replies
    • Ansome

      Taking a break to alleviate burnout. In retrospect, I probably shouldn't have jumped into a map-making contest so quickly after just finishing another project and especially with my busy schedule, but I do believe I have something that the community will enjoy. No clue if I'll be able to finish it on time for the competition if I factor in a break, but I'd rather take my time and deliver something of quality rather than engage in development crunch or lose part of the map's soul to burnout.
      · 1 reply
    • Skaruts

      Working on an update for my mission By The Cookbook. If anyone that played it has any further bugs to report, please let me know.
      I posted more details about the update in the mission thread.
      · 1 reply
    • lucien

      being thankful for tdm is a good feeling
      · 0 replies
    • The Black Arrow

      Happy birthday to me!
      Yes, today's my birthday and as much as I want to play The Dark Mod, I won't until it's late Autumn, where it should be a bit chilly in my place and there's some wind too.
      For now, it's time to enjoy my birthday, if any of you want to play a great fan mission in my honour...Well that's asking too much, just play the mission because it's fun, not because of me, enjoy it yourself! 💪
      · 5 replies
×
×
  • Create New...