PDA

View Full Version : A small problem regarding compiling sources



rks_i1_13
April 22nd, 2007, 10:04 AM
I have posted this problem in 64-bit user section, but a reply told me to post it here (sorry for repeated post :oops: ).


I have Pentium Core 2 Duo processor running Ubuntu-7.04 (Fiesty) along with win32(XP). When I compile certain sources, make complains that a file included :-<gnu/stubs-32.h> doesn't exist. Indeed it does not exist, actually it is <gnu/stubs-64.h> that actually exists in /usr/include/gnu.

On checking the actual source of error i found the following in stubs.h :-
Code:



#include <bits/wordsize.h>

#if __WORDSIZE == 32
# include <gnu/stubs-32.h>
#elif __WORDSIZE == 64
# include <gnu/stubs-64.h>
#else
# error "unexpected value for __WORDSIZE macro"
#endif



On checking <bits/wordsize.h>, I found the following :-
Code:



#if defined __x86_64__
# define __WORDSIZE 64
# define __WORDSIZE_COMPAT32 1
#else
# define __WORDSIZE 32
#endif


My problem is:- should I manually define __x86_64__, or do anything else ?

Thanks in advance. :)

rks_i1_13
April 22nd, 2007, 11:42 AM
Also, i would like to ask that when i use MSYS or Cygwin on Win32, they define environment variables like PROCESSOR="x86 ...", but i don't find such variables in Ubuntu. Is it some kind of critical situation ? :-k

rjack
April 22nd, 2007, 11:45 AM
My problem is:- should I manually define __x86_64__, or do anything else ?

Just a guess: have you run ./configure before running make?

Compyx
April 22nd, 2007, 11:50 AM
According to this thread: http://ubuntuforums.org/showthread.php?p=2436120, setting CFLAGS="-m64" might solve your problem.

So try doing:

CFLAGS="-m64" ./configure
or whatever the command is to compile the source.

I can't test this, as I don't have a 64-bit system yet :(

rks_i1_13
April 22nd, 2007, 11:52 AM
Just a guess: have you run ./configure before running make?

Yes, make has read the Makefile that was generated by ./configure. I don't think the ./configure has made any mistakes. It just tried to read one of the include files that comes with build-essential_11.1_amd64.deb, which lies in /usr/include.

edschofield
May 1st, 2007, 11:09 PM
Try installing the package libc6-dev-i386:


Description: GNU C Library: 32bit development libraries for AMD64
Contains the symlinks and object files needed to compile and link programs
which use the standard C library. This is the 32bit version of the
library, meant for AMD64 systems.