Scribe
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
Contact: Website

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 12:50 pm

For example I'd like to use PCL for point cloud interpretation (for working with Kinect, lasers etc).

This has other requirements such as Boost, Eigen, FLANN, CMinPack, VTK.

It would be great to see optimised builds of these libraries ready for download. Certainly something like Boost is used in many many projects for example Wt (high performance C++ webserver and application) and would save a lot of time to have it ready built or even pre-installed.

Thoughts?

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 3:28 pm

This sounds like a very good idea. Compiling stuff the right way is both hard and off-putting, so having experts do it right certainly would help. Moreso because there's there a lot of stuff that's not available precompiled for armv6 in general, especially for the rare variant of ARMv6 + VFPv2 + DSP of the ARM1176JZF-S inside the Pi's Broadcom BCM2835 media processor. Jamesh has already been having fun with mere benchmarks, and the Doom demo seems to be having issues.

I'm not sure if the forum supports attachments though, nor if those pre-compiled binaries might be too dependent on using specific brands, variants, versions... to link them. Also, it would be nice if the compiling wizzes took the time to at least tell us what options/tricks they used, at best why and what the pitfalls are.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23083
Joined: Sat Jul 30, 2011 7:41 pm

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 5:08 pm

The right way of doing this would be to provide a Raspi specific repo so the libraries could be fetched using sudo apt-get install or similar.

However, that would not be cheap (AFAIK), esp. for a server of the size required (Lets say 50k boards active, wanting to download libraries at the same time or thereabouts). Might be able to piggy back on someone else's I suspect.

I'm sure the compiler whizzes would be more than happy to put all the required information on the Wiki. In fact, I think most of it has already been mentioned here - what would be needed is information on how to compile specific libraries - ie where to put the compiler options in the build files.

Building yourself isn't difficult mostly, but it is very time consuming on the Pi itself. (My compile of Stellarium took 5hrs - and I didn't do the libraries)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

rmike
Posts: 41
Joined: Mon Aug 22, 2011 10:50 am

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 6:42 pm

Hi,
in my opinion a cross compile setup like http://trac.cross-lfs.org/ would be the appropriate way to go. Compiling could than take place on a faster PC.
The problem with this approach is that many configure scripts etc. of applications are written with only the x86 platform in mind and need to be fixed by experts.

Michael

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 7:06 pm

Quote from rmike on October 1, 2011, 19:42
Hi,
in my opinion a cross compile setup like http://trac.cross-lfs.org/ would be the appropriate way to go. Compiling could than take place on a faster PC.
The problem with this approach is that many configure scripts etc. of applications are written with only the x86 platform in mind and need to be fixed by experts.


From what I've heard OpenEmbedded and derivatives has a very nice system for this, and it would relatively easy to compile a arm1176-jzf specific version.

A raspi-specific repo would be neat. I expect that it wouldn't be necessary to e.g. recompile all of Debian (provided you stick with softfp calling conventions at least), as most of the gains would be from commonly used libraries. Though even if you did I don't think server cost could be worked around. Bandwidth and hosting is fairly cheap these days, and there's plenty of people friendly to the project...

Scribe
Posts: 98
Joined: Wed Sep 28, 2011 12:00 pm
Contact: Website

Re: Pre-compiled popular libraries used in projects

Sat Oct 01, 2011 7:25 pm

I brought up this point as I've never had issues compiling libraries and including on Windows in a few minutes but I've really steered clear of linux in the past for reasons like this where I've been unable to correctly compile something or had to spend a lot of time just on a prerequisite library.

I've appreciated synology's approach, using ipkg (like debian's dpkg) which is also used on the similar embedded Gumstix package.

It's a very easy to use system, ipkg update, ipkg install etc

hippy
Posts: 5607
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Pre-compiled popular libraries used in projects

Sun Oct 02, 2011 3:07 pm

Quote from obarthelemy on October 1, 2011, 16:28
This sounds like a very good idea. Compiling stuff the right way is both hard and off-putting, so having experts do it right certainly would help.

Absolutely. Many future R-Pi users won't be familiar with Linux or its tools and will not have the tool chains, other system to cross-compile upon, nor knowledge to do it.

Those who wish to learn how to do it themselves can ( and I'm sure the community here will help ) but it shouldn't be forced upon people to do that. Entry to using an R-Pi, however someone wants to use it, should be made as easy as possible.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Pre-compiled popular libraries used in projects

Mon Oct 03, 2011 2:25 pm

Quote from rmike on October 1, 2011, 19:42
Hi,
in my opinion a cross compile setup like http://trac.cross-lfs.org/ would be the appropriate way to go. Compiling could than take place on a faster PC.
The problem with this approach is that many configure scripts etc. of applications are written with only the x86 platform in mind and need to be fixed by experts.

Michael

Not with Scratchbox2, they don't... :D

http://maemo.gitorious.org/scratchbox2

This tool was originally developed for the Maemo project by the community and Nokia. It insulates the scripts from the host, such that when compiling, even though it's using a cross compiler, it thinks it's compiling on the target machine.

Nokia's still using it (apparently they're still doing Linux after all...), TI uses it, others use it. :D

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: Pre-compiled popular libraries used in projects

Mon Oct 03, 2011 2:28 pm

Quote from asb on October 1, 2011, 20:06
From what I've heard OpenEmbedded and derivatives has a very nice system for this, and it would relatively easy to compile a arm1176-jzf specific version.


Unless the scripts move nicely over, you'll be adding patches to your recipes. If there's already a recipe or it does it's job right on cross-compilation, this would be a good answer as it'd crank out the stuff as part of the accessory packages for a distribution. If you're not doing distributions, though, OE is grotesque overkill (Using a MOAB to kill a mosquito...seriously...).


A raspi-specific repo would be neat. I expect that it wouldn't be necessary to e.g. recompile all of Debian (provided you stick with softfp calling conventions at least), as most of the gains would be from commonly used libraries. Though even if you did I don't think server cost could be worked around. Bandwidth and hosting is fairly cheap these days, and there's plenty of people friendly to the project...

I'd have already generated one along with a set of scratchbox2 based tools if kernel.org wasn't down. The OE scripts are kind of tied to pulling from there for the kernel and a few other things.

Return to “General discussion”