Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

arm-linux-gnueabihf-gcc doesn't find sysroot

Featured Replies

I've built Armbian for my purposes with the following build settings:
 

./compile.sh BOARD="bananapi" BRANCH="current" RELEASE="focal" \
            KERNEL_ONLY="no" KERNEL_CONFIGURE="no" BUILD_DESKTOP="no" EXTERNAL="yes" \
            INSTALL_HEADERS="yes"

.. and the board boots from the resulting image just fine, and seems to be running well.

Now, I want to clone a repo onto this board, and use the ONBOARD compiler for development purposes .. I'm doing some CAN development, and I want to use SocketCan (https://github.com/jackthompsonnz/socketcan-linux-5.0.git) which is a kernel module for gaining access to a USB-CAN adapter.

So I connect to it, clone the SocketCan Repo and get a message like this:

mcp@mcp:~/CANDevelopment/third/socketcan-linux-5.0$ make
make -C /lib/modules/5.7.11-sunxi/build M=/home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan modules
make[1]: Entering directory '/usr/src/linux-headers-5.7.11-sunxi'
  CC [M]  /home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_v2.o
In file included from /home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_v2.c:32:
/home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_core.h:196:24: error: field ‘tv_host_0’ has incomplete type
  196 |         struct timeval tv_host_0;
      |                        ^~~~~~~~~
make[2]: *** [scripts/Makefile.build:267: /home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_v2.o] Error 1
make[1]: *** [Makefile:1734: /home/mcp/CANDevelopment/third/socketcan-linux-5.0/usb-to-can_socketcan] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.7.11-sunxi'
make: *** [Makefile:4: ixx_usb] Error 2

 

.. which implies that the compiler (onboard) is not using its own sysroot in order to pick up the basic types (such as is in sys/time.h) .. so I add "-isystem /usr/include/arm-linux-gnueabihf/sys" to the flags, and things build again ..

The question is, how do I 'properly' tell Armbian's build process to include the right sysroot configuration in the compiler by default - I don't really want to have to add the -isystem flag to every repo I clone for building on this board - there has to be some missing step in the setup of the Armbian build image to result in this compiler not being functional .. perhaps I missed a step?

FWIW, I verified that the linux-headers package for my board (sunxi - bananapi) is installed, and works .. and if I add '-isystem /usr/include/arm-linux-gnueabihf/sys' to everything the compiler seems to function just fine. 

Did I skip a missing "link files" step somewhere, or anyone got any other clues?  Where possible I'd like to use Armbian with as few 'hacks/fixups' as possible, and maybe this is just me missing something obvious in the build setup ..

 

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.