Matthew Moisen
Posts: 7
Joined: Fri Jun 14, 2013 6:50 am

Where Can I Learn how to Fork a Project for Raspberry Pi?

Tue Jun 25, 2013 6:08 pm

I recently received a RPi and figured that any program available on Linux would also be available on the RPi, but then I learned that this is not true; a program on linux must be forked to be compatible with Raspberry Pi.

I think this would be a good learning experience and potentially provide some use.

I am proficient in Java but have never used C/C++ and I am a beginner to Linux.

Can anyone point me to the resources I would need to learn to be able to fork existing Linux projects onto the RPi?

Thank you.

ghans
Posts: 7876
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Where Can I Learn how to Fork a Project for Raspberry Pi

Tue Jun 25, 2013 6:19 pm

This is only true because people distribute binaries.

If you have the source , you can compile it on the Pi (can take
a lot of time , though) .

There are some corner cases : anything that uses OpenGL is
useless on the Pi (only OpenGL ES is fast) and anything with
x86 assembly will break (ask the authors if in doubt).

If you take pure Python , Perl, Java , Ruby , PHP , node.js or
.NET apps , they will work without modification if you have the
runtime installed. In Raspbian that means Perl and Python by
default AFAIK.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Matthew Moisen
Posts: 7
Joined: Fri Jun 14, 2013 6:50 am

Re: Where Can I Learn how to Fork a Project for Raspberry Pi

Wed Jun 26, 2013 11:17 pm

Thank you for your answer.

Just to make sure I understand: as long as I have the source code for a program, and the program does not use OpenGL and was not made with x86 assembly, I can compile it on the RPi. On the other hand, programs that I do not have access to source code but to compiled binaries will not run on the RPi (unless they were compiled on the RPi).

Is that correct?

So there is no need for me to learn C?

User avatar
topguy
Posts: 5894
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Where Can I Learn how to Fork a Project for Raspberry Pi

Thu Jun 27, 2013 12:17 am

Matthew Moisen wrote:Thank you for your answer.

Just to make sure I understand:
A: as long as I have the source code for a program, and the program does not use OpenGL and was not made with x86 assembly, I can compile it on the RPi.
B: On the other hand, programs that I do not have access to source code but to compiled binaries will not run on the RPi (unless they were compiled for the RPi).

Is that correct?

C: So there is no need for me to learn C?
A: Chances are good that you then can compile it for the Pi, nothing is 100%
B: That is true if we are talking about C/C++ programs.
C: That would depend on what you are trying to do, it helps if you run into problems.

User avatar
rpdom
Posts: 15408
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Where Can I Learn how to Fork a Project for Raspberry Pi

Thu Jun 27, 2013 2:02 am

Matthew Moisen wrote:On the other hand, programs that I do not have access to source code but to compiled binaries will not run on the RPi (unless they were compiled on the RPi).
Minor correction there: Unless they were compiled for the RPi. It is quite easy to compile programs on another computer, with the right software, to run on the Pi. It is preferable that it is done on an ARM based system, but can be done on a Linux PC with an ARM cross-compiler toolchain.
So there is no need for me to learn C?
Possibly no "need", but it is an important language (and C++), and learning it could be something that you might consider doing later :)

Note that there are over 30000 program packages already available in the Raspbian repository for the Pi, and this number will increase over time.

Return to “Teaching and learning resources”