It is currently Sat Aug 22, 2020 1:44 pm


All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Thu Jul 19, 2012 3:29 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
Ok, I think we're in agreement that the choice between shared and static should be made at configure time, and that this will simplify the CMake code. I suggest we do make these changes and see if it improves things.
milliams wrote:
I can't imagine that there will be any differences in functionality (i.e. bugs) between the two and so I will probably not bother doing both in the nightly builds but we should check them manually from time to time to make sure that they both work properly (I'll continue to use dynamic libraries on Linux).

The only thing that springs to mind is the weird 'dll export' stuff which is required on Windows. So before a stable release we should just check that the required constructs are exported properly for the dynamic version (and we'll see a build error if they are not). I don't expect there to be any runtime differences.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Thu Jul 19, 2012 5:49 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
David Williams wrote:
Ok, I think we're in agreement that the choice between shared and static should be made at configure time, and that this will simplify the CMake code. I suggest we do make these changes and see if it improves things.
I've now pushed the changes. It removed quite a few lines of CMake code which is nice. You can ignore the various 'merge' commit messages that were pushed, that was just me playing with git-flow locally (it works quite nicely).

David Williams wrote:
The only thing that springs to mind is the weird 'dll export' stuff which is required on Windows. So before a stable release we should just check that the required constructs are exported properly for the dynamic version (and we'll see a build error if they are not). I don't expect there to be any runtime differences.
I agree, there's a chance that this could cause a problem. We'll just have to make sure that we test these things before a release. As it turns out, the static libraries weren't actually fully working on Linux due to me not building them as PIC (so it failed when they were linked into a dynamic library). I guess it turns out that I hadn't been testing that properly anyway...

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 8:34 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
milliams wrote:
I've now pushed the changes. It removed quite a few lines of CMake code which is nice. You can ignore the various 'merge' commit messages that were pushed, that was just me playing with git-flow locally (it works quite nicely).

Almost perfect... I just had to change one instance of PolyVoxUtilStatic to PolyVoxUtil. Guess this just slipped though but it's fixed now.

There is a remaining problem which I haven't mentioned yet and I think I need to look into it a bit myself. For a long time I've always had to run 'cmake ..' twice when generating Visual Studio solutions from a fresh build. The first time I run 'cmake ..' I get the following error as part of the output:

Quote:
-- Detecting CXX compiler ABI info
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDet
ermineCompilerABI.cmake:31 (TRY_COMPILE):
Cannot copy output executable

''

to destination specified by COPY_FILE:

'C:/code/polyvox/build/CMakeFiles/CMakeDetermineCompilerABI_CXX.bin'

Unable to find the executable at any of:

C:/code/polyvox/build/CMakeFiles/CMakeTmp/cmTryCompileExec.exe
C:/code/polyvox/build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.exe
C:/code/polyvox/build/CMakeFiles/CMakeTmp/Development/cmTryCompileExec.exe

Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.
cmake:64 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:3 (PROJECT)


The interesting thing is, I have two development machines (one with Python/SWIG and the other without) and I've always had this on both machine until recently. But one of the commits you made in the last week fixed this error for the machine without SWIG/Python, so now that machine works properly.

I'm going to go back and try to identify exactly which commit resolved the problem, then we see try and work out why it was an issue and see if something similar needs to be changed in the Python/SWIG part.

I'll let you know when I've done some investigation.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 10:17 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
David Williams wrote:
Almost perfect... I just had to change one instance of PolyVoxUtilStatic to PolyVoxUtil. Guess this just slipped though but it's fixed now.
Great, I guess I missed that.

David Williams wrote:
There is a remaining problem which I haven't mentioned yet and I think I need to look into it a bit myself. For a long time I've always had to run 'cmake ..' twice when generating Visual Studio solutions from a fresh build. The first time I run 'cmake ..' I get the following error as part of the output:
<snip>
The interesting thing is, I have two development machines (one with Python/SWIG and the other without) and I've always had this on both machine until recently. But one of the commits you made in the last week fixed this error for the machine without SWIG/Python, so now that machine works properly.

I'm going to go back and try to identify exactly which commit resolved the problem, then we see try and work out why it was an issue and see if something similar needs to be changed in the Python/SWIG part.

I'll let you know when I've done some investigation.
Hmm, this seems like a CMake bug to me, especially if you were seeing it on multiple machines. I don't remember seeing this bug myself when compiling on Windows. Perhaps try updating the version of CMake to see if that helps. Otherwise, at one point I think we were manually setting the executable output location on Windows but now I can't find this so I guess it's been removed.

You should also check (after the first CMake run) where (if it exists) the cmTryCompileExec.exe file is actually located.

But, yes, try to track down the commit that fixed it (I would suggest using 'git bisect' but I think it's too much hassle for this case) and see if that helps.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 11:07 am 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
It seems I might have been mistaken.... after rolling back I can't reproduce the issue. Also, if I add SWIG/Python to the machine which previously didn't have them then this does not cause a problem. i.e. I now have SWIG/Python on both machines but only one is giving issues. I guess it's machine specific so I'll try to compare the output of the two machines to track down the problem.

On an unrelated note, in the summary 'Build bindings' is set to ON if they are to be built but appears to be blank otherwise. I guess it should be set to OFF?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 11:16 am 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
David Williams wrote:
It seems I might have been mistaken.... after rolling back I can't reproduce the issue. Also, if I add SWIG/Python to the machine which previously didn't have them then this does not cause a problem. i.e. I now have SWIG/Python on both machines but only one is giving issues. I guess it's machine specific so I'll try to compare the output of the two machines to track down the problem.
Bugs related to system configuration are a pain to figure out since things can change so easily (especially with semi-automatic updates on Linux) but if you can work out what's causing the problem it would be great as I'm sure a user would hit it as well eventually.

David Williams wrote:
On an unrelated note, in the summary 'Build bindings' is set to ON if they are to be built but appears to be blank otherwise. I guess it should be set to OFF?
I haven't actually tested that part recently on a machine that doesn't have SWIG installed so I've missed that bug. According to this line it should indeed be set to OFF in that case and I don't know why it's not. It's probably a scoping issue with that variable. I'll take a look tonight if I get a chance.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 1:09 pm 
Developer
User avatar

Joined: Sun May 04, 2008 6:35 pm
Posts: 1827
It does look like it's a problem with my configuration. I tried the most basic CMake script I could find:
Code:
# The name of our project is "HELLO". CMakeLists files in this project can
# refer to the root source directory of the project as ${HELLO_SOURCE_DIR} and
# to the root binary directory of the project as ${HELLO_BINARY_DIR}.
cmake_minimum_required (VERSION 2.6)
project (HELLO)

And it has the same problem on that machine (but works on my other machine). So yeah... I don't think is going to be affecting other people and I'll probably ignore it.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: PolyVox now requires CMake 2.8.3
PostPosted: Fri Jul 20, 2012 8:33 pm 
Developer
User avatar

Joined: Sun May 11, 2008 4:29 pm
Posts: 198
Location: UK
It certainly seems like CMake is confused about something in that case. Probably the best fix for you is to remove any trace of CMake from the system (including any entries in the path etc.) and install it again from scratch.

_________________
Matt Williams
Linux/CMake guy


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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