Open boberfly opened 7 years ago
I noticed you're building appleseed with USE_STATIC_BOOST=OFF
. I usually build it with USE_STATIC_BOOST=ON
. I can understand that in the context of Gaffer, you may want to build appleseed against dynamic Boost libraries, although I don't think it would make much differences.
Here are the official build instructions on Windows, just in case you would have missed them: https://github.com/appleseedhq/appleseed/wiki/Building-appleseed-on-Windows
It looks like the *.obj files contain definitions for many Boost symbols, a bit like if it had been built against static Boost libraries.
Yep I kind of don't want to static link as much as possible, but unfortunately I've needed to do this with OIIO/OSL so far. Does Appleseed not dynamic link in the context of the Maya plugin to the ones that come with Maya?
I had a bit of time to look into this again. In the CMakeLists.txt of Appleseed adding a particular definition seems to work for me:
if (USE_STATIC_BOOST)
set (Boost_USE_STATIC_LIBS TRUE)
else ()
add_definitions(-DBOOST_ALL_DYN_LINK)
endif ()
I now have a jumble of OIIO/image lib-related linker issues to look into now... :)
We don't have a Windows build of the Maya plugin yet. As far as I know, the only lib that's included in Maya that we (optionally) link too is OpenColorIO. Maya does not include OpenImageIO or OSL. On linux, I'm dynamic linking all libs for now.
@boberfly About BOOST_ALL_DYN_LINK
: if it turns out to work fine at the end, then we'll be happy to add it to our CMake setup. Please let us know how it turns out! We also gladly accept PRs :)
@dictoon @est77 cheers for the info. Yep I can do some PRs once I discover all the dynamic link flag jumbles, there's a few I think related to dynamic OpenEXR also, need to fix OSL linking to OIIO dynamic first I think...
Another one I found: BOOST_PYTHON_STATIC_LIB
I've removed this line and made it:
if (USE_STATIC_BOOST)
set (Boost_USE_STATIC_LIBS TRUE)
add_definitions(-DBOOST_PYTHON_STATIC_LIB) # link statically against Boost.Python
else ()
add_definitions(-DBOOST_ALL_DYN_LINK)
endif ()
I'd like to get around to making PRs eventually, there's also one for dynamic OpenEXR: -DOPENEXR_DLL
Cheers...
Good find! Thanks for doing this ungrateful work... Will definitely appreciate a PR at the end since I'll likely have to go through the same pain when building appleseed-maya on Windows...
FYI, we're now building and shipping appleseed-maya for Windows. We're linking statically against Boost.
@boberfly, is this issue still relevant?
@dictoon yep! https://github.com/appleseedhq/appleseed/pull/2075 Cheers, yeah I just got into building Gaffer for Windows again and saw that we are applying the patch to the tarball as part of the build process still.
Hi all, while porting Gaffer to Windows I've hit a small snag compiling Appleseed 1.6.0-beta from gafferDependencies, my own branch: gafferDependencies which is based off of the bash scripts for Linux/macOS...
Just curious if there's something trivial that I'm missing here, you can check in my repository on the build script that I've written here
Thanks all.