It is currently Thu Dec 12, 2019 7:01 am


All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Latest GIT doesn't compile with DYNAMIC libraries
PostPosted: Sun Jan 27, 2013 1:54 pm 
User avatar

Joined: Tue Sep 04, 2012 2:35 pm
Posts: 11
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Latest GIT doesn't compile with DYNAMIC libraries
PostPosted: Mon Jan 28, 2013 11:10 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
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.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Latest GIT doesn't compile with DYNAMIC libraries
PostPosted: Mon Jan 28, 2013 12:14 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Latest GIT doesn't compile with DYNAMIC libraries
PostPosted: Mon Jan 28, 2013 8:39 pm 
User avatar

Joined: Tue Sep 04, 2012 2:35 pm
Posts: 11
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.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Latest GIT doesn't compile with DYNAMIC libraries
PostPosted: Tue Jan 29, 2013 9:40 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
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.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net