News:

Please help making MegaGlest rock-stable by testing the pre-release snapshots.

Main Menu

Problem Compiling 0.3.93 on Linux

Started by wciow, 15 August 2013, 18:31:31

wciow

Since Silnarm has returned to GAE recently I decided to re-download and install GAE to my current system.

I have installed all the necessary deps including Physfs. My system tells me I have version physfs 2.0.2 which should be sufficient. However I have reason to doubt this since GAE installed fine the last time I built from source on Ubuntu some 18 months ago and I have since switched to Linux Mint on my current machine.

I have attempted to rebuild and install physfs 2.0.2 myself to make sure, but ran into even more archaic and difficult errors with that.

Here is the error log. [spoiler][  3%] Built target xml2g
[  3%] Building CXX object source/shared_lib/CMakeFiles/shared_lib.dir/sources/physfs/ofile_stream.cpp.o
/home/will/Downloads/glestae-src-0.3.93/source/shared_lib/sources/physfs/MemFileOps.cpp: In member function 'virtual int Shared::PhysFS::MemFileOps::seek(long int, int)':
/home/will/Downloads/glestae-src-0.3.93/source/shared_lib/sources/physfs/MemFileOps.cpp:67:8: error: 'SEEK_SET' was not declared in this scope
/home/will/Downloads/glestae-src-0.3.93/source/shared_lib/sources/physfs/MemFileOps.cpp:70:8: error: 'SEEK_CUR' was not declared in this scope
/home/will/Downloads/glestae-src-0.3.93/source/shared_lib/sources/physfs/MemFileOps.cpp:73:8: error: 'SEEK_END' was not declared in this scope
make[2]: *** [source/shared_lib/CMakeFiles/shared_lib.dir/sources/physfs/MemFileOps.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [source/shared_lib/CMakeFiles/shared_lib.dir/all] Error 2
make: *** [all] Error 2
[/spoiler]

Not sure if there is a simple way I could fix this?

p.s Just checked the linux packages on the chance they might work but they are not longer hosted (not surprising after 2 years i spose!)
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

Yggdrasil

Are you trying to build the beta release 0.3.93 or git master? Which gcc version are you using?

Please use git master! The old beta release doesn't build with newer gcc versions. Fixes are in git master.
See the compile guide for details: http://sourceforge.net/apps/trac/glestae/wiki/CompileGuideLinux

wciow

Thanks Yggdrasil, cloning from git works fine.  :thumbup:

moral of the story, don't try building a two year old download on an up-to-date system  :O
Check out my new Goblin faction - https://forum.megaglest.org/index.php?topic=9658.0

tomreyn

I'm just chiming in to say GAE also builds for me on Ubuntu 13.04 (on atibox, specs below). Its gcc 4.7.3 throws plenty of warnings and there are serious selection issues: clicking a single unit often selects multiple units of different types, or a building, double-clicking a unit often selects just this unit or deselects it, right-clicking on the map is often actually registered where a building is placed or another friendly unit stands, making your units not harvest and not attack properly, drawbox selection will often select units outside of the drawbox. Much of this should be due to GLSelectBuffer.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

Yggdrasil

Most of the warnings should be gone now.

But somehow i have the feeling you won't see the last commits. sourceforge seems to have moved our repository. If you followed the compile guide you have to switch to the new location:

$ git remote set-url origin git://git.code.sf.net/p/glestae/glestae

or edit .git/config directly.

Afterwards:

$ git pull
$ git describe
0.3-1013-g17d55c5

git describe should give you the same output.

silnarm

Quote from: tomreyn on 16 August 2013, 12:25:51
... and there are serious selection issues: clicking a single unit often selects multiple units of different types, or a building, double-clicking a unit often selects just this unit or deselects it, right-clicking on the map is often actually registered where a building is placed or another friendly unit stands, making your units not harvest and not attack properly, drawbox selection will often select units outside of the drawbox. Much of this should be due to GLSelectBuffer.

about time to replace that ancient selection code me thinks, thanks for the report :)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

tomreyn

Quote from: Yggdrasil on 18 August 2013, 11:18:29
Most of the warnings should be gone now.

I concur, here's what I have left, in case it helps:

shared_lib/sources/xml/xml_parser.cpp:248:77: warning: 'auto_ptr' is deprecated (declared at /usr/include/c++/4.7/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
shared_lib/sources/platform/sdl/platform_util.cpp: In function 'size_t Shared::Platform::getFileSize(const string&)':
shared_lib/sources/platform/sdl/platform_util.cpp:327:38: warning: ignoring return value of 'char* strerror_r(int, char*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
shared_lib/sources/platform/sdl/platform_util.cpp: In function 'void Shared::Platform::mkdir(const string&, bool)':
shared_lib/sources/platform/sdl/platform_util.cpp:316:35: warning: ignoring return value of 'char* strerror_r(int, char*, size_t)', declared with attribute warn_unused_result [-Wunused-result]
shared_lib/sources/platform/sdl/platform_util.cpp: In static member function 'static void Shared::Platform::PlatformExceptionHandler::handler(int, siginfo_t*, void*)':
shared_lib/sources/platform/sdl/platform_util.cpp:267:45: warning: ignoring return value of 'int chdir(const char*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp: In member function 'void MapEditor::Map::loadFromFile(const string&)':
map_editor/map.cpp:579:47: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp:590:53: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp:591:53: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp:598:53: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp:605:53: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
map_editor/map.cpp:613:37: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]


Quote from: Yggdrasil on 18 August 2013, 11:18:29
But somehow i have the feeling you won't see the last commits. sourceforge seems to have moved our repository. If you followed the compile guide you have to switch to the new location:

$ git remote set-url origin git://git.code.sf.net/p/glestae/glestae

or edit .git/config directly.

You're right, I completely missed this. The above results refer to building the source at the new origin which for me, too, is at at 0.3-1013-g17d55c5.

Quote from: silnarm on 19 August 2013, 11:23:20
about time to replace that ancient selection code me thinks, thanks for the report :)

Happily. It's nice to see some action here.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·