void-linux / void-packages

The Void source packages collection
https://voidlinux.org
Other
2.57k stars 2.14k forks source link

arduino package links against glibc on musl #19290

Open Johnnynator opened 4 years ago

Johnnynator commented 4 years ago

System

Expected behavior

/usr/lib/arduino/lib/liblistSerialsj.so
/usr/lib/arduino/tools-builder/arduino-preprocessor/0.1.5/arduino-preprocessor
/usr/lib/arduino/tools-builder/ctags/5.8-arduino11/ctags

should link against musl and not glibc

Actual behavior

# xbps-install arduino
arduino-1.8.9_2: broken, unresolvable shlib `ld-linux-x86-64.so.2'
arduino-1.8.9_2: broken, unresolvable shlib `libc.so.6'
arduino-1.8.9_2: broken, unresolvable shlib `libdl.so.2'
arduino-1.8.9_2: broken, unresolvable shlib `libm.so.6'
arduino-1.8.9_2: broken, unresolvable shlib `libpthread.so.0'
arduino-1.8.9_2: broken, unresolvable shlib `librt.so.1'
Transaction aborted due to unresolved shlibs.

Steps to reproduce the behavior

ericonr commented 4 years ago

Managed to reproduce on a Musl machine, trying to diagnose. As a temporary work around, arduino from Flatpak works, as does arduino-cli.

ericonr commented 4 years ago

The issue seems to be with the arduino-preprocessor executable. I don't understand the build system, so I can't tell if it's being downloaded already built or being built locally. I suppose it's being downloaded, specially because if it was being locally it should statically link librt and libdl.

What seems to be the biggest bug, of course, is that xbps-src is recommending glibc in a musl system, due to the libc.so.6 symbol. No idea on this one either.

ericonr commented 4 years ago

It's at least ctags and arduino-preprocessor. Building as linux-build for musl makes it work, but then it's missing libraries like /usr/lib/arduino/lib/liblistSerialsj.so

m0rg-dev commented 3 years ago

wonder if this is fixable by de-vendoring liblistSerialsj.so and whatever else

m0rg-dev commented 3 years ago

actually the package already seems to be doing that for libastyle

ericonr commented 3 years ago

I'm not sure how worth it solving this is, because people will still be using toolchains built for glibc, since arduino downloads them from a single server...

m0rg-dev commented 3 years ago

does it? I figured it would use the host toolchain since the package depends on avr-gcc etc

m0rg-dev commented 3 years ago

well regardless it turns out https://github.com/arduino/arduino-preprocessor/ depends on llvm 4.0.0, which it downloads at build-time.

we probably don't need any of that.

astralchan commented 2 years ago

Still reproducable on my x86_64-musl void machine:

# xbps-install -S arduino
[*] Updating repository `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-musl-repodata' ...
MISSING: glibc>=2.29_1
Transaction aborted due to unresolved dependencies.
github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

github-actions[bot] commented 2 years ago

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

astralchan commented 2 years ago

bump