Author Topic: [(p) fixed] MG on FreeBSD, compile error using cmake  (Read 1200 times)

m0ellemeister

  • Guest
[(p) fixed] MG on FreeBSD, compile error using cmake
« on: 20 January 2011, 23:01:09 »
Hi,

i've managed to use cmake as build-tool on FreeBSD for building MG. But, when i compile it, this is was happening at least:

Code: [Select]
Linking CXX executable ../../../mk/linux/glest.bin                                                                                                                                                       
[ 94%] Built target glest.bin                                                                                                                                                                           
Scanning dependencies of target run
[ 94%] Generating mg.tmp                                                                                                                                                                                 
[ 95%] Built target run                                                                                                                                                                                 
Scanning dependencies of target glest_editor
[ 95%] Building CXX object source/glest_map_editor/CMakeFiles/glest_editor.dir/main.cpp.o                                                                                                               
[ 96%] Building CXX object source/glest_map_editor/CMakeFiles/glest_editor.dir/renderer.cpp.o                                                                                                           
[ 96%] Building CXX object source/glest_map_editor/CMakeFiles/glest_editor.dir/program.cpp.o                                                                                                             
[ 97%] Building CXX object source/glest_map_editor/CMakeFiles/glest_editor.dir/map.cpp.o                                                                                                                 
Linking CXX executable ../../../mk/linux/glest_editor                                                                                                                                                   
[ 97%] Built target glest_editor                                                                                                                                                                         
Scanning dependencies of target glest_g3dviewer
[ 97%] Building CXX object source/g3d_viewer/CMakeFiles/glest_g3dviewer.dir/__/glest_game/graphics/particle_type.cpp.o                                                                                   
[ 97%] Building CXX object source/g3d_viewer/CMakeFiles/glest_g3dviewer.dir/__/glest_game/graphics/unit_particle_type.cpp.o                                                                             
[ 98%] Building CXX object source/g3d_viewer/CMakeFiles/glest_g3dviewer.dir/main.cpp.o                                                                                                                   
[ 98%] Building CXX object source/g3d_viewer/CMakeFiles/glest_g3dviewer.dir/renderer.cpp.o                                                                                                               
Linking CXX executable ../../../mk/linux/glest_g3dviewer                                                                                                                                                 
[ 98%] Built target glest_g3dviewer                                                                                                                                                                     
Scanning dependencies of target glest_configurator
[ 99%] Building CXX object source/configurator/CMakeFiles/glest_configurator.dir/main.cpp.o                                                                                                             
[ 99%] Building CXX object source/configurator/CMakeFiles/glest_configurator.dir/configuration.cpp.o                                                                                                     
Linking CXX executable ../../../mk/linux/glest_configurator                                                                                                                                             
[ 99%] Built target glest_configurator                                                                                                                                                                   
Scanning dependencies of target g2xml
[ 99%] Building C object source/tools/glexemel/CMakeFiles/g2xml.dir/g2xml.c.o                                                                                                                           
Linking C executable ../../../../source/tools/glexemel/g2xml                                                                                                                                             
[ 99%] Built target g2xml                                                                                                                                                                               
Scanning dependencies of target xml2g
[100%] Building C object source/tools/glexemel/CMakeFiles/xml2g.dir/xml2g.c.o                                                                                                                           
In file included from /usr/local/include/libxml2/libxml/parser.h:807,                                                                                                                                   
                 from ~/Downloads/MegaGlest-SVN/trunk/source/tools/glexemel/xml2g.c:19:
/usr/local/include/libxml2/libxml/encoding.h:28:19: error: iconv.h: No such file or directory
In file included from /usr/local/include/libxml2/libxml/parser.h:807,
                 from ~/Downloads/MegaGlest-SVN/trunk/source/tools/glexemel/xml2g.c:19:
/usr/local/include/libxml2/libxml/encoding.h:146: error: expected specifier-qualifier-list before 'iconv_t'
*** Error code 1

Stop in ~/Downloads/MegaGlest-SVN/trunk/build.
*** Error code 1

Stop in ~/Downloads/MegaGlest-SVN/trunk/build.
*** Error code 1

iconv.h is located in /usr/local/include/

Maybe some can point me on how to solve this. Thx.

Btw. glest.bin was compiled successfully and is runable. But it is 45MB in size. Is that normal? Or is this a result of the last error?

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Re: MG on FreeBSD, compile error using cmake
« Reply #1 on: 21 January 2011, 11:26:11 »
Btw. glest.bin was compiled successfully and is runable. But it is 45MB in size. Is that normal? Or is this a result of the last error?
Mine (Ubuntu 10.10, x86_64) is 32M, compiled as the standard build type of "RelWithDebInfo". To pick a different build type (which can produce smaller binaries), use cmake -DCMAKE_BUILD_TYPE=$BUILDTYPE where $BUILDTYPE can be one of Release, Debug, RelWithDebInfo.
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 · · ·

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: MG on FreeBSD, compile error using cmake
« Reply #2 on: 21 January 2011, 12:30:52 »
or you simply strip the binary, which will remove the debug info:

strip glest.bin
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

m0ellemeister

  • Guest
Re: MG on FreeBSD, compile error using cmake
« Reply #3 on: 21 January 2011, 16:12:36 »
@tomreyn
Thx for the Information. This is quite handy to know for building MegaGlest using FreeBSD ports in the future ;-)

@titi_linux

i'll try this tonight thx.

I was able to solve the compile error by myself -> https://forum.megaglest.org/index.php?topic=6454.msg65863#msg65863

 

anything