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

librsvg: update to 2.44.7. (and rust fixes for armv7) #3558

Merged
merged 3 commits into from
Oct 15, 2018

Conversation

Cogitri
Copy link
Contributor

@Cogitri Cogitri commented Oct 8, 2018

also cross builds now that rust cross build is a thingx

@Gottox
Copy link
Member

Gottox commented Oct 9, 2018

There are a few errors during cross build:

Looks like missing RUSTFLAGS. I'd like to set them globally like we set our CFLAGS as I expect that rust will sneak into many projects without being a cargo build-style.

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 9, 2018

I'd like to set them globally like we set our CFLAGS as I expect that rust will sneak into many projects without being a cargo build-style.

Sounds good, yes.

Looks like missing RUSTFLAGS.

No, that's actually due to rust using not suffixing armv7l with a l. I guess we will have to patch this into rust...

@Cogitri Cogitri changed the title librsvg: update to 2.44.6. [WIP] librsvg: update to 2.44.6. Oct 9, 2018
@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 9, 2018

Currently testing this. librsvg already cross builds for everything but armv7l though.

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 9, 2018

Ack, had a power outage, currently rebuilding rust for x86_64 - armv7l already built. Will test librsvg afterwards.

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 9, 2018

Creating librsvg-2.44.6_1.armv7l.xbps for repository /host/binpkgs/rust-cross ...

cross compiling librsvg on armv7l works now.

@Gottox
Copy link
Member

Gottox commented Oct 9, 2018

We still need to fix rust on arm*-musl.

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 9, 2018

Alright, I'll leave that to you :)

@Cogitri Cogitri mentioned this pull request Oct 11, 2018
@Cogitri Cogitri changed the title [WIP] librsvg: update to 2.44.6. librsvg: update to 2.44.7. (and rust fixes for armv7) Oct 11, 2018
@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 11, 2018

So, what is left to do here?

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 11, 2018

Maybe you could compile this on arm*musleabihf @jnbr, you already have the rust binpkgs :)

@jnbr
Copy link
Contributor

jnbr commented Oct 11, 2018

Do we really need the armv7l targets?

@Cogitri Cogitri force-pushed the librsvg branch 3 times, most recently from 85c6a1c to 66c9178 Compare October 11, 2018 19:17
srcpkgs/librsvg/template Outdated Show resolved Hide resolved
@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 11, 2018

Alright, I've reworked it, please take a 2nd look.

srcpkgs/librsvg/template Outdated Show resolved Hide resolved
@Cogitri Cogitri force-pushed the librsvg branch 3 times, most recently from 6e1fc63 to f08e831 Compare October 11, 2018 23:28
@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 12, 2018

Alright, this works on aarch64 now - but librsvg fails to link on some other platforms. Will look into this tomorrow

@Gottox
Copy link
Member

Gottox commented Oct 12, 2018

Can you post logs?

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 12, 2018

They all fail with something along the lines of https://gist.github.com/e63b8db8c3d9c51366fb2aa1224dc469

aarch64 works for some reason though

@Gottox
Copy link
Member

Gottox commented Oct 12, 2018

$ ar x /builddir/librsvg-2.44.7/target/aarch64-unknown-linux-musl/release/librsvg_internals.a
$ file sysconf.lo                                                                            
sysconf.lo: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped

It uses host libraries.

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 12, 2018

Here's a verbose log: https://paste.pound-python.org/show/qu2G4p9e72x2f5zI20Vb/

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 14, 2018

Alright, all arches other than aarch64-musl work from x86_64, but not from x86_64-musl, opened an issue about it upstream: https://gitlab.gnome.org/GNOME/librsvg/issues/360

@jnbr
Copy link
Contributor

jnbr commented Oct 14, 2018

Seems to be just another case of rust treating musl as something special.
Re-applying this patch to rustc makes it work on armv7l-musl (others currently building).

--- rustc-1.28.0-src/src/liblibc/src/unix/mod.rs.orig   2018-10-14 16:54:15.555482375 +0200
+++ rustc-1.28.0-src/src/liblibc/src/unix/mod.rs        2018-10-14 16:54:47.153240177 +0200
@@ -276,13 +276,6 @@
     } else if #[cfg(feature = "use_std")] {
         // cargo build, don't pull in anything extra as the libstd dep
         // already pulls in all libs.
-    } else if #[cfg(target_env = "musl")] {
-        #[cfg_attr(feature = "stdbuild",
-                   link(name = "c", kind = "static",
-                        cfg(target_feature = "crt-static")))]
-        #[cfg_attr(feature = "stdbuild",
-                   link(name = "c", cfg(not(target_feature = "crt-static"))))]
-        extern {}
     } else if #[cfg(target_os = "emscripten")] {
         #[link(name = "c")]
         extern {}

@jnbr
Copy link
Contributor

jnbr commented Oct 14, 2018

I opened #3778 which fixes this. Tested on x86_64-musl and armv7[-musl].

@Gottox
Copy link
Member

Gottox commented Oct 14, 2018

#3778 is merged

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 14, 2018

Alright, does this need further testing or are you doing that already @Gottox?

@Gottox
Copy link
Member

Gottox commented Oct 15, 2018

lgtm 👍

@Gottox Gottox merged commit 45030a9 into void-linux:master Oct 15, 2018
@Gottox
Copy link
Member

Gottox commented Oct 15, 2018

gnome-shell on x86_64 is broken in a different way than before this update. 😄

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 15, 2018

Eh? On x86_64?

@Gottox
Copy link
Member

Gottox commented Oct 15, 2018

Yep, but already got a fix :)

@Gottox
Copy link
Member

Gottox commented Oct 15, 2018

fixed by f532213

@Gottox
Copy link
Member

Gottox commented Oct 15, 2018

x86_64-musl, sry

@Cogitri
Copy link
Contributor Author

Cogitri commented Oct 15, 2018

Ah, that's why I was so confused :)

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