You are not logged in.
Pages: 1
I'm trying to use sparse on a x86_64 machine and I always get the following error message:
% sparse test.c
/usr/include/gnu/stubs.h:7:12: error: unable to open 'gnu/stubs-32.h'
where test.c is quite simple:
% cat test.c
#include <stdio.h>
int main(int argc, char* argv[]){
printf("hello world");
return 0;
}
so I've tracked why stubs-32.h was being used and the reason is that in the file /usr/include/bits/wordsize.h __WORDSIZE depends on __x86_64__ to be 64, because __x86_64__ is defined nowhere __WORDSIZE turns out to be 32 and stubs-32.h is used instead of stubs-64.h, any fix for that?
here is the exact same problem: https://bugs.launchpad.net/ubuntu/+sour … bug/374927
Offline
Arch Linux's x86_64 gcc doesn't have multilib support. So sparse can't be built on x86_64. You could try building and using it in a 32 bit chroot.
Offline
Forgive the potentially dumb question, but -- does gcc have to support multilib for __x86_64__ to be defined?
I would've thought that, independent of whether gcc has multilib or not, it'd be appropriate to include the #define that dictates that builds should be for the x86_64 arch...
Then again, I'm not very confident of that. Sorry if it's not a very clever question. Would appreciate any explanations.
Offline
Forgive the potentially dumb question, but -- does gcc have to support multilib for __x86_64__ to be defined?
I would've thought that, independent of whether gcc has multilib or not, it'd be appropriate to include the #define that dictates that builds should be for the x86_64 arch...
Then again, I'm not very confident of that. Sorry if it's not a very clever question. Would appreciate any explanations.
No, GCC has to have multilib enabled and Arch's doesn't. There's a GCC package in AUR that's multilib enabled, but you'll have to jump through a few hoops to get it working:
http://aur.archlinux.org/packages.php?ID=28545
**EDIT***
Crap. I misread your question. I don't actually know the answer. Sorry.
Offline
Pages: 1