Pelagicore / template-service

A template service.
Mozilla Public License 2.0
0 stars 4 forks source link

stubs-soft.h not found in the pelux sysroot #8

Open sparkleholic opened 6 years ago

sparkleholic commented 6 years ago

pelux sdk generated by populate_sdk seems not cotainning the header file named stubs-soft.h in the sysroot. Therefore, building the service-template fails the build even if I follow the tutorial page.

/opt/pelux-sdk-x86_64/1.0/sysroots/cortexa7hf-neon-vfpv4-pelux-linux-gnueabi/usr/include/gnu/stubs-32.h:7: error: gnu/stubs-soft.h: No such file or directory
 # include <gnu/stubs-soft.h>
           ^~~~~~~~~~~~~~~~~~

I think CMakeLists.txt need to have the following so that it can solve this issue.

set(CMAKE_CXX_FLAGS -mfloat-abi=hard)
GordanM commented 6 years ago

Hi @sparkleholic , thanks for reporting this! I will send this message to the team and check out what went wrong here. You are currently building the image for RPi3 if I am not mistaken? @sashko , @TSAnsari and @thenor do you have any hints?

sashko commented 6 years ago

Thanks for the report, @sparkleholic!

The proposed fix seems legit. Would you like to create a pull request or prefer us to fix it? Cheers.

sparkleholic commented 6 years ago

Because the -mfloat-abi flag is only used with the arm compiler, we must set the branch that applies this cxxflag to the arm compiler only. I found a good reference code `https://github.com/deroproject/dero/blob/master/CMakeLists.txt' However, handling all the branches seems to be an overkill in this sample, so I just have applied it briefly. PR: https://github.com/Pelagicore/template-service/pull/9