Skip to content

Conversation

@ashthespy
Copy link
Member

This is mainly from plietar/librespot#202 with a few changes.
mainly, moved the raspberrypi-tools/ download into the Dockerfile so that it can be cached.

@sashahilton00
Copy link
Member

Can anyone else confirm this works? Don't have docker installed/set up to test this. @ComlOnline @awiouy

@ComlOnline
Copy link
Contributor

Running it now.

@ashthespy
Copy link
Member Author

Side note --
While this works with libasound2_1.0.25-4, I can't seem to compile successfully with the newer libasound2_1.1.3-5 version. The compiler complains about a missing ld-linux-armhf.so.3

 = note: /pi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: warning: ld-linux-armhf.so.3, needed by /pi-tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/lib/arm-linux-gnueabihf/libasound.so, not found (try using -rpath or -rpath-link)
          /pi-tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/lib/arm-linux-gnueabihf/libasound.so: undefined reference to `__poll_chk@GLIBC_2.16'

This happens even when I link it with ln -s ld-linux.so.3 $SYSROOT/lib/ld-linux-armhf.so.3
Any ideas?

@kingosticks
Copy link
Contributor

kingosticks commented Mar 8, 2018

I did a similar cleanup and ended up with https://github.com/kingosticks/librespot/blob/rpi-docker/contrib/docker-build-pi-armv6hf.sh but i like your dkpg -x trick, much neater.

Looks like libasound2_1.0.25-4 requires GLIBC 2.16 but the sysroot has glibc 2.13 to remain compatible with Debian Wheezy (which is desirable).

@sashahilton00
Copy link
Member

Will try compiling later.

@sashahilton00
Copy link
Member

Also there's a typo @ashthespy you need to run the command docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh

@ashthespy
Copy link
Member Author

ashthespy commented Mar 8, 2018

I did a similar cleanup and ended up with https://github.com/kingosticks/librespot/blob/rpi-docker/contrib/docker-build-pi-armv6hf.sh but i like your dkpg -x trick, much neater.

Ah - nice! Likewise for the loop ;-) my shell scripting know-how is still neweb level. Would you mind if mash yours in here as well?

Looks like libasound2_1.0.25-4 requires GLIBC 2.16 but the sysroot has glibc 2.13 to remain compatible with Debian Wheezy (which is desirable).

You mean libasound2_1.1.3-5 requires GLIBC 2.16 right, 1.0.25-4 works fine so far.
I didn't really look into alsa's changelog to see if there is any benefit of udating from 1.0.25-4 - don't fix what is not broken policy?

Also there's a typo @ashthespy you need to run the command docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh

Oops, sorry!

@kingosticks
Copy link
Contributor

kingosticks commented Mar 8, 2018

You mean libasound2_1.1.3-5 requires GLIBC 2.16 right,

Yep! That's exactly what I meant to say. I agree: if it's not broke, don't fix it.

Feel free to mash.

@sashahilton00
Copy link
Member

Yup, lets just leave alsa at the current version. If you could push a commit to correct that typo, I'll merge this.

@ComlOnline
Copy link
Contributor

I'm getting a permission denied error when running it at the moment, but I think that could just be my setup. Ill keep digging.

@ashthespy
Copy link
Member Author

I'm getting a permission denied error when running it at the moment, but I think that could just be my setup. Ill keep digging.

FWIW: I use docker on windows and as it says:

Successfully tagged librespot-cross:latest
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. 
All files and directories added to build context will have '-rwxr-xr-x' permissions. 
It is recommended to double check and reset permissions for sensitive files and directories.

Dunno if this is causing issues?

@ComlOnline
Copy link
Contributor

This is the exact error I'm getting

user@docker3-vm:~/gits/librespot$ docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"contrib/docker-build-pi-armv6hf.sh\": permission denied": unknown.
ERRO[0000] error waiting for container: context canceled

I have a few hours of work to do before I can look again but like I said it could just be my environment.

@ashthespy
Copy link
Member Author

ashthespy commented Mar 8, 2018

Oh dang. it should be /src/contrib/docker-build-pi-armv6hf.sh meh.
So docker run -v /tmp/librespot-build:/build /src/contrib/librespot-cross docker-build-pi-armv6hf.sh

@sashahilton00
Copy link
Member

sashahilton00 commented Mar 8, 2018

@ashthespy it shouldn't be /src/contrib/docker-build-pi-armv6hf.sh the complete command would be docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh

@ComlOnline thats a problem with your docker environment.

@ComlOnline
Copy link
Contributor

@sashahilton00 I thought as much. More troubleshooting to be done on my end.

@ashthespy
Copy link
Member Author

@ashthespy it shouldn't be /src/contrib/docker-build-pi-armv6hf.sh the complete command would be docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh

Right - glossed over the WORKDIR /src line in the Dockerfile.
Should I revert this? Or close and submit a new pull request with a cleaner tree?

@kingosticks
Copy link
Contributor

Just commit a fix and squash it (force pushing PR branches is fine)

@ashthespy
Copy link
Member Author

@ComlOnline did you manage to trace down your issue?

@ComlOnline
Copy link
Contributor

ComlOnline commented Mar 10, 2018

I've got it!
The new file is not executable!
image
Edit: The above commit should have fixed it.

@ashthespy
Copy link
Member Author

I switch b/w windows and windows sub system for linux -- sorry!

@ComlOnline
Copy link
Contributor

No worries, its happened to me too many times. :( I think I may have undone your previous commit in the process though.

@ashthespy
Copy link
Member Author

 contrib/docker-build-pi-armv6hf.sh 100644 → 100755 

looks good to me?
TBH, I recently changed my git config to git config core.filemode false but will turn it back on now!

@ComlOnline
Copy link
Contributor

ComlOnline commented Mar 10, 2018

Thats what I thought, but notice it says two files modified and the docker command is docker run -v /tmp/librespot-build:/build contrib/librespot-cross docker-build-pi-armv6hf.sh again. With the contrib/ in the wrong place :/

Edit: Learning little things about github still.

@ashthespy
Copy link
Member Author

I can fix permissions , squash and force push if you'd like to keep a clean tree?

@ComlOnline
Copy link
Contributor

Squashing it works for me.

@sashahilton00
Copy link
Member

Yup squash and once tested will merge.

@ashthespy
Copy link
Member Author

ashthespy commented Mar 10, 2018

I am lost - I just pulled my branch from 40d7960 and the file seems to already have the 755 permissions? I'm guessing the Coml's branch was tracking the old commit that was squashed? Can someone counter check?

EDIT: nvm. windows is a pain with shell scripts.

I also found git update-index --chmod=+x <file> that will ensure I don't make such a mess again!

@ashthespy
Copy link
Member Author

Okay, everything looks good from my side - can be merged when tested :-)

@sashahilton00
Copy link
Member

@ashthespy the command is still wrong. docker run -v /tmp/librespot-build:/build librespot-cross contrib/docker-build-pi-armv6hf.sh is what it should be.

Tweak `armv6hf` crossbuild script

Fix example typo in Dockerfile

Changed File permissions
@ComlOnline
Copy link
Contributor

Looks good to me. Ill merge it in a few hours unless anyone has a problem. :) Thanks @ashthespy

@ComlOnline ComlOnline merged commit 9d9c311 into librespot-org:master Mar 11, 2018
@ashthespy ashthespy deleted the armv6hf branch March 18, 2018 12:21
paulfariello pushed a commit to paulfariello/librespot that referenced this pull request Sep 23, 2025
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

Successfully merging this pull request may close these issues.

4 participants