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

Cannot cross-compile libevent for armv5tel-musl #28103

Closed
lfdebrux opened this issue Jan 22, 2021 · 10 comments
Closed

Cannot cross-compile libevent for armv5tel-musl #28103

lfdebrux opened this issue Jan 22, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@lfdebrux
Copy link
Contributor

System

  • xuname: Void 5.10.8_1 x86_64-musl GenuineIntel/VM notuptodate rF
  • package: libressl-devel, libevent, nghttp2, curl, elfutils, binutils, gcc

Expected behavior

Running ./xbps-src -a armv5tel-musl libevent builds and installs libevent

Actual behavior

Build does not start due to issue installing libressl-devel as libssp is missing:

=> xbps-src: cleaning up / masterdir...
=> libevent-2.1.12_1: removing autodeps, please wait...
=> libevent-2.1.12_1: removing autocrossdeps, please wait...
=> libevent-2.1.12_1: building [gnu-configure] for armv5tel-musl...
   [target] libressl-devel-3.1.5_2: found (/host/binpkgs)
   [runtime] libressl-devel-3.1.5_2: found (/host/binpkgs)
   [runtime] libevent-2.1.12_1: not found (self, ignored)
=> libevent-2.1.12_1: installing target dependencies: libressl-devel-3.1.5_2 ...
=> libevent-2.1.12_1: removing autodeps, please wait...
=> libevent-2.1.12_1: removing autocrossdeps, please wait...
=> ERROR: libevent-2.1.12_1: failed to install 'libressl-devel-3.1.5_2' dependency! (error 19)
MISSING: libssp>=4.4.0_1
MISSING: libssp>=4.4.0_1
MISSING: libssp>=4.4.0_1
MISSING: libssp>=4.4.0_1
Transaction aborted due to unresolved dependencies.
=> ERROR: Please see above for the real error, exiting...

This is particularly annoying because libssp is part of the gcc package, which depends on libevent transitively, so there is a circular dependency. I end up with the same issue trying to build any package in the dependency chain from gcc to libevent.

Strangely however I can build libressl-devel without issues using ./xbs-src -a armv5tel-musl pkg libressl.

Steps to reproduce the behavior

On Void Linux x86_64-musl, clone void-packages, install bootstrap and try to build libevent targeting armv5tel-musl.

@pullmoll
Copy link
Member

pullmoll commented Jan 22, 2021

This type of issue has bitten me not too long ago as well. The (error 19) is the only indication that there is indeed a cyclic dependency and we need to identify and eliminate it.

Edit: I'm confused: just tried with my locally built repository and there I can build libevent w/o error.
Edit2: The first thing I did to get armv5tel-musl built is to cross build the base-chroot package. Perhaps you can try that and then build with -N option to use your local repository's arm5tel-musl packages.

@Johnnynator
Copy link
Member

Shouldn't libssp be listed in cross-vpkg-dummy since it is provided by the cross toolchain? This is also the reason why libressl compiles but xbps refues to install it.

@pullmoll
Copy link
Member

pullmoll commented Jan 22, 2021

I think you are right @Johnnynator . And cross-vpkg-dummy needs an update for gcc10 anyway as it lists the gcc9 ada libraries.

@pullmoll pullmoll added the bug Something isn't working label Jan 22, 2021
@q66
Copy link
Contributor

q66 commented Jan 22, 2021

only on musl, there is no libssp in glibc crosstoolchains

@q66
Copy link
Contributor

q66 commented Jan 22, 2021

anyway, i will fix this along with other things

@q66
Copy link
Contributor

q66 commented Jan 22, 2021

okay, that should be updated now (will take a while to propagate since builders are still busy)

maybe we should just build libssp in all crosstoolchains, it'd make more sense perhaps... i mean you can just have libssp be installed through a makedepend, but considering it's a hard dependency of gcc package itself (and therefore always present in masterdir), it doesn't make much sense not to provide it through the crosstoolchain (things will generally not makedepend on libssp, though in practice nothing should really run into it, since glibc provides it builtin - on musl it's needed because we internally link to libssp_nonshared)

it's something to think about for next gcc update, right now it's not pressing at all, since it will practically never be a problem

@lfdebrux
Copy link
Contributor Author

Thank you for looking into this!

I am getting the same error even after checking out the latest version, do I have to wait for @q66 's changes to propagate?

@pullmoll that's strange, if I try to cross compile base-chroot I get the same error, as libevent gets pulled in.

@lfdebrux
Copy link
Contributor Author

lfdebrux commented Jan 23, 2021

Update: after rebuilding cross-vpkg-dummy I can build libevent

@q66 q66 closed this as completed Jan 24, 2021
@RossComputerGuy
Copy link
Contributor

Huh, I get this same error with unbound when I try compiling for aarch64.

@Xlaits
Copy link

Xlaits commented Mar 25, 2022

I am also having this issue with unbound, but building for armv5tel and not the musl version. It hangs at libssp and complains about not being able to resolve that dependancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants