[SOLVED] installing header dependencies for Mitsuba/blender

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] installing header dependencies for Mitsuba/blender

Postby matali » Feb 1st, '13, 13:11

Hi all,

I'm pretty involved in Blender Plug-in development and I Just switched from Fedora after trying v18. I could successfully compile Blender from svn and Mitsuba from mercurial, but both are missing features because of missing devel packages. Blender now needs OSL ( http://code.google.com/p/openshadinglanguage/ ) and Mitsuba needs Collada-dom-devel (http://sourceforge.net/projects/collada-dom/files/).

Problems and already tried solutions :
Compiling OSL and collada-dom was doable and installing successfull, but the make install script only install binaries, no header. Thus, the scons script of both Blender and Mitsuba can't find the header files.
Trying to install from Fedora18 repositories doesn't work, because of a different Boost version (1.50 for Fedora).
The Dependency install script from Blender (which download, compile and install all needed dependencies) only works for Fedora, Suse and Debian.

Can someone explain how to install header files so that they are "registered" and scons can find them ? If someone can teach me or give a good link on how to build devel packages fo Mageia, i'm ok to start packaging for Mageia as well :)

Thanks

Edit : Solution :
replace line 22 and 23 of build/config-linux-gcc.py with that after compiling collada-dom 2.3.1:
COLLADAINCLUDE = ['/usr/local/include/collada-dom', '/usr/local/include/collada-dom/1.4']
COLLADALIB = ['collada14dom', 'xml2']
then copy it as config.py in mitsuba src's root directory and run scons
Last edited by matali on Feb 4th, '13, 12:55, edited 2 times in total.
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby alf » Feb 1st, '13, 14:34

This morning i built successfully collada-dom from source. I'd to install lib64boost-devel before. Thereafter i compiled also mitsuba from source. Cmake told me about a bunch of missing packages. I installed them and was able to compile. There were no error-messages regarding missing header files from collada. The only missing header file was /usr/include/GL/glu.h. After reinstalling li64mesaglu1-devel all went well.
for windows problems reboot; for linux problems be root
alf
 
Posts: 326
Joined: Apr 1st, '11, 23:07
Location: DE Paderborn

Re: installing header / releasing devel packages

Postby matali » Feb 1st, '13, 14:55

i recompiled and reinstalled collada-dom with root privileges instead of sudo and now the header files are in /usr/local/collada-dom2.4.
But mitsuba scons scipt continues to say collada is not installed... It compiles and works but won't support collada.
Should I refresh something so that scons see the headers ?

Edit : Scons was reading a cache so I deleted the mitsuba source directory and recreated it from the tarball. But no luck, scons keeps saying the collada headers are not installed :(
ALf, thanks for helping. Are you sure that you have collada support ? Mitsuba can compile without it and work. It only warns in the first 10 output lines after starting scons.
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby doktor5000 » Feb 1st, '13, 21:13

matali wrote:i recompiled and reinstalled collada-dom with root privileges instead of sudo and now the header files are in /usr/local/collada-dom2.4.
But mitsuba scons scipt continues to say collada is not installed... It compiles and works but won't support collada.


There are two way to adress that. Either you change the default prefix via e.g. ./configure --prefix=/usr
or you need to point mitsuba to the correct location.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing header / releasing devel packages

Postby matali » Feb 2nd, '13, 14:29

Thanks Doktor,
I modified the collada-dom header path in config.py to point to /usr/local/include/collada-dom. There is no ./configure .
scons now find the librairies :) but it terminates because of errors :(.
I had compiled and installed the latest version of Collada. Thinking it may be the problem, I compiled and installed the same old version as in Fedora (Collada-dom 2.3.1, compiling Mitsuba with collada support worked in Fedora 17), but it keeps doing the same error.

Output of scons script (sorry a little bit in french) :

Code: Select all
/usr/local/lib/libcollada14dom.so: référence indéfinie vers « xmlTextReaderConstName »
... (a lot of those undefined references)
/usr/local/lib/libcollada14dom.so: référence indéfinie vers « xmlTextReaderAttributeCount »
collect2: erreur: ld a retourné 1 code d'état d'exécution
scons: *** [build/release/converter/mtsimport] Error 1
scons: building terminated because of errors.


What did I do wrong ?
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby jaywalker » Feb 2nd, '13, 23:21

Hi Matali,
I think that you should have a look at how to pass the correct location prefix using cmake. The Doc's recommendation assumes you use the usual
Code: Select all
configure
make
su -c "make install"
commands to build stuff. For Mageia (and Mandriva and, no doubt, some other distributions) it is usually enough to execute:
Code: Select all
./configure --prefix=/usr
from within the package's top level source directory - the one which contains "configure".

Building stuff on Mageia which wants to be installed in /usr/local/ can cause some real headaches, as I think you are coming to understand, and it is usually much more efficient to take the small effort needed to build them in a way expected by the host system (i.e. to run from /usr/bin with libraries in /usr/lib (or lib64) and shared data in /usr/share.

I seem to recall that there is an interactive interface for cmake which permits the alteration of the install prefix. If not then I am reasonably certain there is a command line option or a configuration file change which will do the trick.

Richard
jaywalker
 
Posts: 341
Joined: Nov 17th, '11, 02:38
Location: Belfast, Northern Ireland

Re: installing header / releasing devel packages

Postby matali » Feb 3rd, '13, 12:01

Hi Richard,
Thanks for your answer, I'm sorry i'm a half advanced user for compiling. I never had to compile dependencies on Fedora because they were always already here, so' I'm noob with it.
I didn't find any configure file neither for collada-dom (2.3 or 2.4) nor for mitsuba.
If I understand good what you mean, I should configure collada to install to /usr and not /usr/local ?
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby doktor5000 » Feb 3rd, '13, 12:07

Actually i've had a short look at mitsuba, but i didn't seem to find the correct option, maybe it is not presented to the user.
scons didn't work for me at all, but it's a really long time since i built something with scons, and for cmake i didn't see any option
related to collada headers.

The interactive cmake gui is called ccmake. Just start it via
Code: Select all
ccmake .
inside the source directory, and hit c to configure the project.
Then toggle with a to advanced mode and look through all options.

@matali: Installing to /usr could be a solution, yes. FWIW i did only look at mitsuba, at collada not at all.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing header / releasing devel packages

Postby matali » Feb 3rd, '13, 15:38

Thanks for the help all :)

@Doktor : For mitsuba, you have to copy a scons config file first :
Code: Select all
cd /where/mitsuba/source/is/
cp ./build/config-linux-gcc.py config.py
scons


Line 22 of this config.py are the path searched for collada. I modified them to :
Code: Select all
COLLADAINCLUDE = ['/usr/local/include/collada-dom', '/usr/local/include/collada-dom/1.4']

and the scons script now find the collada-dom librairies.

But it gives me that new error after 5 min of compiling:
Code: Select all
/usr/local/lib/libcollada14dom.so: référence indéfinie vers « xmlTextReaderConstName »
... (a lot of those undefined references)
/usr/local/lib/libcollada14dom.so: référence indéfinie vers « xmlTextReaderAttributeCount »
collect2: erreur: ld a retourné 1 code d'état d'exécution
scons: *** [build/release/converter/mtsimport] Error 1
scons: building terminated because of errors.


I can try to install to /usr instead of /usr/local but I didn't find a configure script for collada to change that prefix. And I'm not sure it will resolve the new problem about xmlText* things above.

Note :Libxml2 is installed with devel packages and collada compiled and installed without error. Just in case I installed everything that has a link with xml in the official Cauldron repos. But it keeps saying those xmlTextReader* references are undifined :( . That 3D Standard is really widely used today (standard for googlearth and sketchup export and now used a lot in Blender) It would be good to have it in the official repos I think. I made a package request, but if someone here has some power to make it happen faster it would be nice :)
I'm ok to help the community and do the packaging if I can and we find a way to get it working. Mitsuba is the most complete and fastest open-source renderer out there, I'm ok to make it available for Mageia 3.
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby matali » Feb 3rd, '13, 20:57

Solution given from Wenzel, the author : add 'xml2' at line 23 to the parameters.
Attached is the config file to compile Mitsuba on Cauldron with scons. Copy it in the mitsuba src root directory and run scons.
I could package collada-dom if someone point me to a good tuto to build packages for Mageia or gives me the instructions here. I would be happy if someone else do it as well as i'm currently in exams time ;)

Hmm Py not allowed so replace line 22 and 23 of config-linux-gcc.py with that after compiling collada-dom 2.3.1:
COLLADAINCLUDE = ['/usr/local/include/collada-dom', '/usr/local/include/collada-dom/1.4']
COLLADALIB = ['collada14dom', 'xml2']
then copy it as config.py in mitsuba src's root directory
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: installing header / releasing devel packages

Postby doktor5000 » Feb 4th, '13, 00:02

For the "undefined reference" errors, you may want to look at http://wiki.mandriva.com/en/Underlinking to get an understanding of the problem.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: installing header / releasing devel packages

Postby matali » Feb 4th, '13, 12:43

thanks for the link, I'll have a more in-depth look at it when i'm finished with exams. How can I set that thread as solved ?
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02

Re: [SOLVED] installing header dependencies for Mitsuba/blen

Postby isadora » Feb 4th, '13, 13:24

Matali, edit the first post in this topic.
Place [SOLVED] in front of the subject/title, that will do. ;)
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: [SOLVED] installing header dependencies for Mitsuba/blen

Postby matali » Feb 5th, '13, 00:11

Ok, so I did it good :)
Thanks for the help, i hope it help someone else too.
I discussed with the Author, he think it will be better to make a script to automatically install and compile all dependencies for Mitsuba, as it may change pretty fast in the future and would make packages quickly obsolete. So I removed packaging from the title and will try to make such a script.
matali
 
Posts: 8
Joined: Feb 1st, '13, 13:02


Return to Advanced support

Who is online

Users browsing this forum: Google [Bot] and 1 guest