View Full Version : gcc 3.2-7 on FC4 ?

23rd August 2005, 09:10 PM
Hi all,

I'm using Open Inventor (3D Graphics API for C++ and Java) of Fedora Core 4. The version of gcc on my machine is gcc 4.0.0-8. When I try to call their demo program I get the following error.

g++ -O -Wno-deprecated -D_GCC_ -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -DQT_SHARED -o verifs verifs.o -L/home/oiv50/lib
-lInventorXt -lInventor -limage -L/lib -lGLU -L/lib -lGL
-L/home/oiv50/lib -L/usr/X11R6/lib -L/usr/X11R6/lib -lXm -lXt -lXi
-lXext -L/usr/X11R6/lib -lX11 -lstdc++ -lm -ldl -lpthread
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::allocate(unsigned int)'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_S_free_list'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_Lock::~_Lock()'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_S_force_new'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_Lock::_Lock()'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_S_refill(unsigned int)'
/home/oiv50/lib/libInventor.so: undefined reference to
`std::basic_string<char, std::char_traits<char>, std::allocator<char>
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::_S_node_allocator_lock'
/home/oiv50/lib/libInventorXt.so: undefined reference to
`std::__default_alloc_template<true, 0>::deallocate(void*, unsigned
collect2: ld returned 1 exit status
make: *** [verifs] Error 1

I was told that this error is most probably because Open Inventor (the 3D graphics API) was built with gcc 3.2-7 and I'm using 4.0.0-8. I was asked to recompile with demo code with gcc 3.2.7

When I tried to install gcc 3.2.7 rpm, I was not able to do so, because of dependency issues.
[root@linux1 Desktop]# rpm -ivf gcc-3.2-7.i386.rpm
warning: gcc-3.2-7.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
cpp = 3.2-7 is needed by gcc-3.2-7.i386
[root@linux1 Desktop]# gcc cpp-3.2-7.i386.rpm
cpp-3.2-7.i386.rpm: file not recognized: File format not recognized
collect2: ld returned 1 exit status
[root@linux1 Desktop]# rpm -ivf cpp-3.2-7.i386.rpm
warning: cpp-3.2-7.i386.rpm: Header V3 DSA signature: NOKEY, key ID db42a60e
Preparing packages for installation...
package cpp-4.0.1-4.fc4 (which is newer than cpp-3.2-7) is already installed
file /usr/bin/cpp from install of cpp-3.2-7 conflicts with file from package cpp-4.0.1-4.fc4
file /usr/share/info/cpp.info.gz from install of cpp-3.2-7 conflicts with file from package cpp-4.0.1-4.fc4
file /usr/share/info/cppinternals.info.gz from install of cpp-3.2-7 conflicts with file from package cpp-4.0.1-4.fc4
file /usr/share/man/man1/cpp.1.gz from install of cpp-3.2-7 conflicts with file from package cpp-4.0.1-4.fc4

I would like to know if the first error "undefined reference to `std::__default_alloc_template" is due to the difference in compiler versions and if yes, how can I get gcc 3.2.7 installed.

Also here is the system requirement for provided for open inventor

1.3 PC Linux Red Hat
- Red Hat release: 8.0/9.0
NOTE: Open Inventor was built on Red Hat 8.0 but is fully compatible with Red Hat 9.0.

- OS kernel: 2.4.18-14
- X-server: XFree 4.2.0-72
- Motif: OpenMotif 2.2.2-12
- Compiler: gcc 3.2-7
- C library: glibc 2.2.93-5
- OpenGL library: NVidia driver 53.28 (OpenGL 1.4)
NOTE: This is not the Red Hat 8.0 default: the default is provided by the

I have been told that the the API works on RedHat Workstation 3, Fedora Core 3,
and Suse 9.3.

Please advice

23rd August 2005, 09:20 PM
Try these instructions here (http://www.mjmwired.net/resources/mjm-fedora-fc4.shtml#compat)

24th August 2005, 04:38 PM

thanks for the advice. I made a terrible mistake by trying to uninstall gcc4.0.0-8. I removed gcc by using rpm -e and and also 4 more packages which gcc was dependent on. When I tried to install gcc 3.2.7 there were more confilicts. I tried to fix this by running yum update. But now, yum, rpm and gcc, firefox etc are not working.

When I try using gcc I get the following message.

gcc: installation problem, cannot exec cc1plus: No file or directory

when I try yum I get the following

the yum libraries do not seem to be available on your system for this version of python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512] (RedHat 4.0.0-5]
Please make sure the package you used to installyum was built for your install of python.

rpm: error while loading shared libraries: libstdc++.so.6: cannot open shared object file. No such file or directory.

I guess this is all because I screwed up my gcc installation. I neither have gcc-4.0.0-8 nor gcc 3.2.7. I dont want to reinstall FC4. Please help


24th August 2005, 05:58 PM
Just an idea, not sure if it will work. Try using your Fedora CD's or DVD and running the "Add/Remove Applications" from the menu. Make sure to add the "Development" packages which should include gcc.

Otherwise, I imagine you may just have to install manual RPMs.