* Script should now remove relevant dirs in $INST when a package becomes suitable
* Script systematically runs relevant ldconfig commands when building boost/oiio
Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).
I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/
Will test and enable other distro in following day(s), I do not *expect* much difficulties here.
The script is updated with:
Arch Linux support
Numpy 1.7.0 final
Fedora 17 / 18 support
OpenSUSE 12.2 / 12.3 support
Use FFMPEG from RPM-distro repos
RPM-distro fixes
Removed Schroedinger codec
Fixes for Cmake/Scons config
Reviewed by Sergey and me.
Mostly, it:
* Adds numpy and opencollada
* Merges both Suse and Fedora/Redhat into a single func (not sure this is a good idea, but would have been to painful to undo this).
Notes:
* I changed a bit how numpy is handled, so that the script does not try to build it when py3.3 was installed from package!
* Bumped oiio 'magic number', as now trying to use libtiff5 means we have to rebuild everything using tiff!
* Only made a quick test on my own system, but Ejner made quite some extensive ones, so it should be safe.
* I’m not sure keeping on extending that horrible bash thing is a good idea. Shell scripts are nice for small, limited stuff, but I personnaly find that one (over 53ko!) unreadable and a pita to maintain. Further more, doing the same for windows would mean to rewrite everything in another language... I have started work to port this as a py3 script, so that we have a nice structure (classes...) easy to extend/tweak/implement in various OSs/etc.!
It'll likely give issues with system boost libraries in ubuntu/debian due
to this distros doesn't like static linking and not building static libs
with -fPIC flag.
Disabling LINKSTATIC should be quite painless since blender requires the
same image libraries as oiio does.
Also add compile_LLVM func, needed by openSuse (which llvm package is
completly broken), and probably can help for OSL in Fedora17 too (will test soon).
* Prevent ocio from building its python binding, we don't use it, and it looks like OCIO's CMakeList is not robust here (i.e. can try to build it even when Python.h is not found :/ [irc report]).
* Do not build ffmpeg's player, server nor doc.
* Give right paths to static extra libs for ffmpeg when ALL_STATIC is true.
Also fixed DEB boost version checking, own fault.
And disabled building ocio's apps, else it would go searching for an oiio lib (and we have not yet built ours) - anyway, if users want them, they can build them on their own!
Also refactored a bit osl/llvm/etc. stuff for DEB (so that now all osl-deps are only installed when we do have a valid llvm and want to [try to!] build osl).
And added osl/llvm/etc. code for RPM (osl does not compile under fedora currently, though :/ ).
It's really horror even for me to compile it on release environment,
i do not want anybody to spend time trying to support this lib in
automatic script or make it so user's are easily frustrated by some
hack added to OSL repository.
If you REALLY want to build OSL with this script, set BUILD_OSL to
truth (it's in the top of the script).
Now OSL should work for DEB-like systems with CMake (not yet tested with scones, nor fedora).
Fedora version-checking bug should be fixed.
Also simplified a bit compile_FOO funcs code.
*New $INST variable to easily change the installation root dir of compiled libs.
*Better handling of versions for debian (DEB) too (and fix a bug for fedora (RPM) ones).
*Enhancements/fixes to compile_FOO funcs:
**Most notable, we now can force a recompile when we change something into these funcs, so user will always have latest-instructions compiled libs (else, he would have have to manually remove lib dirs under $INST...)
*General naming cleanup inside script (still wip).
Also adding boost date_time lib to linux in cmake file (why wasn't it there???).
*Better handling of optional libs for ffmpeg, and is now able to check and give user additional link libs for ffmpeg.
*Added two helpers (only used by RPM for now) to:
**check whether a version number is greater or equal than another one, and...
**check whether a version number is "included" into another one (eg 3.3.2 is included into more general 3.3).
*Added date-time as target when building our own boost.
*Removed apt-get upgrade action for DEB (let the user decide when he wants to globally upgrade its system!).
*For CMake, enable ffmpeg (it is disabled by default...)
*Give the full list a librairies to link.
Tested on Debian for CMake (did not test scons at all for now, anyway). Not yet implemented for RPM/SUSE distribs, but this should not be too hard.
*Unset LANG envar for the script execution time, because commands like "apt-cache policy" will return translated messages, which would not be grep'ed crrectly...
*Disable using distrib's ffmpeg for DEB distribs too, as e.g. official debian features libav under ffmpeg name, which is not that much compatible with current Blender code.
*Also check for libxvidcore-dev .deb package, debian has no libxvidcore4-dev ;)
This script will install all packages from the repositories and will compile
missing in repositories libraries.
It is supposed to replace pre-compiled libraries from our svn.
Tested script on Fedora 14 and 17, Ubuntu 10.04 and 12.10. All the dependencies
and manually built libraries seems to be fine. However, it's really annoying to
build blender in virtual machine to ensure there's no linking errors, i would
hope community will help testing and making needed tweaks to the script :)
To use the script, simple run it from your user name. It'll run installation
commands from a sudo, so you would likely be requested to type a password.
I've made tweaks to CMake FindLibs, so it should find OIIO, OCIO and python
libraries compiled by this script. Boost and FFmpeg would need to be specified
manually.
SCons currently would require manual paths specifications as well. Perhaps we
could make SCons smarter in the future.
All the parameters you need to pass to CMake/SCons would be printed when script
finishes to run.
Pretty much sure it's not production-ready script, but we need to start testing
at some point :)
This script was used to initialize build environment currently used
for glibc-2.11 builds.
It's supposed to be used on debian-based distros.
Usage is described in the top comment of the script.
It is highly recommended to use this script in the virtual machine
to prevent possible conflicts with your own configuration.
TODO:
- Add OSL configuration
- Script requires manual copying of some scripts still (see comments
at the top of the script)
I would prefer this script be edited only in cases when it's really
needed, meaning i wouldn't be fan of changes like "just use latest
version of library XXX". It's not so safe to do such changes and it's
easy to upgrade libraries after environment was set up.