Can't compile on 10.7.2

45 views
Skip to first unread message

Alberto Antonini

unread,
Jan 22, 2012, 5:59:07 AM1/22/12
to G3D Users
I can't compile last version of G3D on 10.7.2
I used this command:
sudo ./buildg3d --install /usr/local update

It get stuck at:
source/TriTree.cpp
../G3D.lib/include/G3D/Array.h: In member function ‘const T&
G3D::Array<T, MIN_ELEMENTS, MIN_BYTES>::operator[](int) const [with T
= G3D::ReferenceCountedPointer<G3D::Surface>, long unsigned int
MIN_ELEMENTS = 10ul, long unsigned int MIN_BYTES = 32ul]’:
../G3D.lib/include/G3D/Array.h:838: internal compiler error:
Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.

352s

Morgan McGuire

unread,
Feb 1, 2012, 10:18:49 AM2/1/12
to g3d-...@googlegroups.com
That is gcc crashing, not G3D...so the actual problem it is somewhat out of my hands.  It compiles for me from SVN on 10.7.2 as of this morning.  Maybe you have an out of date version of gcc.

A the command line, try "gcc --version".  I see:

(OS X):~ -> gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


-m

Prof. Morgan McGuire
Computer Science Department
Williams College
http://cs.williams.edu/~morgan

Corey Taylor

unread,
Feb 3, 2012, 1:47:07 AM2/3/12
to g3d-...@googlegroups.com
Alberto,
 
I'm interested to find out exactly what gcc version you were building with.
 
corey

Alberto Antonini

unread,
Feb 3, 2012, 7:26:21 AM2/3/12
to G3D Users
The output of the gcc -version command is the same as yours

euler

unread,
Feb 24, 2012, 10:04:21 AM2/24/12
to g3d-...@googlegroups.com
I am getting the same error message as the original poster, on OS 1.7.2 and now on 1.7.3 when compiling G3D.  I do appreciate that this is a problem with gcc rather than G3D, but it is driving me mental and any help would be great. My machine is a recent, clean install of OS 1.7, with XCode installed, and the gcc version is

i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

Kieran

Corey Taylor

unread,
Feb 24, 2012, 12:29:51 PM2/24/12
to g3d-...@googlegroups.com

If we can find out what is triggering that internal error, we might be able to adjust the code to get around it.  Unless I can reproduce, all I cn do is search.

corey

euler

unread,
Mar 7, 2012, 7:05:13 AM3/7/12
to g3d-...@googlegroups.com
Thanks Corey, if there is some additional detail that I can give to help identifying the source of the error then please ask.

A similar compiler issue appears to occur in a number of other projects (e.g. igraph) when using the LLVM based compiler.  I am curious to know if my issues are a result of me performing a clean install of OS Lion rather than an upgrade from 10.6.  If anyone else has managed to get G3D working on a clean install of 10.7 I would appriciate any contact.

One of my least unsuccessful attempts to get G3D working was to install the MACPORT apple-gcc42 and then change the defaultcompiler to g++-apple-4.2 in the .icompile file.  With this the  library now compiles but all sample applications (except computeDiscovery, tinyGlut*, and rawOpenGL) crash on execution with "terminate called throwing an exception"

Running  ./buildg3d test results in 

Tests:

Matrix passed
G3D::Any passed
Bit Serialization
BinaryInput & BinaryOutput
SpeedLoad...Passed
ReliableConduit passed
FileSystem...passed
CollisionDetection passed
TextInput
  passed
Sphere...passed
G3D::ImageFormat  passed
KDTree  (load model, terminate called throwing an exception

Kieran

Corey Taylor

unread,
Mar 7, 2012, 1:30:02 PM3/7/12
to g3d-...@googlegroups.com
Can you run the test in GDB and find out what is crashing?
 
The details we would need are what's unique about the code it is crashing on.  I believe you said it was on an Array declaration which might mean the template code is causing it.  I know we use constants for Array sizes in templates which might somehow be an issue.
 
Internal compiler errors are always difficult to debug without the helper of the compiler support team.  Posting that issue to them is the best starting place.
 
corey

Reply all
Reply to author
Forward
0 new messages