Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 646
    • Issues 646
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 164
    • Merge Requests 164
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #11725

Closed
Open
Opened Jul 07, 2020 by Tumeo@tumeo
  • Report abuse
  • New issue
Report abuse New issue

Error in the scons package due to a problem in the script shebang.

The scons package is broken because the scons script did not find the python executable.

I tried installing using Alpine 3.11.6 on podman.

Log:

podman run --rm -it alpine:latest
/ # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.11.6
PRETTY_NAME="Alpine Linux v3.11"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://bugs.alpinelinux.org/"
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
v3.11.6-91-gd05b39805b [http://dl-cdn.alpinelinux.org/alpine/v3.11/main]
v3.11.6-90-g318b6c3504 [http://dl-cdn.alpinelinux.org/alpine/v3.11/community]
OK: 11271 distinct packages available
/ # apk upgrade
(1/1) Upgrading ca-certificates-cacert (20191127-r1 -> 20191127-r2)
OK: 6 MiB in 14 packages

/ # apk add scons
(1/11) Installing libbz2 (1.0.8-r1)
(2/11) Installing expat (2.2.9-r1)
(3/11) Installing libffi (3.2.1-r6)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing xz-libs (5.2.4-r0)
(6/11) Installing ncurses-terminfo-base (6.1_p20200118-r4)
(7/11) Installing ncurses-libs (6.1_p20200118-r4)
(8/11) Installing readline (8.0.1-r0)
(9/11) Installing sqlite-libs (3.30.1-r2)
(10/11) Installing python3 (3.8.2-r0)
(11/11) Installing scons (3.1.1-r0)
Executing busybox-1.31.1-r9.trigger
OK: 69 MiB in 25 packages

/ # scons
env: can't execute 'python': No such file or directory

The problem is in the scons script shebang, it refers to /usr/bin/env python, but the default python on Alpine is python 2.

Solutions:

  • Patch the file $builddir/script/scons to use python3 instead of python in the shebang.
    • Eg: sed 's/env python/env python3/' script/scons > script/scons

Workarounds:

  • Run scons using python3 directly: python3 $(which scons)
Edited Jul 07, 2020 by Tumeo
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: alpine/aports#11725