Project

General

Profile

Actions

Bug #1026

closed

cross.sh in app builds has hard coded toolchain prefix

Added by Hammel over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Systems
Target version:
Start date:
23 Aug 2023
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

This was discovered in RM #1025
All app's that use cross.sh need this update.

The cross.sh script should identify the toolchain prefix like so:

TCPREFIX=$(cd ${TC}/bin && ls -1 *gcc | sed 's/-gcc//')

Then use that in the configure command.

PKG_CONFIG_PATH="" \
    PKG_CONFIG_LIBDIR=${STAGING_DIR}/usr/lib/pkgconfig:${STAGING_DIR}/usr/share/pkgconfig \
    PKG_CONFIG_SYSROOT_DIR=$STAGING_DIR \
    PATH=$TOOLCHAIN/bin:$PATH \
    CFLAGS="-g --sysroot=$STAGING_DIR -I$STAGING_DIR/usr/lib/glib-2.0/include -I$STAGING/usr/lib/gtk-2.0/include" \
    LDFLAGS="-L$STAGING_DIR/usr/lib -L$STAGING_DIR/lib --sysroot=$STAGING_DIR/" \
    ./configure --host="${TCPREFIX}" 

Tested this against appmgr and it appears to work for RPi4. Need to verify it works for RPi2 and RPi.

Apps that need this update
  1. appmgr
  2. launcher
  3. piboxd
  4. piclock
  5. pipics
  6. videofe
  7. musicfe
  8. picam
  9. pixm
  10. pibox-network-config
  11. libpibox
  12. raspi2fb
  13. pistore
  14. pinet
  15. pidialer

After testing the app build manually it should also be tested under the metabuild.


Related issues

Blocks PiBox - Feature #1025: Test pisentry build on RPi 4ClosedHammel22 Aug 2023

Actions
Actions #1

Updated by Hammel over 1 year ago

Actions #2

Updated by Hammel over 1 year ago

  • Related to deleted (Feature #1025: Test pisentry build on RPi 4)
Actions #3

Updated by Hammel over 1 year ago

Actions #4

Updated by Hammel over 1 year ago

  • Description updated (diff)
Actions #5

Updated by Hammel over 1 year ago

  • Description updated (diff)
Actions #6

Updated by Hammel over 1 year ago

  • Description updated (diff)

All cross.sh builds have been updated.

Various GNU Make based builds will need their XCC_PREFIX updated.

  1. ironman+www
  2. lcdshow
  3. mjpg-streamer
  4. monkey
  5. omxplayer
  6. piboxwww
  7. pmsui
  8. psplash
  9. xeoncfg - not required.

This will be harder since we dynamically set the XCC_PREFIXDIR at build time and need to search that dir AFTER that value is set.

Actions #7

Updated by Hammel over 1 year ago

Assuming all GNU Make based builds set XCC_PREFIX in the top level config.mk, the following changes should work.

#---------------------------------------------------------------------
# Macro to find toolchain prefix
define GET_TC_PREFIX
$(shell
    basename $(shell ls -1 $1/bin/*gcc | sed 's/-gcc//')
)
endef

...

XCC_PREFIX          := $(call GET_TC_PREFIX, $(XCC_PREFIXDIR))

This was tested on lcdshow and seems to work, however lcdshow doesn't actually compile anything. It's a setup-only package. raspi2fb builds a binary.

Actions #8

Updated by Hammel over 1 year ago

  • % Done changed from 0 to 60

Duh. raspi2fb uses cross.sh, not GNU Make, as the front end.

mjpeg-streamer uses GNU Make and generates binaries. Tested the build with that and it worked fine. The binaries have the same size (for rpi4 vs rpi2 builds) but different sha256 sums, which suggests the binaries are from different compilers. The binaries won't be tested until complete system builds are can be generated.

Actions #9

Updated by Hammel about 1 year ago

  • % Done changed from 60 to 80

Most of the GNU Make based builds did not really require the change, but it was added anyway just to keep things consistent (except for xeoncfg, which doesn't use XCC at all).

Actions #10

Updated by Hammel about 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

All system builds are now working with RPi 4.
All system builds for RPi1 retested and working.
All system builds for RPI2 retested and working.

All changes committed and pushed.
Closing issue.

Actions

Also available in: Atom PDF