Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mitmproxy won't build
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
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 112

PostPosted: Tue Jan 14, 2025 3:50 pm    Post subject: mitmproxy won't build Reply with quote

Been trying to emerge net-proxy/mitmproxy, but net-proxy/mitmproxy-rs always fails with the "ld: file format not recognized" error, see the log here. Anyone know how I can fix this? I have a bunch of other packages that fail with the same error, so maybe whatever solves this will solve those, too.

Last edited by leyvi on Tue Jan 14, 2025 4:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1394
Location: Richmond Hill, Canada

PostPosted: Tue Jan 14, 2025 4:11 pm    Post subject: Reply with quote

You post build.log is for net-proxy/mitmproxy-rs.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2087

PostPosted: Tue Jan 14, 2025 4:12 pm    Post subject: Reply with quote

You can't use Rust LTO unless you build with Clang.
Back to top
View user's profile Send private message
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 112

PostPosted: Tue Jan 14, 2025 4:26 pm    Post subject: Reply with quote

sam_, I'm not building it with LTO. pingtoo, yes, I'll correct that.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2087

PostPosted: Tue Jan 14, 2025 4:50 pm    Post subject: Reply with quote

The log has '-C linker-plugin-lto' (and later -C lto) but it might be being forced by the upstream project if you're not doing that.
Back to top
View user's profile Send private message
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 112

PostPosted: Tue Jan 14, 2025 5:24 pm    Post subject: Reply with quote

OK, so should I try forcing clang to be the C compiler, just for this build?
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2087

PostPosted: Tue Jan 14, 2025 5:25 pm    Post subject: Reply with quote

Yes, please give it a go. But please file a bug at bugs.gentoo.org with the build.log and emerge --info.
Back to top
View user's profile Send private message
leyvi
Tux's lil' helper
Tux's lil' helper


Joined: 08 Sep 2023
Posts: 112

PostPosted: Tue Jan 14, 2025 5:31 pm    Post subject: Reply with quote

I tried forcing clang, and there was a slightly different error message: "lto can only be run for executables, cdylibs and static library outputs". Pretty sure it's an upstream problem.
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