Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Discussion and help for Compilation problems and platform portability.

Moderator: coordinators

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby TimoK » Sat Apr 02, 2011 12:36 pm

Yes. I installed all dependencies before doing anything else. Also I have tried rebuilding after the first build with your update everything script.

edit: I got it working by compiling boost with python3.2-dev package.
TimoK
 
Posts: 2
Joined: Wed Feb 03, 2010 11:42 am

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Carbonflux » Wed Apr 06, 2011 1:45 am

I decided to try to get this to work in Ubuntu 10.04 and thought I would report some of my results...

I have been building with boost 1.40 which is the current version in the distro with np but some recent changes require boost 1.42.

I have built boost 1.43 with no problems and most of luxrender, the lib builds fine, I can get most of the way thru but it will not link the binaries without scrolling boost link errors.

I notice the CMakeCache.txt for both luxrays and luxrender does not have the correct paths specified in the BOOST_ROOT var when pointing directly to the libs, it still inists on using the /usr/lib default even tho the general paths are correct. I am suspecting the script for finding boost is not new enough in Ubuntu 10.04 or something.

After updating my cmake from 2.8 to 2.8.1 everything looks exactly the same as the video except in luxrays where it displays the boost library path as being /usr/lib

I was thinking about getting rid of FIND_PACKAGE in my local version and just using the BOOST_ROOT var or hard coding it.

Also a couple of lines got added to the top of CMakeLists.txt in luxrays have to be commented out on my machine. edit: this was fixed by upgrading to 2.8.1 cmake. :)

I notice there is no sudo ./bjam install in the guide also?

This was all using a fresh hg clone.

Great guide, very good video! I hope this does not sound critical.

Best Regards :)

edit:
From what I can tell the make files being generated are totally ignoring the BOOST_ROOT information for the lib paths, I have no idea how this is working in 10.10. I don't know cmake very well tho.
Last edited by Carbonflux on Wed Apr 06, 2011 3:55 am, edited 2 times in total.
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1394
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby dougal2 » Wed Apr 06, 2011 3:21 am

Carbonflux wrote:I notice there is no sudo ./bjam install in the guide also?


This is absolutely intentional!

The entire build process in my video keeps all the self-built libs and binaries contained in the ~/dev/ folder so that system libraries managed with the apt-get package manager do not get overwritten.
(I'm very very sceptical about using `make install` on linux systems for things built from source! IMO only letting the official packages from the apt repos get installed to the system is a Good Idea).

As for why there are differences on 10.04, I'm not too sure, but I'm pretty certain a very similar process worked for me on that version. Admittedly, it has been a while though, and perhaps cmake has been 'upgraded' in the mean time. ?
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Carbonflux » Wed Apr 06, 2011 3:46 am

Actually I have had some trouble with bjam install, I am glad you are doing it this way :)

I am having a hard time figuring out what the problem is, this really should be working, I upgraded cmake from 2.8 to 2.8.1 using a back-port and now everything looks almost exactly like the video but I am still having the same problems.

The one difference from the video, I edited my post above to reflect this, is when doing cmake for luxrays the boost lib path displayed is /usr/lib. The funny thing is luxrays builds and links fine, seems like everything is pointing to /usr/lib in CMakeLists.txt but the include seems to be the new version of boost. I seem to be stuck in some kind of weird build twilight zone ;)

I am not sure if CMakeLists.txt has changed or not since you did this guide.

I am wondering if you can give me advice on CMakeLists.txt lines for manually forcing the boost paths?
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1394
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby dougal2 » Wed Apr 06, 2011 3:57 am

You should be able to force the boost paths with
SET(BOOST_*** "/path/whatever")

I can't remember the exact variable names, but look in the *** BOOST *** section, and see what I did with the Python_* variables as an example.
The *_Library variables might need to take ld flags "-L/path -llibboost*" and not just a path name.

Hope that helps and isn't too vague ;)
User avatar
dougal2
Developer
 
