building on Chakra Linux

Discussion and help for Compilation problems and platform portability.

Moderator: coordinators

building on Chakra Linux

Postby EvilTwin » Thu Oct 20, 2011 11:22 am

hi
i tried to build lux on chakra linux stable without the pthreads package (not in the repos and dont know how to install it manually)
if fails with this message

Code: Select all
[ 98%] Building CXX object CMakeFiles/luxrender.dir/qrc_icons.o                                                                         
[100%] Building CXX object CMakeFiles/luxrender.dir/qrc_splash.o                                                                       
[100%] Building CXX object CMakeFiles/luxrender.dir/qrc_images.o                                                                       
Linking CXX executable luxrender                                                                                                       
liblux.a(layeredbsdf.o): In function `lux::LayeredBSDF::getRandSeed() const':                                                           
layeredbsdf.cpp:(.text+0x403): undefined reference to `lux::layered_randseed'
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [luxrender] Fehler 1
make[2]: *** [CMakeFiles/luxrender.dir/all] Fehler 2
make[1]: *** [CMakeFiles/luxrender.dir/rule] Fehler 2
make: *** [luxrender] Fehler 2


Code: Select all
collect2: ld gab 1 als Ende-Status zurück

means something like
Code: Select all
collect2: ld returned 1 as End-Status


any idea is welcome :)
thx
EvilTwin
 
Posts: 13
Joined: Wed Oct 06, 2010 7:39 am

Re: building on Chakra Linux

Postby Lord Crc » Thu Oct 20, 2011 11:35 am

There was some changes committed some hours ago regarding this, make sure you've updated to the latest version.

If that doesn't work, you could try moving the line "unsigned int layered_randseed;" above the "LayeredBSDF::getRandSeed()" function in "core/reflection/layeredbsdf.cpp", so it reads

Code: Select all
unsigned int layered_randseed;

unsigned int LayeredBSDF::getRandSeed() const {
...
}


instead of the current

Code: Select all
unsigned int LayeredBSDF::getRandSeed() const {
...
}

unsigned int layered_randseed;


It's at the very end of the file.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4450
Joined: Sat Nov 17, 2007 2:10 pm

Re: building on Chakra Linux

Postby EvilTwin » Thu Oct 20, 2011 1:33 pm

i now tried to pull the source from scr.luxrender.net (instead of bitbucket) and compile -> same error
and then to edit the file you suggested -> same error

Code: Select all

[jeanluc@chakra-pc lux]$ cmake ./
-- CMAKE VERSION DETECTED 2.8.5
-- Building mode: Release
-- Building for target x86_64-unknown-linux-gnu
-- LuxRays include directory: /home/jeanluc/luxrender/luxrays/include
-- LuxRays library directory: /home/jeanluc/luxrender/luxrays/lib/libluxrays.a
-- OpenCL include directory: /usr/include
-- OpenCL library: /usr/lib/libOpenCL.so
-- OpenGL include directory:
-- OpenGL library: /usr/lib/libGLU.so;/usr/lib/libGL.so;/usr/lib/libSM.so;/usr/lib/libICE.so;/usr/lib/libX11.so;/usr/lib/libXext.so
-- Boost library directory: /usr/lib
-- Boost include directory: /usr/include
-- FreeImage include directory: /usr/include
-- FreeImage library: /usr/lib/libfreeimage.a
-- OpenEXR include directory: /usr/include/OpenEXR
-- PNG include directory: /usr/include
-- Found Doxygen and generating documentation
-- Doxygen output:/home/jeanluc/luxrender/lux/doc/html/index.html
-- Python library directory: /usr/lib/libpython2.7.so
-- Python include directory: /usr/include/python2.7
-- Qt library directory: /usr/lib
-- Qt include directory: /usr/include
-- Qt libs: /usr/lib/libQtGui.so;/usr/lib/libQtCore.so}
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeanluc/luxrender/lux
[jeanluc@chakra-pc lux]$ make luxrender
Scanning dependencies of target luxStatic
[  0%] Building CXX object CMakeFiles/luxStatic.dir/core/reflection/layeredbsdf.o                                                                                                     
/home/jeanluc/luxrender/lux/core/reflection/layeredbsdf.cpp: In Elementfunktion »virtual lux::SWCSpectrum lux::LayeredBSDF::F(const lux::SpectrumWavelengths&, const lux::Vector&, const lux::Vector&, bool, lux::BxDFType) const«:
/home/jeanluc/luxrender/lux/core/reflection/layeredbsdf.cpp:263:49: Warnung: Vergleich zwischen vorzeichenbehafteten und vorzeichenlosen Ganzzahlausdrücken [-Wsign-compare]
Linking CXX static library liblux.a
[ 77%] Built target luxStatic                                                                                                                                                         
Linking CXX executable luxrender
liblux.a(layeredbsdf.o): In function `lux::LayeredBSDF::getRandSeed() const':                                                                                                         
layeredbsdf.cpp:(.text+0x403): undefined reference to `lux::layered_randseed'
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [luxrender] Fehler 1
make[2]: *** [CMakeFiles/luxrender.dir/all] Fehler 2
make[1]: *** [CMakeFiles/luxrender.dir/rule] Fehler 2
make: *** [luxrender] Fehler 2

