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

Not able to build pi-gadget classic #89

Open
Rahul-Ravichandran opened this issue Mar 23, 2022 · 6 comments
Open

Not able to build pi-gadget classic #89

Rahul-Ravichandran opened this issue Mar 23, 2022 · 6 comments

Comments

@Rahul-Ravichandran
Copy link

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'
@Rahul-Ravichandran
Copy link
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'

@Meulengracht
Copy link
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?

@Rahul-Ravichandran
Copy link
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'

@Meulengracht
Copy link
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?

@Rahul-Ravichandran
Copy link
Author

Rahul-Ravichandran commented Apr 8, 2022

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'.

@Meulengracht
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants