compiling issues

Asked by nzadLithium

i'm trying to install the latest bullet physics library as available from here: http://www.bulletphysics.com/Bullet/wordpress/

I un-tar.gz it then cd to it
./autogen.sh (no problems)
./configure (no problems)
make (here it fails)

I'm going to stick the make output at the bottom, but I want to say a few things first. First of all, build-essential is installed, and thus libc6-dev and linux-libc-dev are installed. I can find the missing headers in /usr/include/linux but the compiler cannot see them. I have tried copy and paste, and the missing headers thing goes away but error: ‘::ptrdiff_t’ has not been declared stays, and compiling can't proceed. I'm using ubuntu 8.10 64bit.

How do i get this to compile? This problem is affecting my vdrift build also, and my amsn build.

make all-recursive
make[1]: Entering directory `/home/cmaster/Desktop/bullet-2.73'
Making all in src
make[2]: Entering directory `/home/cmaster/Desktop/bullet-2.73/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DUSE_ADDR64 -g -O2 -DUSE_ADDR64 -g -O2 -MT btQuickprof.o -MD -MP -MF ".deps/btQuickprof.Tpo" -c -o btQuickprof.o `test -f 'LinearMath/btQuickprof.cpp' || echo './'`LinearMath/btQuickprof.cpp; \
 then mv -f ".deps/btQuickprof.Tpo" ".deps/btQuickprof.Po"; else rm -f ".deps/btQuickprof.Tpo"; exit 1; fi
In file included from /home/usr/bin/../lib/gcc/../../include/c++/4.3/cstdlib:49,
                 from ./LinearMath/btScalar.h:24,
                 from ./LinearMath/btQuickprof.h:22,
                 from LinearMath/btQuickprof.cpp:16:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
In file included from ./LinearMath/btScalar.h:25,
                 from ./LinearMath/btQuickprof.h:22,
                 from LinearMath/btQuickprof.cpp:16:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cfloat:47:24: error: float.h: No such file or directory
In file included from /home/usr/bin/../lib/gcc/../../include/c++/4.3/cstdlib:49,
                 from ./LinearMath/btScalar.h:24,
                 from ./LinearMath/btQuickprof.h:22,
                 from LinearMath/btQuickprof.cpp:16:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:55: error: ‘::ptrdiff_t’ has not been declared
make[2]: *** [btQuickprof.o] Error 1
make[2]: Leaving directory `/home/cmaster/Desktop/bullet-2.73/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/cmaster/Desktop/bullet-2.73'
make: *** [all] Error 2

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
nzadLithium
Solved:
Last query:
Last reply:
Revision history for this message
Arnaudus (a-lerouzic) said :
#1

Hi,

You should ask the question to the team that provide the software: in theory, if configure is OK, make should not crash.

One may note that the paths: /home/usr/bin/../lib/gcc/../../include/c++/4.3/ are *very* strange. Why is your compiler in your /home directory? The file hierarchy looks messy, and it is not surprising that gcc does not find some header files.

Revision history for this message
nzadLithium (cmaster2) said :
#2

my /usr directory is a symlink to /home/usr
Thats the only difference to my file hierarchy, to a default ubuntu install (other than packages i've installed).

Could you tell me what your paths are, and a command I can use to add your paths onto mine?

Revision history for this message
nzadLithium (cmaster2) said :
#3

My hard disks are setup with most of linux on my 10gb partition on my first disk. Then I moved my /home folder to my second disk, I realised that with 10gb my /usr directory would quickly fill up that disk (I play alot of games XD), so I moved it to the other disk, I couldn't make it the root of the drive, because /home needed to be, so I just it in the /home folder, then symlinked it. So then my entire second disk is mounted to /home, while /usr is symlinked to the usr folder on my /home disk. If you think its this thats causing the compiling problem, then can you think of a better way to set it up? I want /home and /usr to use the same space as each other (not have them on two seperate partitions) because I don't want the /usr partition to fill up when theres still room on the /home partition and vice versa :)

Revision history for this message
nzadLithium (cmaster2) said :
#4

I just tried compiling a few very basic umm 'programs'.
I had in it,
#include <stddef.h>
int main ()
{
}

that compiled flawlessly, I then added float.h as an included header, still compiled absolutely fine, found the headers no problem I then added cstddef as a header, and it gives me:
In file included from test.c:3:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory

I then removed stddef.h and float.h, and left only cstddef and it gives me:
In file included from test.c:1:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:48:25: error: stddef.h: No such file or directory
In file included from test.c:1:
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:55: error: ‘::ptrdiff_t’ has not been declared
/home/usr/bin/../lib/gcc/../../include/c++/4.3/cstddef:56: error: ‘::size_t’ has not been declared

so whatever problems are being caused, are being caused by cstddef choking on something :S

Revision history for this message
nzadLithium (cmaster2) said :
#5

ok found problem, not sure why its happening, but the compiler is choking on #include_next I replaced the lines that had that in it with #include in both cstddef and cfloat and these errors are gone :D

Revision history for this message
Cruncher (ubuntu-wkresse) said :
#6
Revision history for this message
lenvanthis (suejunghuh) said :
#7

Hi,

I think I have a similar problem with nzadLithium. I have the following error, and figured it could be a compiler bug from Cruncher's web site link. So I downloaded up-to-date gcc but failed to install it. Is there anyone having any idea how I can proceed? I am in impasse. Thanks in advance,

-L

g++ -O3 -I/usr/include/linux -I/usr/include/ Loop.c++
In file included from /usr/include/c++/4.3/ext/hash_map:64,
                 from defs.h:6,
                 from Loop.c++:1:
/usr/include/c++/4.3/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated.
In file included from /usr/include/c++/4.3/bits/stl_algobase.h:66,
                 from /usr/include/c++/4.3/list:66,
                 from defs.h:2,
                 from Loop.c++:1:
/usr/include/c++/4.3/cstddef:56: error: ‘::ptrdiff_t’ has not been declared
/usr/include/c++/4.3/cstddef:57: error: ‘::size_t’ has not been declared