Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Binhost for same arch different CPUs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 117

PostPosted: Wed Jul 24, 2024 2:02 pm    Post subject: Binhost for same arch different CPUs Reply with quote

Hi all!

I noticed and tested, actually with binhost, we can't build a binhost on the same arch for different CPU, we need to use the common set of instructions of the host and the clients.

So here the question, how can we create a binhost for a client where both has the same arch, but different cpus, and fully optimize for the client, so use that set of instructions.march and mtune to the client!

Which options are there to do this? I think this part is very important, and a key feature for a binhost.

Note: Crossdev only works for a different arch.
Note2: If we do march and mtune to the client in a chroot, compiles will fails with errors like: https://forums.gentoo.org/viewtopic-t-1116822-start-0.html

Thx!
Back to top
View user's profile Send private message
eschwartz
Developer
Developer


Joined: 29 Oct 2023
Posts: 214

PostPosted: Wed Jul 24, 2024 3:46 pm    Post subject: Reply with quote

There are actually two issues:


  • you need to run two different binhosts, so that you can provide binpackages under one url for the more powerful client that the less powerful client doesn't see.
  • The system running the compiles either has to understand the instructions produced by the compiled binaries, or handle everything as a cross compile, because it needs to be able to install and run some version of the packages suitable for handling tasks such as code generators, BDEPEND packages that implement the build system, etc



In the linked topic, the build of net-libs/accounts-qml attempted to run /usr/lib64/qt5/bin/qmlplugindump, which is a program not part of accounts-qml -- it is a program that is part of dev-qt/qtdeclarative. So you see, that the server running the compiles had installed a package that it could not run -- a package only intended for a more powerful client.

This is why cross compilation has the separate notion of DEPEND, which is cross-compiled library dependencies, and BDEPEND, which is software installed on the build server that has to actually run at build time. You would want BDEPEND to be compatible with your (weaker) build server, and DEPEND to be binhost packages for the powerful client.
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 117

PostPosted: Wed Jul 24, 2024 3:54 pm    Post subject: Reply with quote

mm, I got a similar error trying to compile qtbase, requested vaes to be supported to compile.

This issues has been addresed in cross-compile, but, crossdev does not support the same arch of the host, says we can only use chroot for that.

How would be the configuration with two binhost to achive this?
Back to top
View user's profile Send private message
mega_flow
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jun 2016
Posts: 94
Location: Belgium

PostPosted: Thu Jul 25, 2024 6:18 am    Post subject: Reply with quote

U need a cpu the can build and use the this optimization. example the sha cpu flag will not work to my intel system but wok on the amd cpu
but my build system is a intel cpu . when I enable this optimization. I just get errors on the build system.
if u need better optimization use -march=x86-64-v(1,2,3,4,5)
use /usr/lib64/ld-linux-x86-64.so.2 --help so see what highest optimization u can use on your lowest powerfull hardware
_________________
default/linux/amd64/23.0/no-multilib/gnome/systemd gnome:46
Back to top
View user's profile Send private message
Pipeng
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jul 2013
Posts: 117

PostPosted: Thu Jul 25, 2024 3:57 pm    Post subject: Reply with quote

Rn Is what I'm doing, abusing a little, march=native mtune=znver3, then gcc will do all the other things.

What I'm looking, is be able to compile for a specific CPU, the actual methods will reduce the number of instructions we can use to generate the libs and bins. One point of gentoo is be able to fully optimize for a specific hardware, I want still to have that with binhost.

Still is weird/funny we can do that for other archs, but not for the same one xD
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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