Posts: 3073
Joined: Mon Jan 14, 2008 7:21 am

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Carbonflux » Wed Apr 06, 2011 4:26 am

Thanks dougal :) - not to vague at all, I can force the paths but the problem seems to be with the find_package command, it seems to be ignoring the boost root or something and will emit paths for the CMakeCache that are the system defaults.
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1394
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Dade » Wed Apr 06, 2011 5:17 am

Isn't a "BOOST_ROOT=/path/to/my/boost cmake ." enough to compile with any custom compiled Boost ? It works for me.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Carbonflux » Wed Apr 06, 2011 5:35 am

I agree, it really should be simple, this is what I am getting when I turn the debug flag on for boost in the CMakeLists...

Code: Select all
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:375 ] Boost not in cache
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:378 ] _boost_TEST_VERSIONS = 1.43;1.43.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:380 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:382 ] Boost_USE_STATIC_LIBS =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:441 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:443 ]   BOOST_ROOT = /home/david/Projects/boost_1_43_0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:445 ]   BOOST_INCLUDEDIR =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:447 ]   BOOST_LIBRARYDIR =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:449 ] _boost_TEST_VERSIONS = 1.43;1.43.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:498 ] Include debugging info:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:500 ]   _boost_INCLUDE_SEARCH_DIRS = /home/david/Projects/boost_1_43_0/include;/home/david/Projects/boost_1_43_0;C:/boost/include;C:/boost;/boost/include;/boost;/sw/local/include
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:502 ]   _boost_PATH_SUFFIXES = boost-1_43;boost-1_43_0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:526 ] location of version.hpp: /home/david/Projects/boost_1_43_0/boost/version.hpp
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:545 ] version.hpp reveals boost 1.43.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:636 ] guessed _boost_COMPILER = -gcc44
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:646 ] _boost_MULTITHREADED = -mt
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:663 ] _boost_STATIC_TAG =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:665 ] _boost_ABI_TAG = d
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:698 ] _boost_LIBRARIES_SEARCH_DIRS = /home/david/Projects/boost_1_43_0/lib;/home/david/Projects/boost_1_43_0/stage/lib;/home/david/Projects/boost_1_43_0/lib;/home/david/Projects/boost_1_43_0/../lib;C:/boost/lib;C:/boost;/boost/boost_1_43_0/lib;/boost/boost_1_43/lib;/boost/lib;/boost;/sw/local/lib
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:832 ] Boost_FOUND = TRUE
-- Boost version: 1.43.0
-- Found the following Boost libraries:
--   thread
--   filesystem
--   system
-- Boost include directory: /home/david/Projects/boost_1_43_0
-- Boost library directory: /usr/lib


Which looks fine really, but cmakecache.txt still uses the /usr/lib path. The above is from luxrays but it happens with luxrender also.

edit: one interesting point is that luxrays compiles and links and runs just fine with the above vars. :?

Heh.
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1394
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Carbonflux » Wed Apr 06, 2011 6:51 am

liblux.a and liblux.so build just fine but starting with luxcomp and everything after I get a lot of scrolling undefined reference boost errors. I am going to investigate the boost build further. :)
www.carbonflux.org - photographing the imagination.
User avatar
Carbonflux
Developer
 
Posts: 1394
Joined: Thu Aug 07, 2008 7:22 pm
Location: Seattle, WA, USA.

Re: Walkthrough: Building on Linux Mint 10 and Ubuntu 10.10

Postby Dade » Wed Apr 06, 2011 7:19 am

Carbonflux wrote:Which looks fine really, but cmakecache.txt still uses the /usr/lib path. The above is from luxrays but it happens with luxrender also.


Have you tried to delete cmakecache.txt before to run "BOOST_ROOT=/path/to/my/boost cmake ." ? Otherwise CMake seems to use older cached values even if you have changed the CMake script.
User avatar
Dade
Developer
 
Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

PreviousNext

Return to Compilation & Portability

Who is online

Users browsing this forum: No registered users and 1 guest