Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmake build is up-to-date and extended to PyIlmBase #76

Closed
wants to merge 32 commits into from
Closed

Conversation

charlesfleche
Copy link

These patches allow to build IlmBase, PyIlmBase and OpenEXR with CMake. They allow to build the openexr code base on more recent Ubuntu distributions : see http://lists.nongnu.org/archive/html/openexr-devel/2013-09/msg00013.html

The CMake build now matches the autotools configuration in term of artifacts naming and library versioning. The CMake build has also been extended to PyIlmBase and allow to run tests and build source tarballs.

To build with CMake :

  1. set LD_LIBRARY_PATH, PKG_CONFIG_PATH and PYTHONPATH to the relevant paths under the installation prefix.

        export PREFIX=/path/to/openexr/install/prefix
        export LD_LIBRARY_PATH=$PREFIX/lib
        export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
        export PYTHONPATH=$PREFIX/lib/python2.7/site-packages
  2. create a build directory outside of the source tree and cd inside

  3. run cmake by targeting one of the openexr subdir and specify the installation prefix with -DCMAKE_INSTALL_PREFIX. For IlmBase :
    `sh
    cmake /path/to/OpenEXR/IlmBase -DCMAKE_INSTALL_PREFIX=$PREFIX
    ``

  4. You can now run make
    sh make help # display the available make targets make # run make VERBOSE=1 to see the debug output make install make test # run the tests, IexTest, ImathTest, etc... IlmImfFuzzTest and IlmImfTest take a __long__ time make package_source # build a source tarball

As few features have not been ported yet :

  • openex_viewers
  • -namespaceversioning
  • -customusernamaspace
  • generation of .la files (is it really necessary ? Seems more like a hangover from the autotools)
  • link from libName.so to libName-2_0.so, which shouldn't be a problem if the projects linking against OpenEXR use pkgconfig to get the dependency names

These patches have been tested on Ubuntu 13.04 64bits only.

Signed-off-by: Charles Flèche <[email protected]>
Signed-off-by: Charles Flèche <[email protected]>
Signed-off-by: Charles Flèche <[email protected]>
Signed-off-by: Charles Flèche <[email protected]>
…alled but defined nowhere.

Signed-off-by: Charles Flèche <[email protected]>
Signed-off-by: Charles Flèche <[email protected]>
… pass as they look for a non-existent boostutil python module.

Signed-off-by: Charles Flèche <[email protected]>
- Use pkgconfig to find IlmBase
- Added OpenEXR.pc
- Aded 2_0 suffix to IlmImf
- Always add b44ExpLogTable as a dependency
Signed-off-by: Charles Flèche <[email protected]>
…ipart, exrmultiview and exrstdattr link against , not 'Iex Imath Half'
…he library type in ADD_LIBRARY and let decide.

Signed-off-by: Charles Flèche <[email protected]>
…ach individual *-2_0 lib

Signed-off-by: Charles Flèche <[email protected]>
@pstanczyk
Copy link
Contributor

Testing these now ... thanks for the submission.

@pstanczyk
Copy link
Contributor

Hey - I just grabbed your changes, made a few tweaks and pushed them out to item76 branch. Could you do a pull on that branch and see if that works for you?

@pstanczyk
Copy link
Contributor

By the way - I am curious to know the impact this change will make to windows users

@charlesfleche
Copy link
Author

Almost worked : PyImathFixedVArray.h and PyImathFixedVArray.cpp need to be added to the PyImath CMake source list. It compiles but obviously there is a missing symbol when importing the imath python module.
I remember fixing that yesterday but I obviously forgot to push that patch...
Apart from that everything seems fine here on Ubuntu 13.04 64bits.

@charlesfleche
Copy link
Author

On 24/10/13 00:06, Piotr wrote:

By the way - I am curious to know the impact this change will make to
windows users

No idea, I don't have a Windows machine handy right now, sorry.

Is there a plan to drop the autotools build entirely and only keep CMake ?

@pstanczyk
Copy link
Contributor

Not in the near future, but we may have a go at cleaning up the build process to avoid the intermediate steps...
I'll add those missing files in

On 24/10/13 00:06, Piotr wrote:

By the way - I am curious to know the impact this change will make to
windows users


Reply to this email directly or view it on GitHub
#76 (comment).

No idea, I don't have a Windows machine handy right now, sorry.

Is there a plan to drop the autotools build entirely and only keep CMake ?


Reply to this email directly or view it on GitHubhttps://github.com//pull/76#issuecomment-26955434.

@ghost
Copy link

ghost commented Feb 27, 2014

Thank you, Charles! It's nearly impossible to build PyIlmBase with MinGW under Windows using autotools, your updates helped me compile it successfully. Bummer that they're not merged with the main branch still.

@charlesfleche
Copy link
Author

I'm glad, cheers. However I though my changes had been merged already.
It's been a little while I didn't have to directly work on OpenEXR, I'll
check that, thanks for the head up.

@ghost
Copy link

ghost commented Feb 27, 2014

I can't find your CMakeLists in this repo current branches.

@charlesfleche
Copy link
Author

Hey, is there something I need to change before this pull request is merged into the main repo ?

@ghost
Copy link

ghost commented Apr 19, 2014

Currently IlmBase can't be compiled on my setup. I've opened an issue: #94

@ghost
Copy link

ghost commented Apr 19, 2014

@charlesfleche ok, I found a solution to the problem above, here's my feedback: could you expose numpy include folder for CMake's GUI? I have only boost and python exposed, but numpy is needed to successfully compile it as well.

@charlesfleche
Copy link
Author

@procedural on which branch do you want to do that ? On the cmake-fixes branch or the item76 branch ?

@ghost
Copy link

ghost commented Apr 20, 2014

@charlesfleche cmake-fixes

@charlesfleche
Copy link
Author

Okay I think @pstanczyk wanted us to work from the item76 branch. I'm trying to clone my repo on my local machine again (I'm currently in a country where the internet connection is really slow and unreliable…) give the item76 branch another go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants