Author Topic: GAE/Linux Compiling ("too large for 'long' type" error)  (Read 1224 times)

mersinliali

  • Guest
GAE/Linux Compiling ("too large for 'long' type" error)
« on: 8 September 2010, 18:50:12 »
Hi,
First of all, my apologies regarding possible mistakes in the language.

I'm very excited seeing the page: https://docs.megaglest.org/GAE/Linux_Compiling

I've compiled the GAE as explained in that page, and finally I've managed to play with the new engine. Everything seems alright. However, while cmake'ing, I have these warnings:

-- Configuring done
CMake Warning at source/map_editor/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe linker search path for target map_editor because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/map_editor/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe runtime search path for target map_editor because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libz.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/g3d_viewer/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe linker search path for target g3d_viewer because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/g3d_viewer/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe runtime search path for target g3d_viewer because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libz.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/configurator/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe linker search path for target glest_configurator
  because files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/configurator/CMakeLists.txt:6 (add_executable):
  Cannot generate a safe runtime search path for target glest_configurator
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libz.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/test/CMakeLists.txt:37 (add_executable):
  Cannot generate a safe linker search path for target test_suite because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libm.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

CMake Warning at source/test/CMakeLists.txt:37 (add_executable):
  Cannot generate a safe runtime search path for target test_suite because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libz.so] in /usr/lib may be hidden by files in:
      /usr/X11R6/lib

  Some of these libraries may not be found correctly.

-- Generating done


And at the end:


...
...
...
[ 97%] Building CXX object source/test/CMakeFiles/test_suite.dir/main.cpp.o
In file included from /Glest/GAE/glestae_svn/source/test/datastructs/fixed_point_test.h:22,
                 from /Glest/GAE/glestae_svn/source/test/main.cpp:17:
/Glest/GAE/glestae_svn/source/shared_lib/include/math/fixed.h:203: error: integer constant is too large for 'long' type
/Glest/GAE/glestae_svn/source/shared_lib/include/math/fixed.h:244: error: integer constant is too large for 'long' type

*** 2 errors, 0 warnings
make[2]: *** [source/test/CMakeFiles/test_suite.dir/main.cpp.o] Error 1
make[1]: *** [source/test/CMakeFiles/test_suite.dir/all] Error 2
make: *** [all] Error 2


How can I fix these errors (although I can play the game that way)?

Best regards,
Ali
« Last Edit: 18 June 2016, 15:19:01 by filux »

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: GAE/Linux Compiling ("too large for 'long' type" error)
« Reply #1 on: 8 September 2010, 20:58:55 »
The game should be playable, only the test suite did not compile.

I think you can ignore the CMake warnings. Just try to run the map editor and see if it works.

The compile error seems to be in the macros IF_MULT_OVERFLOW in shared_lib/include/math/fixed.h:193 and IF_DIV_OVERFLOW below. They only get activated in the test_suite because of test/datastructs/fixed_point_test.h:19. I don't really see the problem and it builds for me just fine. Maybe silnarm has an idea...

Could you tell us the gcc version and CPU architecture you use.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GAE/Linux Compiling ("too large for 'long' type" error)
« Reply #2 on: 9 September 2010, 01:42:05 »
Looks like gcc wants to put all integer constants in 32 bits... Interestingly it only gave me warnings, should be ok now anyway (fix committed).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

mersinliali

  • Guest
Re: GAE/Linux Compiling ("too large for 'long' type" error)
« Reply #3 on: 9 September 2010, 08:43:48 »
Some of my operating system info:

Kernel:   Linux 2.6.31.13-131 (i686)
C Library:   GNU C Library version 2.9 (stable)
Default C Compiler:   GNU C Compiler version 4.3.3 (Pardus Linux)
Distribution:   Pardus 2009.2 Geronticus eremita
Processor:   2x Intel(R) Pentium(R) 4 CPU 3.00GHz
OpenGL
Vendor:   NVIDIA Corporation
Renderer:   GeForce FX 5200/AGP/SSE2
Version:   2.1.2 NVIDIA 173.14.25
Direct Rendering:   Yes


Other info (if necessary):
Binutils: (Pardus Linux) 2.19.51.0.9.20090606
bison: (GNU Bison) 2.3
Coreutils:  7.6
diff: (GNU diffutils) 2.8.7
GNU Awk: 3.1.6
m4: (GNU M4) 1.4.12
GNU Make: 3.81
GNU sed version: 4.1.5


Thanks for any help or comment,
Ali

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: GAE/Linux Compiling ("too large for 'long' type" error)
« Reply #4 on: 9 September 2010, 14:25:45 »
Hi mersinliali,

  If you do a 'svn update' the test suite should compile ok now.

  For the CMake warnings I can't help, it seems your system has duplicate libs in /usr/X11R6/lib and /usr/lib but it doesn't seem to be causing any problems, so I wouldn't worry about it.

Cheers.
Glest Advanced Engine - Code Monkey

Timeline | Downloads

mersinliali

  • Guest
Re: GAE/Linux Compiling ("too large for 'long' type" error)
« Reply #5 on: 9 September 2010, 17:12:11 »
Hi,
Thank you very much. It works now. As you said, there is a symlink (X11R6) under /usr which links to /usr itself, so, I guess, it reads twice while compiling.
Best wishes,
Ali