Volumes Of Fun
http://www.volumesoffun.com/phpBB3/

Latest GIT doesn't compile with DYNAMIC libraries
http://www.volumesoffun.com/phpBB3/viewtopic.php?f=15&t=476
Page 1 of 1

Author:  MirceaKitsune [ Sun Jan 27, 2013 1:54 pm ]
Post subject:  Latest GIT doesn't compile with DYNAMIC libraries

I'm trying to compile PolyVox from the GIT repository on BitBucket. I ran cmake and it generated the configuration without errors or warnings. Building however doesn't work when I run "make", and I get the following output:

Code:
mircea@linux-qz0r:/windows/D/OGRE/Polyvox_GIT/build> make
Scanning dependencies of target PolyVoxCore
[  1%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/ArraySizes.cpp.o
[  3%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/AStarPathfinder.cpp.o
[  4%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Log.cpp.o
[  6%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/MeshDecimator.cpp.o
[  7%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Region.cpp.o
[  9%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/SimpleInterface.cpp.o
[ 10%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/VertexTypes.cpp.o
[ 12%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Impl/MarchingCubesTables.cpp.o
[ 13%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Impl/RandomUnitVectors.cpp.o
[ 15%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Impl/RandomVectors.cpp.o
[ 16%] Building CXX object library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/source/Impl/Utility.cpp.o
Linking CXX shared library libPolyVoxCore.so
c++: error: SONAME_FLAGlibPolyVoxCore.so.0: No such file or directory
make[2]: *** [library/PolyVoxCore/libPolyVoxCore.so.0.2.1] Error 1
make[1]: *** [library/PolyVoxCore/CMakeFiles/PolyVoxCore.dir/all] Error 2
make: *** [all] Error 2
mircea@linux-qz0r:/windows/D/OGRE/Polyvox_GIT/build>


This only happens if I set LIBRARY_TYPE to DYNAMIC in cmake, if I use STATIC everything compiles fine. But I need dynamic libraries for what I'm doing. This seems like an error in GIT so I'm posting it in the Bugs thread... if it's something on my end let me know what I did wrong.

Author:  milliams [ Mon Jan 28, 2013 11:10 am ]
Post subject:  Re: Latest GIT doesn't compile with DYNAMIC libraries

That's indeed a strange error. It seems that it's trying to find a library called 'SONAME_FLAGlibPolyVoxCore.so.0' which doesn't exist ('SONAME_FLAG' is an internal CMake variable).

What version of GCC, CMake and Linux are you running? Also, are you building the develop or master git branch (master is the default)?

On Linux, DYNAMIC is the default build type so you shouldn't have to manually set it.

Author:  David Williams [ Mon Jan 28, 2013 12:14 pm ]
Post subject:  Re: Latest GIT doesn't compile with DYNAMIC libraries

I just gave this a try but was not able to reproduce your problem. The default appears to be DYNAMIC, and both DYNAMIC and STATIC builds compiled correctly and I was able to run the tests (this was with the latest version from git).

But I'm curious, what are your reasons for needing a dynamic build?

@milliams - I also tested on Windows earlier and I found that only one type of build is supported (I think it was static but I've forgotten now). I think we have discussed this before, but did we decide that only static builds were needed on Windows? We supported dynamic on Linux because some package managers don't like static libraries?

Author:  MirceaKitsune [ Mon Jan 28, 2013 8:39 pm ]
Post subject:  Re: Latest GIT doesn't compile with DYNAMIC libraries

I found out what's happening shortly after posting this. It took place with OGRE too so I looked into it... turns out it's a cmake bug most likely. I posted more about it here: http://public.kitware.com/Bug/view.php?id=13884 So it's not a PolyVox bug like I thought... but I'll wait on the cmake team to be sure it's not a configuration issue on the project's end.

Author:  David Williams [ Tue Jan 29, 2013 9:40 am ]
Post subject:  Re: Latest GIT doesn't compile with DYNAMIC libraries

Very strange... though it's not clear that they will be able to reproduce the issue as it seems not to occur for other PolyVox and Ogre users. Maybe there is some problem with your own version of CMake? Odd that it works on other projects though. Well let's see what the CMake team say.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/