EvilTwin
 
Posts: 13
Joined: Wed Oct 06, 2010 7:39 am

Re: building on Chakra Linux

Postby J the Ninja » Thu Oct 20, 2011 1:35 pm

Possible the build is still broken, I haven't had a chance to test the latest changes. It wasn't working on OS X when layered was first committed.
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2210
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: building on Chakra Linux

Postby B.Y.O.B. » Thu Oct 20, 2011 1:50 pm

I'm getting the same error. If it doesn't hurry, just wait for a fix - otherwise you maybe have to do what LordCrc suggested.
User avatar
B.Y.O.B.
 
Posts: 1880
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: building on Chakra Linux

Postby J the Ninja » Thu Oct 20, 2011 1:59 pm

If you really need a working 0.9 build, you just do this to get the last working rev:

Code: Select all
hg up 7de24969e3f7 --clean
-Jason

Material DB Admin
User avatar
J the Ninja
Developer
 
Posts: 2210
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

Re: building on Chakra Linux

Postby Lord Crc » Thu Oct 20, 2011 2:09 pm

It compiles fine on Windows, but then again... I must admit I'm a bit fuzzy when it comes to the "extern" keyword an C/C++. You can try to remove the whole line, ie just:
Code: Select all
unsigned int layered_randseed;

unsigned int LayeredBSDF::getRandSeed() const {
   //boost::mutex::scoped_lock lock(seed_mutex);
   //return rng_seed.uintValue();
   //return random::uintValueP();
   return layered_randseed++;
}
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 4450
Joined: Sat Nov 17, 2007 2:10 pm

Re: building on Chakra Linux

Postby paco » Thu Oct 20, 2011 2:32 pm

Yes, the build problem is my fault (layeredbsdf) - as LordCrc said it works fine on windows, but I'm having trouble getting a version that will work on other systems - mainly due to the fact that I don't have access to one so have to keep guessing at what might work.

I'll keep trying but will be a while before I can get to it.

Should we just removed the layeredbsdf from the cmake files for now? That way it would still work on windows and the other guys can still compile until a better solution is found?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: building on Chakra Linux

Postby EvilTwin » Thu Oct 20, 2011 3:14 pm

okay
i can wait a while and stick to 0.8

thanks anyway :)
EvilTwin
 
Posts: 13
Joined: Wed Oct 06, 2010 7:39 am

Re: building on Chakra Linux

Postby paco » Thu Oct 20, 2011 4:11 pm

Appologies again for the disruption :?

What you can also try is this:

Code: Select all
unsigned int LayeredBSDF::getRandSeed() const {
   return 1;
}


Should be fine for diffuse layered materials.
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am


Return to Compilation & Portability

Who is online

Users browsing this forum: Bing [Bot] and 0 guests