GarageGames / Torque3D

MIT Licensed Open Source version of Torque 3D from GarageGames
http://torque3d.org
MIT License
3.35k stars 1.2k forks source link

Compilation error on Debian 8, Release builds #1260

Open Calinou opened 9 years ago

Calinou commented 9 years ago

I have installed all required dependencies. Operating system is Debian 8 (testing/jessie) 64-bit, Torque3D Git is up-to-date. This is a Release build by the way. Debug builds properly.

This is the output of make (using CMake):

[  1%] Built target convexDecomp
[  1%] Built target libogg
[  2%] Built target libvorbis
[  2%] Built target tinyxml
[  4%] Built target zlib
[  6%] Built target libtheora
[  8%] Built target lmng
[ 17%] Built target SDL2
[ 19%] Built target recast
[ 19%] Built target lungif
[ 22%] Built target ljpeg
[ 23%] Built target lpng
[ 24%] Built target squish
[ 27%] Built target opcode
[ 42%] Built target collada
[ 43%] Built target pcre
Linking CXX executable ../../../../game/Full
CMakeFiles/Full.dir/__/__/Engine/source/T3D/accumulationVolume.cpp.o: In function `AccumulationVolume::initPersistFields()':
accumulationVolume.cpp:(.text+0x1831): undefined reference to `ScenePolyhedralObject<SceneSpace, PolyhedronImpl<PolyhedronVectorData> >::initPersistFields()'
CMakeFiles/Full.dir/__/__/Engine/source/T3D/accumulationVolume.cpp.o: In function `ConcreteClassRep<AccumulationVolume>::init()':
accumulationVolume.cpp:(.text._ZN16ConcreteClassRepI18AccumulationVolumeE4initEv[_ZN16ConcreteClassRepI18AccumulationVolumeE4initEv]+0x4d): undefined reference to `ScenePolyhedralObject<SceneSpace, PolyhedronImpl<PolyhedronVectorData> >::initPersistFields()'
CMakeFiles/Full.dir/__/__/Engine/source/T3D/occlusionVolume.cpp.o: In function `ConcreteClassRep<OcclusionVolume>::init()':
occlusionVolume.cpp:(.text._ZN16ConcreteClassRepI15OcclusionVolumeE4initEv[_ZN16ConcreteClassRepI15OcclusionVolumeE4initEv]+0x1f): undefined reference to `ScenePolyhedralObject<SceneSpace, PolyhedronImpl<PolyhedronVectorData> >::initPersistFields()'
collect2: error: ld returned 1 exit status
Tools/CMake/CMakeFiles/Full.dir/build.make:20201: recipe for target '../../game/Full' failed
make[2]: *** [../../game/Full] Error 1
CMakeFiles/Makefile2:122: recipe for target 'Tools/CMake/CMakeFiles/Full.dir/all' failed
make[1]: *** [Tools/CMake/CMakeFiles/Full.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2
crabmusket commented 9 years ago

Weird error. Even weirder that it's fine in debug. Wonder if there's a screwy #define somewhere.

bpay commented 9 years ago

The splitting of the scenePolyhedralObject template into two headers is problematic for some compilers - I've run into link errors like this when building with clang-cl.

You might try adding #include "scene/mixin/scenePolyhedralObject.impl.h" to the offending cpp files, which helped fix errors for me. We should probably just merge the two headers, unless there is some compelling reason not to.

Azaezel commented 9 years ago

Do seem to recall at one point AccumulationVolume was spitting compiler warnings out related to the template. Doesn't seem present this end with a draw-down of a fresh devhead though for confirmation that that would be an additional indicator of the underlying flaw...

crabmusket commented 9 years ago

We should probably just merge the two headers, unless there is some compelling reason not to.

:+1: