Skip to content

Not able to build pi-gadget classic #89

Open

Description

@Rahul-Ravichandran

Hi,
I tried build pi-gadget classic on amd64 Ubuntu 20.04 , it never builds and always hangs.
sudo SERIES=focal ARCH=arm64 make

So, i tried it on arm64 and it worked. It created a stage folder. how am i supposed to used this to create classic gadget?

I also tried running snapcraft --use-lxd on both architectures. But it always fails giving:

Building gadget
++ arch
++ arch

  • '[' x86_64 '!=' aarch64 -a x86_64 '!=' armv7l ']'
  • echo 'Cross compilation detected; using pre-defined sources list'
    Cross compilation detected; using pre-defined sources list
  • OPTIONAL_ARGS='SOURCES_HOST="./helpers/sources.list.cross"'
    ++ dpkg-architecture -t x86_64-linux-gnu -q DEB_HOST_ARCH
  • make -C /home/ok/classic-gadget/pi-gadget default DESTDIR=/home/ok/classic-gadget/pi-gadget/parts/gadget/install ARCH=arm64 'SOURCES_HOST="./helpers/sources.list.cross"'
    make: Entering directory '/home/ok/classic-gadget/pi-gadget'
    Makefile:18: *** Build architecture is not supported. Stop.
    make: Leaving directory '/home/ok/classic-gadget/pi-gadget'

Activity

  1. Rahul-Ravichandran commented on Mar 24, 2022

    @Rahul-Ravichandran
    Author

    when i run a clean run snapcraft --use-lxd. It always fail saying:

    apt-cache -o APT::Architecture=arm64 -o Dir::Etc::sourcelist=""/root/project/stage"/apt/restricted.sources.list" -o Dir::State::status="/root/project/stage"/tmp/status showpkg linux-firmware-raspi | sed -n -e 's/^Package: *//p' | sort -V | tail -1 ); )
    E: Handler silently failed
    make: *** [Makefile:95: firmware] Error 100
    make: Leaving directory '/root/project'

  2. Meulengracht commented on Apr 8, 2022

    @Meulengracht
    Member

    Someone might correct me here, but I'm pretty sure the pi-gadget can only be built on arm architecture. If you want to build it on your amd64 you need to use snapcraft remote-build to build for arm when your host in amd64.

    I can see from the build instructions this is very unclear, and maybe even incorrect. Could you try to see if it helps?

  3. Rahul-Ravichandran commented on Apr 8, 2022

    @Rahul-Ravichandran
    Author

    Hi @Meulengracht ,

    I did run it on arm64 system . It always return this error:

    apt-cache -o APT::Architecture=arm64 -o Dir::Etc::sourcelist=""/root/project/stage"/apt/restricted.sources.list" -o Dir::State::status="/root/project/stage"/tmp/status showpkg linux-firmware-raspi | sed -n -e 's/^Package: *//p' | sort -V | tail -1 ); )
    E: Handler silently failed
    make: *** [Makefile:95: firmware] Error 100
    make: Leaving directory '/root/project'

  4. Meulengracht commented on Apr 8, 2022

    @Meulengracht
    Member

    Could you clarify exactly how you produced that error? In your original message you mentioned you tried to build on arm64 and that it worked, but now it is not working?

    And did you get that same error with snapcraft remote-build?

  5. Rahul-Ravichandran commented on Apr 8, 2022

    @Rahul-Ravichandran
    Author

    Sorry, if i was unclear on the first message.
    I tried "sudo SERIES=focal make" on arm64 and that worked.

    But when i run snapcraft --use-lxd that never worked

    How do i specify the ARCH and SERIES when using remote-build on amd64, because when i changed it in make file, it did not reflect in the build process.

    When i run snapcraft remote-build , it mentions that its building for amd64 instead of arm64

    Also, even the remote build failed with error:

    Snap file not available for arch 'amd64'.
    Build log available at 'pi_amd64.1.txt'
    Build failed for arch 'amd64'.

  6. Meulengracht commented on Apr 8, 2022

    @Meulengracht
    Member

    try this command for remote-build snapcraft remote-build --build-on=arm64, the documentation for this command is here https://snapcraft.io/docs/remote-build

    That could be an issue with lxd, I'll try to see if I can reeproduce this and look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions