Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Debugging 32bit problems on multilib systems near impossible
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
nanonyme
n00b
n00b


Joined: 20 Dec 2008
Posts: 5

PostPosted: Sat Dec 20, 2008 7:42 pm    Post subject: Debugging 32bit problems on multilib systems near impossible Reply with quote

I just noticed that Gentoo nowadays (2008 profiles) seems to have prebuilt library packages (emul-linux-x86) instead of having the user compile the libraries themselves. This has had several effects. Firstly all libraries are stripped and debug files aren't served as additional packages. Thus using gdb with programs that use emul-linux-x86 packages is impossible. Also the binaries are i386 so you won't get to use your own CPU's instruction sets. I would suspect this would have a performance effect in at least high-intensive programs like games run through Wine. Is there really any good side about this current multilib system?
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2998
Location: Bay Area, CA

PostPosted: Sun Dec 21, 2008 7:22 am    Post subject: Re: Debugging 32bit problems on multilib systems near imposs Reply with quote

nanonyme wrote:
I just noticed that Gentoo nowadays (2008 profiles) seems to have prebuilt library packages (emul-linux-x86) instead of having the user compile the libraries themselves. This has had several effects. Firstly all libraries are stripped and debug files aren't served as additional packages. Thus using gdb with programs that use emul-linux-x86 packages is impossible. Also the binaries are i386 so you won't get to use your own CPU's instruction sets. I would suspect this would have a performance effect in at least high-intensive programs like games run through Wine. Is there really any good side about this current multilib system?
only if you need to run 32-bit programs, you need that stuff. If you are not running any 32-bit prebuild programs (like skype), you can just get rid of all that emul stuff.
Back to top
View user's profile Send private message
nanonyme
n00b
n00b


Joined: 20 Dec 2008
Posts: 5

PostPosted: Sun Dec 21, 2008 11:50 am    Post subject: Reply with quote

Actually that's not exactly true. Wine is compiled as 32bit, it's not pre-compiled, and it also pulls in the emul stuff. Nowadays compiled programs use emul stuff too on multilib systems.
Quote:
amd64? (
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1
)
>=sys-kernel/linux-headers-2.6
)"

Does it make any sense to you that you're forced to use a binary blob for all X.org libs nowadays if you want to compile a 32bit? Not only is the stability questionable but you might also be using a different versiong of X.org libraries (and Mesa) for linking Wine and for your actual xorg server. I'm frankly surprised if that doesn't cause issues to anyone.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2998
Location: Bay Area, CA

PostPosted: Sun Dec 21, 2008 5:15 pm    Post subject: Reply with quote

nanonyme wrote:
Actually that's not exactly true. Wine is compiled as 32bit, it's not pre-compiled, and it also pulls in the emul stuff. Nowadays compiled programs use emul stuff too on multilib systems.
Quote:
amd64? (
X? (
>=app-emulation/emul-linux-x86-xlibs-2.1
>=app-emulation/emul-linux-x86-soundlibs-2.1
)
>=sys-kernel/linux-headers-2.6
)"

Does it make any sense to you that you're forced to use a binary blob for all X.org libs nowadays if you want to compile a 32bit? Not only is the stability questionable but you might also be using a different versiong of X.org libraries (and Mesa) for linking Wine and for your actual xorg server. I'm frankly surprised if that doesn't cause issues to anyone.
a lot of stuff in wine is 32-bit precompiled dll's. They won't work. So, yeah. wine falls in the same category as a precompiled skype.

As for X libraries, if the ABI is correct, things should work. ABI changes is what those deps should be changed for. Morever, I think those emul packages as well as the packages that use them, are tested by testers, bugs filed against them and fixed. So, its not random. Yeah, you miss some custom optimizations but there is no easy solution.
Back to top
View user's profile Send private message
nanonyme
n00b
n00b


Joined: 20 Dec 2008
Posts: 5

PostPosted: Mon Dec 22, 2008 7:18 pm    Post subject: Reply with quote

Actually there used to be. Multilib used to mean that you would compile both 32bit and 64bit system libraries back when I used an AMD64 system long ago. Why has this changed? Don't give me that "there's no easy solution crap", it was done otherwise before and it was Better (tm) then. It used to be so that you couldn't get conflicting library versions on your system because installing eg Mesa with USE=multilib compiled both 32bit and 64bit libraries. This precompiled binary strategy sounds to me like turning multilib systems into some kind of unholy half-breed between a release-based binary distro and a rolling release source based distro. And no, stuff in Wine aren't precompiled dll's. It's Gentoo that's prebuilt here, not Wine.
Back to top
View user's profile Send private message
nanonyme
n00b
n00b


Joined: 20 Dec 2008
Posts: 5

PostPosted: Mon Dec 22, 2008 7:29 pm    Post subject: Reply with quote

Also to clarify the situation a bit:
Wine doesn't use precompiled dll's. Wine uses source code that is purposefully compiled as 32bit native Linux libraries so Wine could run 32bit Windows code. Get your facts straight.
Back to top
View user's profile Send private message
loftwyr
l33t
l33t


Joined: 29 Dec 2004
Posts: 970
Location: 43°38'23.62"N 79°27'8.60"W

PostPosted: Mon Dec 22, 2008 7:36 pm    Post subject: Reply with quote

Gentoo has had precompiled emul libs since I started using the 2004.3 64bit version. It isn't lazyness, it's the fact that there isn't a way within the portage structure to manage two simultaneous profiles.

The emul base was the best that can be done until a way to manage the issues can be done itself.

If you'd like, you can create your own libs using a 32bit chroot and have the debug libraries attached. Most of us aren't developers so we don't need the debug aspect for the few 32bit programs we use (personally, I only have skype left).
_________________
My emerge --info
Have you run revdep-rebuild lately? It's in gentoolkit and it's worth a shot if things don't work well.
Celebrating 5 years of Gentoo-ing.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2998
Location: Bay Area, CA

PostPosted: Mon Dec 22, 2008 9:15 pm    Post subject: Reply with quote

nanonyme wrote:
Actually there used to be. Multilib used to mean that you would compile both 32bit and 64bit system libraries back when I used an AMD64 system long ago. Why has this changed? Don't give me that "there's no easy solution crap", it was done otherwise before and it was Better (tm) then. It used to be so that you couldn't get conflicting library versions on your system because installing eg Mesa with USE=multilib compiled both 32bit and 64bit libraries. This precompiled binary strategy sounds to me like turning multilib systems into some kind of unholy half-breed between a release-based binary distro and a rolling release source based distro. And no, stuff in Wine aren't precompiled dll's. It's Gentoo that's prebuilt here, not Wine.
I don't know when that was. But it was certainly before I started using Gentoo or came on these forums.

Not many packages I know of compiled both 32 and 64 bit binaries if multilib was defined. glibc, mplayerplug-in....and I can't recall many.

emul packages exist because "there is no easy solution" to this problem. You literally have to maintain two sets of packages (which means both libraries, headers and config data) on the system for it to work correctly. You might as well have a 32-bit chroot. The team who releases these emul have actually done a very good job of maintaining a stable working system despite all of the issues that can arise because of different ABIs. Kudos to them!
Back to top
View user's profile Send private message
nanonyme
n00b
n00b


Joined: 20 Dec 2008
Posts: 5

PostPosted: Tue Dec 23, 2008 5:13 pm    Post subject: Reply with quote

Yeah, actually I *did* end up making a 32bit chroot before starting this conversation. I think that's even more of a hack (yeah, an associate of mine said he was told emul libs are a hack when he filed a bug related to a program using them) than the emul-linux-x86. One solution for the problem I mentioned in the title would be to create emul-linux-x86-foo-dbg for every single emul-linux-x86-foo package that would give the required information. Do you actually think they've done good work when they didn't realize that that's a good idea even when every other binary distro does that since it's essential for debugging stripped binaries?
Afaik you don't have to maintain headers generally and config files though in a different fashion for the two architectures. Haven't yet come across a utility that required different config files and I was under the impression that the headers are identical and just do ifdef macros to find out whether the system is 32bit or 64bit. The fact that you have to maintain two sets of libraries, on the other paw, is pretty obvious. Don't you have to do it now? Actually the current setup might get *interesting* to say at least when you get headers in your /usr/include that conflict with the libraries used for linking in /usr/lib32. I would expect that to lead into build failures at least in some cases.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 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