Google

[solved] building 1.6.0RC1 on ubuntu 7.10

Problems building or running the engine, queries about how to use features etc.

Moderators: Moderators, OGRE Team

[solved] building 1.6.0RC1 on ubuntu 7.10

Postby pov » Sat Aug 30, 2008 11:30 am

Hello!

I am trying to build 1.6.0RC1 from source on a linux (ubuntu 7.10) system. On the very same system I successfully built various 1.4 versions like 1.4.9 before.

So far, I did (as usual)
./configure --prefix=/opt/ogre-1.6.0RC1 --disable-cg
make

Compiling goes well, but when the linking of libOgreMain happens, I get the following errors about undefined symbols.

Code: Select all
.libs/OgreAnimable.o: In function `~Exception':
/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
.libs/OgreAnimable.o:/home/ubuntu/build/ogre/OgreMain/src/../../OgreMain/include/OgreException.h:128: more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' follow
.libs/OgreParticleSystem.o: In function `operator< <char, std::char_traits<char>, std::allocator<char> >':
/usr/include/c++/4.1.3/bits/basic_string.h:2213: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::compare(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
.libs/OgreParticleSystem.o: In function `~pair':
/usr/include/c++/4.1.3/bits/stl_pair.h:69: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
.libs/OgreParticleSystem.o: In function `Ogre::ParticleSystem::initParameters()':
/home/ubuntu/build/ogre/OgreMain/src/OgreParticleSystem.cpp:735: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/home/ubuntu/build/ogre/OgreMain/src/OgreParticleSystem.cpp:735: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
.libs/OgreParticleSystem.o: In function `~pair':
/usr/include/c++/4.1.3/bits/stl_pair.h:69: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
.libs/OgreParticleSystem.o: In function `Ogre::ParticleSystem::initParameters()':
/home/ubuntu/build/ogre/OgreMain/src/OgreParticleSystem.cpp:740: undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
.libs/OgreParticleSystem.o:/home/ubuntu/build/ogre/OgreMain/src/OgreParticleSystem.cpp:740: more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' follow
/usr/bin/ld: .libs/libOgreMain-1.6.0.so: hidden symbol `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [libOgreMain.la] Error 1
make[2]: Leaving directory `/home/ubuntu/build/ogre/OgreMain/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ubuntu/build/ogre/OgreMain'
make: *** [all-recursive] Error 1


I am using ubuntu's GCC 4.1.3, and neither the Readme's nor the build-instructions in the wiki are much of a help for me here.

Any hints?

Thank you very much.[/code][/quote]
Last edited by pov on Wed Sep 24, 2008 11:13 am, edited 2 times in total.
pov
Newcomer
 
Posts: 9
Joined: Wed Jan 23, 2008 9:05 am

Postby sinbad » Sun Aug 31, 2008 4:47 pm

I have no idea what that's upset about I'm afraid, I only have an Ubuntu 8.04 machine to test on and it's fine. How come it's incapable of linking a standard STL class? (std::string)
User avatar
sinbad
OGRE Founder, Ex-Lead
OGRE Founder, Ex-Lead
 
Posts: 25646
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands

Postby pov » Mon Sep 01, 2008 1:50 pm

I've installed ubuntu 8.04.1 on a spare disk and compiled 1.6.0rc1 there. Worked fine, except:

- a lot of warinings about non-empty lines at end of files (sorry, did not keep the console output, so don't know which ones)
- ./configure did not detect the missing libglu header file in my fresh install and failed later half-time during build.

The first point is easy to ignore, second one solved by installing the *-dev package and reconfigure/rebuild.

Then I copied the created "make install" tree over to ubuntu 7.10, where it gladly works without library dependency issues. For now I'm happy, despite my compiler now still complains about missing empty line in a .h file of ogre (OgreRenderToVortexBuffer.h - fixed that by editing the .h file) , and the non-virtual destructors of some classes that have virtual methods (AnimationTrack::Listener, ResourceLoadingListener, MeshSerializerListener) when I compile my project.

I still don't understand why the original 7.10 built attempt failed, as the link command executed included "-lstdc++", but the STL-linking did not find what it looked for. But sadly I am no GCC/STL library guru. Maybe ogre uses some string functionality that was not there in the libs included in 7.10?
pov
Newcomer
 
Posts: 9
Joined: Wed Jan 23, 2008 9:05 am

Postby sinbad » Tue Sep 02, 2008 10:01 pm

What's confusing is that our use of libstd++ hasn't changed in years, particularly of std::string which we've used forever. I just don't know why 7.1 suddenly thinks it can't link.
User avatar
sinbad
OGRE Founder, Ex-Lead
OGRE Founder, Ex-Lead
 
Posts: 25646
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands

Postby AndyCR » Wed Sep 03, 2008 12:22 am

This is the same problem I had trying to build SVN HEAD on Ubuntu 7.10 awhile back. It's unfortunate to hear that this problem persists to the 1.6 RC.
User avatar
AndyCR
Regular
 
Posts: 100
Joined: Sat Dec 23, 2006 11:27 pm

Postby sinbad » Fri Sep 05, 2008 5:17 pm

AndyCR wrote:This is the same problem I had trying to build SVN HEAD on Ubuntu 7.10 awhile back. It's unfortunate to hear that this problem persists to the 1.6 RC.


There's been a recent fix for MinGW now (in branches/v1-6), you might find that it also fixes Ubuntu 7.1, I don't know.
User avatar
sinbad
OGRE Founder, Ex-Lead
OGRE Founder, Ex-Lead
 
Posts: 25646
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands

Postby dermont » Sat Sep 06, 2008 9:21 am

Isn't this the old issue with visibility flags on Ubuntu for gcc < 4.2 ? You can test by disabling the visibility flags in configure.in, e.g:

Code: Select all
CFLAGS_VISIBILITY=""
AC_SUBST(CFLAGS_VISIBILITY)
dermont
Veteran
 
Posts: 371
Joined: Thu Dec 09, 2004 2:51 am
Location: Kuala Lumpur

Postby Fulmens » Sun Sep 07, 2008 7:57 pm

dermont wrote:Isn't this the old issue with visibility flags on Ubuntu for gcc < 4.2 ? You can test by disabling the visibility flags in configure.in, e.g:

Code: Select all
CFLAGS_VISIBILITY=""
AC_SUBST(CFLAGS_VISIBILITY)


For me, it worked. But i looked in the configure.in and it seems it should do the check by itself (i'm not used to configure scripts).
After the successfull build i ran some demos and they worked too.
But i hope i won't get an error later.
Fulmens
Regular
 
Posts: 152
Joined: Sun Jun 22, 2008 8:29 pm
Location: Nantes, France

Postby pov » Wed Sep 24, 2008 11:13 am

unsetting the CFLAGS_VISIBILITY and re-autoconf and rebuilding worked fine. thanks.
pov
Newcomer
 
Posts: 9
Joined: Wed Jan 23, 2008 9:05 am


Return to Help

Who is online

Users browsing this forum: CABAListic, Google [Bot], Mako_energy, Unconnected42 and 7 guests