gilgameshskytrooper
Posts: 4
Joined: Wed May 04, 2016 1:52 am
Contact: Website

How to port libraries from ARM-7a to ARM-53

Thu May 05, 2016 9:36 pm

I am trying to use a library (C++ React) which requires Intel Threading Building Blocks, which has been successfully ported up to the Pi 2's ARM-7a architecture, but I have no idea how I would port this to work on an ARM-58 on the Pi 3 (I believe its a version of ARM-v8, but I am not entirely sure).

Accurately, I am able to make and install Threading Building Blocks, but I am unable to compile anything that depends on it.

Would I need to make extensive changes to the TBB codebase for it it be compatible for the ARM-53? or could I replace the word ARM-7a in a few lines of source and build it?

I am in the last part of my Software Design course where I am learning C++. Therefore, I have no experience in parallelism, operating systems, and more problematic, the differences of different processor architecture.

Any help would be appreciated.

Thank you,
Andrew Lee

Here is the error I am getting when compiling for C++ React
Image

timrowledge
Posts: 1345
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: How to port libraries from ARM-7a to ARM-53

Thu May 05, 2016 10:57 pm

You don't need to do any porting. The Pi3 is running in 32 bit mode in which it is effectively a better, faster v7.
Barring some obscure bug that the A53 has (not completely impossible, certainly) in running v7 code, you should have no processor specific problems with this. Writing and building code to use the library is a different matter; welcome to the world of crummy software and terrible manuals. Which, by the way is no special insult to intel's code since pretty much all software is crummy.
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

gilgameshskytrooper
Posts: 4
Joined: Wed May 04, 2016 1:52 am
Contact: Website

Re: How to port libraries from ARM-7a to ARM-53

Fri May 06, 2016 1:06 am

timrowledge wrote:You don't need to do any porting. The Pi3 is running in 32 bit mode in which it is effectively a better, faster v7.
Barring some obscure bug that the A53 has (not completely impossible, certainly) in running v7 code, you should have no processor specific problems with this. Writing and building code to use the library is a different matter; welcome to the world of crummy software and terrible manuals. Which, by the way is no special insult to intel's code since pretty much all software is crummy.

So would it be worth my time to try to port this somehow? Or should I just give up?

Are there any alternatives to write parallel programs on the Pi 3?

Thanks

gilgameshskytrooper
Posts: 4
Joined: Wed May 04, 2016 1:52 am
Contact: Website

Re: How to port libraries from ARM-7a to ARM-53

Fri May 06, 2016 1:07 am

Or more accurately, can I just replace some lines of code which says _ARM_v7_ with _ARM_53? Or would it require me to patch the ways in which TBB works on a functional level?

edge0f17
Posts: 17
Joined: Sun Oct 25, 2015 6:55 am

Re: How to port libraries from ARM-7a to ARM-53

Fri May 06, 2016 5:56 am

If you do want to compile for arm v7, remove this part of the code:
"include/tbb/machine/gcc_armv7.h" uses machine code that will only run on armv7, so the mistake in the source code is on this line:
If you want to compile for armv6 or others, replace " #include "machine/gcc_armv7.h" " with "#include "machine/gcc_generic.h" "

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

Re: How to port libraries from ARM-7a to ARM-53

Fri May 06, 2016 6:40 am

An A53 is an ARMv8 , an A5 is an ARMv7 , an ARM11
is an ARMv6 etc.

Read up on this relationship on model name and
instruction set architecture on Wikipedia.

Furthermore , ARMv8 processors are backwards compatible
to ARMv7 processors , and those were already backwards
compatible to ARMv6 , so an ARMv8 will run code
for all three architectures just fine.

There is no "porting" to be done.

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

Return to “Advanced users”