Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] dev-util/maturin Build Fail Due to Undefined Ref...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
atchim
n00b
n00b


Joined: 24 Oct 2021
Posts: 9

PostPosted: Sun Oct 24, 2021 1:20 pm    Post subject: [SOLVED] dev-util/maturin Build Fail Due to Undefined Ref... Reply with quote

There are several months since I've been trying to update www-client/qutebrowser, but the ebuild just drops off due to dev-util/maturin, wihch always fails to build due to undefined references. It's important to say that use a lot of optimization flags from GentooLTO.

The output of `emerge --info '=dev-util/maturin-0.11.5::gentoo'` can be found here.
The output of `emerge -pqv '=dev-util/maturin-0.11.5::gentoo'` can be found here.
The content of `/var/tmp/portage/dev-util/maturin-0.11.5/temp/build.log` can be found here.

There are other packages that is failing to build. I'll post new topics for them soon.


Last edited by atchim on Sat Dec 23, 2023 4:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Sun Oct 24, 2021 2:29 pm    Post subject: Reply with quote

Hi atchim,

welcome to the Gentoo forums!

Quote:
There are other packages that is failing to build. I'll post new topics for them soon.

Wait... Your configuration deviates from the recommended settings. It's no surprise that you run into problems...
Code:
ACCEPT_KEYWORDS="amd64 ~amd64"

Code:
CFLAGS="-O3 -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -flto=auto -fuse-linker-plugin -falign-functions=32 -march=native -pipe"

The Gentoo handbook recommends to stay on stable (link) and to use "CFLAGS="-O2 -march=native -pipe". -O3 is known to break several packages and may make your system slower (link, link).

Why don't you go back to the default settings? You could pick a few packages you really care about - and compile those with -O3, LTO or use the unstable/testing versions. In order to do that, we have /etc/portage/package.accept_keywords and /etc/portage/package.env. But most tools like bash, grep, sed surely won't get any better if you compile them with -O3 and without extensive testing and source code optimization. It just doesn't make sense to compile source code you haven't written and tested yourself with the CFLAGS you use. It's like driving a car with blindfolded eyes.

Mike
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2718

PostPosted: Sun Oct 24, 2021 9:06 pm    Post subject: Reply with quote

I can reproduce if I use -flto, so yeah, your CFLAGS are causing the issue.

Guess I could have the ebuild force disable lto for what it's worth, but if you're going to use these flags I'd suggest that turning these off is the first thing you try when running into problems.

Edit: done in this commit, if emerge --sync it should work now. Hoped for fix rather than a workaround (e.g. have -sys crates use system libs) but can't for ring crate.
Back to top
View user's profile Send private message
atchim
n00b
n00b


Joined: 24 Oct 2021
Posts: 9

PostPosted: Mon Oct 25, 2021 3:45 pm    Post subject: Reply with quote

Hi Mike! My system has almost 1000 packages, but just about 5 packages are breaking currently. I think it worths to "live in the bleeding edge" since I've learnt a lot about Gentoo, ebuild, C, Rust, etc. However, thanks for the advice! I really appreciate that!
Back to top
View user's profile Send private message
atchim
n00b
n00b


Joined: 24 Oct 2021
Posts: 9

PostPosted: Mon Oct 25, 2021 3:50 pm    Post subject: Reply with quote

Ionen wrote:
Edit: done in this commit, if emerge --sync it should work now. Hoped for fix rather than a workaround (e.g. have -sys crates use system libs) but can't for ring crate.


Successfully emerged dev-util/maturin and so www-client/qutebrowser! Really thanks, Ionen!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum