G3D-8.00-b02-src.zip compile error

12 views
Skip to first unread message

Chris

unread,
Nov 24, 2009, 8:11:25 PM11/24/09
to G3D Users
Hi There,

Early days here, i'm new to G3D, and just trying it before deciding on
making an indie project with my low poly-gon artist friend, we already
have a fairly polished & rigged content pack :)
Anyway, I tried to compile G3D-8.00-b02-src.zip on Ubuntu following
the Linux instructions in the documentation and got this error:

In file included from include/G3D/Color3.h:22,
from include/G3D/Color4.h:22,
from include/G3D/BinaryInput.h:30,
from /home/chris/Desktop/G3D/G3D.lib/source/
GImage_tga.cpp:9:
include/G3D/HashTrait.h:41: error: redefinition of ‘struct
HashTrait<long unsigned int>’
include/G3D/HashTrait.h:37: error: previous definition of ‘struct
HashTrait<long unsigned int>’

Please could you assist?

- Also does this project have an IRC channel?
- Looks great, hope it's lightweight.

Sincerely,
Chris Willcocks
www.cwkx.com

Morgan McGuire

unread,
Nov 25, 2009, 12:52:15 AM11/25/09
to g3d-...@googlegroups.com
>
> In file included from include/G3D/Color3.h:22,
>                 from include/G3D/Color4.h:22,
>                 from include/G3D/BinaryInput.h:30,
>                 from /home/chris/Desktop/G3D/G3D.lib/source/
> GImage_tga.cpp:9:
> include/G3D/HashTrait.h:41: error: redefinition of ‘struct
> HashTrait<long unsigned int>’
> include/G3D/HashTrait.h:37: error: previous definition of ‘struct
> HashTrait<long unsigned int>’
>
> Please could you assist?

Please post the build command that executed beforehand, and the
version of gcc that is being used. I can't reproduce this on my own
Ubuntu install.

> - Also does this project have an IRC channel?

No, sorry. Our support is solely through this forum and the wiki.

-m

> - Looks great, hope it's lightweight.
>
> Sincerely,
> Chris Willcocks
> www.cwkx.com
>
> --
>
> You received this message because you are subscribed to the Google Groups "G3D Users" group.
> To post to this group, send email to g3d-...@googlegroups.com.
> To unsubscribe from this group, send email to g3d-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/g3d-users?hl=en.
>
>
>

corey taylor

unread,
Nov 25, 2009, 12:53:30 AM11/25/09
to g3d-...@googlegroups.com
Just remove the definition for now.  Morgan added that to fix an issue with size_t, but I think we should have just make the specialization for size_t.
 
corey

Chris

unread,
Nov 25, 2009, 3:27:43 AM11/25/09
to G3D Users
Hi There,

Using command: ./buildg3d --install /usr/local update

gcc Version 4:4.3.3-1ubuntu1
or just 4.3.3

Commented out lines:
22 from Color3.h

Then another error, then commented:
19 from Color1.h

Then several errors, have to head off to work now,
Will try a previous build later today,
Sincerely,
Chris Willcocks

Morgan McGuire

unread,
Nov 25, 2009, 11:35:49 AM11/25/09
to g3d-...@googlegroups.com
Hmm. You have a much newer gcc than me. I agree with Corey--I think
the issue is that size_t is defined different for each of us and that
commenting out the one definition will work.

-m

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

Chris

unread,
Nov 25, 2009, 6:35:43 PM11/25/09
to G3D Users
Hi,

I tried commenting out the definition and recompiling with ./buildg3d
--install /usr/local update
This lead to more errors in redefinitions, again removed definitions,
more errors, then repeat.. more errors, then template errors. I gave
up after about continually trying for some time.
I tried it in the office, the same errors are replicated on the linux
machine there (its a fresh install of ubuntu with nothing but the
latest version of Qt and Qt Creator installed), so I switched to
windows to try it. Windows worked okay, but I can't use windows.

Back in linux, I checked out the project from cvs and recompiled.
Exact same errors.

Is it possible to fix this in the cvs so that I can use it?
Sincerely,
Chris

PS, thanks for being responsive and active, its lovely to see devs
which care.



On Nov 25, 4:35 pm, Morgan McGuire <morga...@gmail.com> wrote:
> Hmm.  You have a much newer gcc than me.  I agree with Corey--I think
> the issue is that size_t is defined different for each of us and that
> commenting out the one definition will work.
>
> -m
>
> Prof. Morgan McGuire
> Computer Science Department
> Williams Collegehttp://cs.williams.edu/~morgan

corey taylor

unread,
Nov 25, 2009, 8:12:15 PM11/25/09
to g3d-...@googlegroups.com

That is very odd.  I can understand the long unsigned int issue but that's the only recent change.

Please post the output from gcc -v and some examples of other redefinition errors.

corey

On Nov 25, 2009 5:35 PM, "Chris" <c.g.wi...@durham.ac.uk> wrote:

Hi,

I tried commenting out the definition and recompiling with  ./buildg3d
--install /usr/local update
This lead to more errors in redefinitions, again removed definitions,
more errors, then repeat.. more errors, then template errors. I gave
up after about continually trying for some time.
I tried it in the office, the same errors are replicated on the linux
machine there (its a fresh install of ubuntu with nothing but the
latest version of Qt and Qt Creator installed), so I switched to
windows to try it. Windows worked okay, but I can't use windows.

Back in linux, I checked out the project from cvs and recompiled.
Exact same errors.

Is it possible to fix this in the cvs so that I can use it?
Sincerely,
Chris

PS, thanks for being responsive and active, its lovely to see devs
which care.

On Nov 25, 4:35 pm, Morgan McGuire <morga...@gmail.com> wrote: > Hmm.  You have a much newer gcc ...

> Williams Collegehttp://cs.williams.edu/~morgan

> > > > On Wed, Nov 25, 2009 at 3:27 AM, Chris <c.g.willco...@durham.ac.uk> wrote: > > Hi There, > >...

Morgan McGuire

unread,
Nov 25, 2009, 11:36:12 PM11/25/09
to g3d-...@googlegroups.com
Are you on a 64-bit OS, perhaps? We haven't been testing sufficiently
on 64-bit lately. Please do post the output Corey wants so we can
debug.

-m

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

Chris

unread,
Nov 26, 2009, 8:19:13 AM11/26/09
to G3D Users
Okay, both machines are on 64bit distros. Linux version 2.6.28-15-
generic (buildd@yellow) (Ubuntu 4.3.3-5ubuntu4). Also both machines
have an identical gcc -v, here:

chris@chris-desktop ~ $ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/
README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/
usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-
included-gettext --enable-threads=posix --enable-nls --with-gxx-
include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-
clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --
with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --
host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)

Both machines are giving slightly different problems from a fresh
checkout - the first one:

In file included from include/G3D/Color3.h:22,
from include/G3D/Color4.h:22,
from /home/chris/Desktop/G3D/G3D.lib/source/
Color4.cpp:16:
include/G3D/HashTrait.h:41: error: redefinition of ‘struct
HashTrait<long unsigned int>’
include/G3D/HashTrait.h:37: error: previous definition of ‘struct
HashTrait<long unsigned int>’

845s (Atom CPU)

And the second machine:

In file included from include/G3D/Vector2int16.h:18,
from /home/chris/Desktop/G3D/G3D.lib/source/
Vector2int16.cpp:12:
include/G3D/HashTrait.h:41: error: redefinition of ‘struct
HashTrait<long unsigned int>’
include/G3D/HashTrait.h:37: error: previous definition of ‘struct
HashTrait<long unsigned int>’

161s (i7 CPU)

I've got to get back to work and don't have time to go through the
removing definition errors again today, so will email you both a VNC
IP and Password for the second machine which has a CVS checkout from
today, should you wish to remotely connect to it and debug/recompile,
using something like Vinagre.

~Chris

@ Durham Univeristy,
Ph.D Research Computer Graphics
www.cwkx.com

On Nov 26, 4:36 am, Morgan McGuire <morga...@gmail.com> wrote:
> Are you on a 64-bit OS, perhaps?  We haven't been testing sufficiently
> on 64-bit lately.  Please do post the output Corey wants so we can
> debug.
>
> -m
>
> Prof. Morgan McGuire
> Computer Science Department
> Williams Collegehttp://cs.williams.edu/~morgan
>
>
>
> On Wed, Nov 25, 2009 at 8:12 PM, corey taylor <corey.tay...@gmail.com> wrote:
> > That is very odd.  I can understand the long unsigned int issue but that's
> > the only recent change.
>
> > Please post the output from gcc -v and some examples of other redefinition
> > errors.
>
> > corey
>

corey taylor

unread,
Nov 27, 2009, 12:21:28 PM11/27/09
to g3d-...@googlegroups.com
I took a look and removing the long unsigned int definition allowed it to build.  You're missing libzip however.

There are issues with int type definitions clashing with each other.  Using size_t in the template won't work any better.

I'd probably suggest we forgo using G3D types in the HashTrait specializations and just define one for each basic int type up to 64-bit on 32-bit and 64-bit systems.

corey

Morgan McGuire

unread,
Nov 27, 2009, 1:16:57 PM11/27/09
to g3d-...@googlegroups.com
> I'd probably suggest we forgo using G3D types in the HashTrait
> specializations and just define one for each basic int type up to 64-bit on
> 32-bit and 64-bit systems.

Agreed.

-m
Reply all
Reply to author
Forward
0 new messages