Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi - Elashell & Elatests not generated #143

Open
peter-strauss opened this issue Dec 17, 2018 · 3 comments
Open

Raspberry Pi - Elashell & Elatests not generated #143

peter-strauss opened this issue Dec 17, 2018 · 3 comments

Comments

@peter-strauss
Copy link
Contributor

When cross-compiling the native Carrier for Raspberry Pi on Ubuntu, no executable elashell or elatests is created as for non-cross-compiled versions.

Activating ENABLE_APPS_DEFAULT or ENABLE_TESTS_DEFAULT in CMakeLists.txt file on root level starts the build process, but fails:
...
if(CMAKE_CROSSCOMPILING)
set(ENABLE_APPS_DEFAULT FALSE) #set to true
set(ENABLE_TESTS_DEFAULT FALSE) #set to true
else()
...

[ 71%] Building C object apps/shell/CMakeFiles/elashell.dir/shell.c.o
/home/peter/Desktop/Elastos.NET.Carrier.Native.SDK/apps/shell/shell.c:63:20: fatal error: curses.h: No such file or directory
#include <curses.h>
^
compilation terminated.
apps/shell/CMakeFiles/elashell.dir/build.make:62: recipe for target 'apps/shell/CMakeFiles/elashell.dir/shell.c.o' failed
make[2]: *** [apps/shell/CMakeFiles/elashell.dir/shell.c.o] Error 1
CMakeFiles/Makefile2:1217: recipe for target 'apps/shell/CMakeFiles/elashell.dir/all' failed
make[1]: *** [apps/shell/CMakeFiles/elashell.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

...

Additionally, from my understanding, Android and iOS versions also fall into the 'CMAKE_CROSSCOMPILING' category, therefore Raspberry versions will also have to be separated from the general cross-compiling code logic.

@stiartsly
Copy link
Contributor

CMake build system in Carrier project doesn't support to build "apps" and "tests" directories for cross-compilation because of lacking dependency libraries, such as CUnit/libCurses, especially for Android/iOS platform. But you can try to make compilation for whole project on Raspberry platform, which will output elatests and all executable of apps.

@andersalm
Copy link
Contributor

Related: #173

@stiartsly
Copy link
Contributor

@peter-strauss Can the cross-compilation for raspberry PI on Linux (Ubuntu or Debian) get successful result on your. environment , being exclusive of compilation for 'apps' and 'tests' directories? Those directories are not able to build when being cross-compilation, not only for raspberry pi, but for Android and iOS as well.

I checked it again for this on my ubuntu, and it still works. So, if the cross-compilation for raspberry PI on your environment works, please close this issue. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants