LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? (http://www.linuxquestions.org/questions/linux-software-2/compile-error-h5g_obj_t-does-not-name-a-type-is-gcc-4-3-incompatible-with-gcc-3-a-708339/)

samrat_rao 03-01-2009 03:30 AM

Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ?
 
Hi,
I am trying to compile a package hdf-1.6.8 for openSUSE 11.0. But i think there is a problem when gcc 4.3 is used. The make fails giving errors like:
Quote:

In file included from H5IdComponent.cpp:21:
H5IdComponent.h:86: error: 'H5G_obj_t' does not name a type
The header file has such entries:
Code:

H5G_obj_t p_get_refobj_type(void *ref, H5R_type_t ref_type) const;
Is this a cause for conflicts between gcc 3 and gcc 4. If so how do i rectify the same? I have compat-ltdc++ installed. Similar errors are sure to follow during the compilation process.

knudfl 03-01-2009 12:10 PM

HDF5 1.6.8 software > > hdf5-1.6.8.tar.gz from
ftp://ftp.hdfgroup.org/HDF5/current16/src/

'cd hg5-1.6.8', './configure', 'make' runs with no errors
on a clean install of Suse 11.0,
using gcc43-4.3.1_20080507-6.1 .

There is a 'compat-libstdc++' for Suse 11.0, but it isn't
used, as all code in HG5 is c-code, no c++.
And there is no compiler connected to 'compat-libstdc++'.

There is no gcc-3 for Suse 11.0, unless you installed an
alternative one yourself.
I do not see, how you can talk about a gcc3, gcc4 conflict,
unless you are using some special configure options.

The only possible reason for an error I can think of, is if
you have another version of gcc-4.3 .? ?
.....

samrat_rao 03-01-2009 01:03 PM

Quote:

Originally Posted by knudfl (Post 3461473)
And there is no compiler connected to 'compat-libstdc++'.

What does this mean?
Quote:

There is no gcc-3 for Suse 11.0, unless you installed an alternative one yourself.
No i haven't installed gcc 3. I learnt that it is too troublesome and will cause dependency kinda problems with gcc 4. I have the gcc that you mentioned for openSUSE 11.0.
Quote:

I do not see, how you can talk about a gcc3, gcc4 conflict, unless you are using some special configure options.
I used the configure option:
Code:

--enable-cxx
I do not have a gcc conflict. I was just wondering if hdf5-1.6.8 is better off being compiled with gcc 3 as i did not have problems compiling hdf5-1.8.2.

knudfl 03-02-2009 07:57 AM

Please try this : 'cd hg5-1.6.8' .. 'make distclean'
( or unpack hg5-1.6.8/ to a new location in /home/<username>/ )

And next rerun './configure' with no options.

( --enable-cxx is not a usable option, AFAIK, see './configure --help' .
.... And what was the --enable-cxx meant to do ? ? )

As already said, running make should work on Suse 11 with no errors.
.....

samrat_rao 03-03-2009 10:49 AM

Quote:

Originally Posted by knudfl (Post 3462366)
( --enable-cxx is not a usable option, AFAIK, see './configure --help' .
.... And what was the --enable-cxx meant to do ? ? )......

But typing ./configure --help gives an option --enable-cxx which is: Compile the C++ interface [default=no]

Why is it not usable?

And yes, a simple ./configure, make, make check is a success. But why not with --enable-cxx?

knudfl 03-03-2009 02:28 PM

I am very sorry, must have been sleepy ?
Now I found both the c++ code and the option --enable-cxx .
( And the --enable-fortran = 'Compile the fortran interface' too ! )

'./configure --enable-cxx' :
Works OK with 'g++-4.3' here, make sure, that 'gcc-c++' is installed,
and that 'g++' is present in /usr/bin/ .

This also works : './configure --enable-cxx CXX=g++34' :

I used the 'compat-gcc-34-c++-3.4.6-9.i386.rpm'
and 'compat-gcc-34-.4.6-9.i386.rpm' from Fedora 10.
http://download.fedora.redhat.com/pu...6/os/Packages/

( Fedora 10 has an equal 'glibc' and almost the same 'binutils'
as Suse 11, so the compiler works with no errors.)
:
The result in the hidden c++/.libs/ folder is 'libhdf5_cpp.a'
.....


All times are GMT -5. The time now is 12:50 PM.