Opened 16 years ago

Closed 16 years ago

#830 closed Bugs (None)

‘ulong_long_type’ is not a member of ‘boost’

Reported by: nobody Owned by: John Maddock
Milestone: Component: build
Version: None Severity:
Keywords: Cc:

Description

compilation error when compiling is_integral.hpp

cp /usr/include/boost/type_traits/is_integral.hpp test.cpp
g++ test.cpp


In file included from /usr/local/include/boost/config.hpp:35,
                 from test.cpp:12:
/usr/local/include/boost/config/compiler/gcc.hpp:66:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results"
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: template argument 1 is invalid
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: template argument 1 is invalid
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: template argument 1 is invalid
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: ‘ulong_long_type’ is not a member of ‘boost’
test.cpp:61: error: template argument 1 is invalid
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: template argument 1 is invalid
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: template argument 1 is invalid
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: template argument 1 is invalid
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: ‘long_long_type’ is not a member of ‘boost’
test.cpp:62: error: template argument 1 is invalid

Change History (7)

comment:1 by nobody, 16 years ago

Logged In: NO 

Boost was not compiled from source.  It was installed as an ubuntu package - 1.33.1-7ubuntu1

comment:2 by John Maddock, 16 years ago

Logged In: YES 
user_id=14804
Originator: NO

It looks to me like you might have a partial update of your Boost tree - the warning that you are seeing:

/usr/local/include/boost/config/compiler/gcc.hpp:66:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results"

Should not be emitted for Boost-1.33.1, while ulong_long_type is defined by Boost.Config for 1.33.1 onwards only.

Is it possible you have an old version of Boost.Config in your include path somewhere?

John Maddock.

comment:3 by gonzo1984, 16 years ago

Logged In: YES 
user_id=1717549
Originator: NO

I can't find any Boost.Config on my filesystem.
The closest thing is /usr/include/boost/config.hpp, which was written by you in 2002!

comment:4 by gonzo1984, 16 years ago

Logged In: YES 
user_id=1717549
Originator: NO

I completely uninstalled Boost then re-installed the libBoost-dev package but I still have the same problem.  Is there some sort of utility I can use to check whether I have a partial update of the Boost tree?

comment:5 by John Maddock, 16 years ago

Logged In: YES 
user_id=14804
Originator: NO

Sorry for the shorthand: Boost.Config just means "the Boost configuration library".

OK, open up boost/config/suffix.hpp, you should see ulong_long_type defined unconditionally in there.

Now preprocess the source with - for exanmple - `g++ -E test.cpp 2>&1 | less` and search for "ulong_long_type" again, if you don't find it before it get's used, look for "suffix.hpp" and check that one you expect to be included is the one that is getting included (ie that you haven't got more than one copy of the file on your system).

John Maddock.

comment:6 by gonzo1984, 16 years ago

Logged In: YES 
user_id=1717549
Originator: NO

It seems like the problem is gone.
I tried installing from source using boost.build but got alot of failed and alot of skipped targets. I did this without un-installing the libboost-dev package.  I wonder if I had an older config and installing from source (even though some of it failed) updated this file.

Does this make sense?  If so, I don't need to pursue this any further and I thank you very much for your help.

comment:7 by John Maddock, 16 years ago

Status: assignedclosed
Logged In: YES 
user_id=14804
Originator: NO

It sounds a likely explanation, I'm closing the issue down for now.
Note: See TracTickets for help on using tickets.