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
libpthread package does not contain libpthread.so #12642
Comments
You're compiling on the device itself? |
Yes I tried. But libdl is also missing. I made stub libraries libpthread.a and libdl.a just so the linking step would work... but then ran out of memory again anyway. But it's not so important now that I realized I need to set the softfloat option, then I can cross-compile and it actually runs on the gnubee. GOARCH=mipsle GOOS=linux GOMIPS=softfloat Still, not having libpthread must be an obstacle for compiling a lot of things. |
Most people cross compile. The highest version of GCC available is GCC7 while GCC10 is available as a pull request for cross compilation. Maybe @noblepepper can help. |
I don't know what this command does and where it comes from but it helped me with the libpthred issue ( https://forum.openwrt.org/t/howto-setup-zigbee2mqtt-on-openwrt/31856 |
The gcc package has an option to include libpthread on the target but it is default no. To get a gcc package with it you would need to compile your own image and set this option in the gcc package, at that point cross compiling would be much faster and probably easier. You could also use libpthread from a downloaded sdk by putting in on the target under /usr/lib. The command from the makefile is On target compiling is very limited, ram is one of the main issues. Swap doesn't always help me much I still get crashes if large amounts of ram are needed. |
Maintainer: @felix Fietkau
Environment: OpenWrt 19.07.2, r10947-65030d81f3 on GnuBee 2, ramips MediaTek MT7621
Description:
The musl faq http://www.musl-libc.org/faq.html has this near the bottom:
So the fact that the libpthread package is completely empty is not POSIX-compliant. Some software will try to link with it, and that fails. In my case I'm trying to build https://github.com/ipfs/go-ipfs; I don't know where -lpthread comes from, but it fails. libpthread.a or .so should exist and be linkable, even if it doesn't define any functions.
Now I try to build ipfs as an unprivileged user:
It should be possible to build without using cgo, but that takes much more memory, to the point that it runs out of memory and reboots, even after I've added and enabled a swap partition. (There seems to be a 2GB limit for swap, but with 512M memory I guess that's reasonable.)
BTW it would be nice to have ipfs packaged for OpenWRT. It seems a very good use for the GnuBee https://www.crowdsupply.com/gnubee/personal-cloud-2 if the memory is enough (I'm not sure if it is though - that's why I'm trying). It seems I will need to get set up to cross compile OpenWrt, to go any further with this experiment.
The text was updated successfully, but these errors were encountered: