goci
Posts: 12
Joined: Thu May 16, 2013 8:22 pm

Is any Linux source compilable on Pi?

Fri Dec 13, 2013 6:57 pm

So here's the scenario. I have been using Raspbian as my main distribution and have been tweaking it by stripping it down to a minimum - remove packages etc. And now considering switching to ArchLinuxARM version of Pi as it seems to be a leaner OS.

The idea is to use the leanest OS whilst using software like:

Asterisk
MariaDB
Apache/NginX
Varnish

My concern is, that I am looking forward to switch and therefore would need to recompile the first two in particular. Hence my question:

If source is available for projects like the ones above, can they be compiled easily as can be compiled on Raspbian?

Any tips you would recommend? (As in gcc / g++ compilation checks or in the build process in general?)
Any dependencies to avoid?

Thanks!

User avatar
DougieLawson
Posts: 39818
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Is any Linux source compilable on Pi?

Fri Dec 13, 2013 7:42 pm

I think you'll find MariaDB is available as an Arch package.

Code: Select all

systemctl stop mysqld
pacman -S mariadb libmariadbclient mariadb-clients
systemctl start mysqld
mysql_upgrade -p
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

goci
Posts: 12
Joined: Thu May 16, 2013 8:22 pm

Re: Is any Linux source compilable on Pi?

Fri Dec 13, 2013 7:50 pm

Thanks Dougie :) That is useful !

So would be interested to know how to check if a project is compilable on Pi. i.e. Let's say I have the source. Are there any files I need to look in to see that the actual target CPU is compatible or supported, memory required etc? Anyone, please respond to my previous questions if possible. Thanks.

User avatar
DougieLawson
Posts: 39818
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Is any Linux source compilable on Pi?

Fri Dec 13, 2013 7:53 pm

The normal way is you pull the tar.gz or git clone the source.
cd into the directory
run ./configure && make && sudo make install
Run away and get a coffee or beer, or lunch, or watch TV or spend a night in bed, come back and it's either done or the screen is full or error messages.

In the case of error messages you throw those at Google and see what it spits out.

No rocket science needed.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Heater
Posts: 16540
Joined: Tue Jul 17, 2012 3:02 pm

Re: Is any Linux source compilable on Pi?

Sat Dec 14, 2013 7:05 pm

I'm not sure I see the point of going to all the trouble of building programs just to get a "lean machine". All you are doing is saving a bit of SD card space.

However I have compiled many programs so as to get a newer version than the distribution may include. For example I used a new version of nginx when they introduced support for proxying websockets recently.

Normally the instructions required to build a program will be included in the source code as README,txt or some such file. This can go easily or it can result in a lot of errors and missing dependencies etc to sort out.

You might like to look at "Linux From Scratch" if you really want to get proficient at this sort of thing.
http://www.linuxfromscratch.org/
http://www.intestinate.com/pilfs/
Memory in C++ is a leaky abstraction .

Return to “C/C++”