Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#8048 closed Bugs (fixed)

Boost 1.53 + GCC 4.6.3 __int128 undefined.

Reported by: wchan212@… Owned by: John Maddock
Milestone: To Be Determined Component: config
Version: Boost 1.53.0 Severity: Showstopper
Keywords: Cc:

Description

Hi. I am using gcc 4.6.3 as well as boost 1.53.0; my program previously compiles fine w/ boost 1.52.0.

I get this error:

/opt/orange/include/boost/config/suffix.hpp(496): error: identifier "int128" is undefined

/opt/orange/include/boost/config/suffix.hpp(497): error: expected a ";"

/opt/orange/include/boost/config/suffix.hpp(496): error: identifier "int128" is undefined

/opt/orange/include/boost/config/suffix.hpp(497): error: expected a ";"

/opt/orange/include/boost/config/suffix.hpp(496): error: identifier "int128" is undefined

/opt/orange/include/boost/config/suffix.hpp(497): error: expected a ";"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/is_integral.hpp(74): error: class "boost::is_integral<const volatile boost::int128_type>" has already been defined

/opt/orange/include/boost/type_traits/make_unsigned.hpp(79): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/make_unsigned.hpp(111): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/make_unsigned.hpp(79): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/make_unsigned.hpp(111): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/make_unsigned.hpp(79): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/type_traits/make_unsigned.hpp(111): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(92): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(92): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(92): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: class "boost::hash<boost::int128_type>" has already been defined

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: class "boost::hash<boost::int128_type>" has already been defined

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: class "boost::hash<boost::int128_type>" has already been defined

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

/opt/orange/include/boost/functional/hash/hash.hpp(444): error: namespace "boost" has no member "uint128_type"

Change History (49)

comment:1 by Marshall Clow, 10 years ago

Can you run a test, please?

Check if __SIZEOF_INT128__ is defined.

Thanks!

comment:2 by anonymous, 10 years ago

See below:

wchan@speech07:/tmp$ cat test.cc
#include <iostream>

int main(int argc, char* argv[]) {
#ifdef __SIZEOF_INT128__
  std::cout << "__SIZEOF_INT128__ = " << __SIZEOF_INT128__ << std::endl;
#else
  std::cout << "Nope! no __SIZEOF_INT128__" << std::endl;
#endif
}

wchan@speech07:/tmp$ g++ -o test.gcc test.cc && ./test.gcc
__SIZEOF_INT128__ = 16
wchan@speech07:/tmp$ nvcc -o test.nvcc test.cc && ./test.nvcc
__SIZEOF_INT128__ = 16
Last edited 10 years ago by viboes (previous) (diff)

comment:3 by anonymous, 10 years ago

Previous comment screwed up, see below again.

wchan@speech07:/tmp$ cat test.cc
#include <iostream>

int main(int argc, char* argv[]) {
#ifdef __SIZEOF_INT128__
  std::cout << "__SIZEOF_INT128__ = " << __SIZEOF_INT128__ << std::endl;
#else
  std::cout << "Nope! no __SIZEOF_INT128__" << std::endl;
#endif
}

wchan@speech07:/tmp$ g++ -o test.gcc test.cc && ./test.gcc
__SIZEOF_INT128__ = 16
wchan@speech07:/tmp$ nvcc -o test.nvcc test.cc && ./test.nvcc
__SIZEOF_INT128__ = 16

comment:4 by Marshall Clow, 10 years ago

Great!

Next test, please:

typedef __int128 Cint128_1;

and:

__extension__ typedef __int128 Cint128_2;

Do either of those work?

comment:5 by anonymous, 10 years ago

wchan@speech07:/tmp$ cat test.cc
#include <iostream>

typedef __int128 Cint128_1;
__extension__ typedef __int128 Cint128_2;

int main(int argc, char* argv[]) {
#ifdef __SIZEOF_INT128__
  std::cout << "__SIZEOF_INT128__ = " << __SIZEOF_INT128__ << std::endl;
  std::cout << "sizeof(Cint128_1) = " << sizeof(Cint128_1) << std::endl;
  std::cout << "sizeof(Cint128_1) = " << sizeof(Cint128_2) << std::endl;
#else
  std::cout << "Nope! no __SIZEOF_INT128__" << std::endl;
#endif
}

wchan@speech07:/tmp$ g++ --version && g++ -o test.gcc test.cc && ./test.gcc
g++ (GCC) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

__SIZEOF_INT128__ = 16
sizeof(Cint128_1) = 16
sizeof(Cint128_1) = 16
wchan@speech07:/tmp$ nvcc --version && nvcc -o test.nvcc test.cc && ./test.nvcc
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Thu_Apr__5_00:24:31_PDT_2012
Cuda compilation tools, release 4.2, V0.2.1221
__SIZEOF_INT128__ = 16
sizeof(Cint128_1) = 16
sizeof(Cint128_1) = 16

comment:6 by Marshall Clow, 10 years ago

Ok. that's almost the same code that's in suffix.hpp.

Let's make it exact. try this code, please:

namespace boost{
#  ifdef __GNUC__
   __extension__ typedef __int128 int128_type;
   __extension__ typedef unsigned __int128 uint128_type;
#  else
   typedef __int128 int128_type;
   typedef unsigned __int128 uint128_type;
#  endif
}

If that works, I'm out of suggestions.

comment:7 by anonymous, 10 years ago

wchan@speech07:/tmp$ cat test.cc
#include <iostream>

namespace boost{
#  ifdef __GNUC__
   __extension__ typedef __int128 int128_type;
   __extension__ typedef unsigned __int128 uint128_type;
#  else
   typedef __int128 int128_type;
   typedef unsigned __int128 uint128_type;
#  endif
};

typedef __int128 Cint128_1;
__extension__ typedef __int128 Cint128_2;

int main(int argc, char* argv[]) {
#ifdef __SIZEOF_INT128__
  std::cout << "__SIZEOF_INT128__ = " << __SIZEOF_INT128__ << std::endl;
  std::cout << "sizeof(Cint128_1) = " << sizeof(boost::int128_type) << std::endl;
  std::cout << "sizeof(Cint128_2) = " << sizeof(boost::uint128_type) << std::endl;
#else
  std::cout << "Nope! no __SIZEOF_INT128__" << std::endl;
#endif
}

wchan@speech07:/tmp$ g++ -o test.gcc test.cc && ./test.gcc
__SIZEOF_INT128__ = 16
sizeof(Cint128_1) = 16
sizeof(Cint128_2) = 16
wchan@speech07:/tmp$ nvcc -o test.nvcc test.cc && ./test.nvcc
__SIZEOF_INT128__ = 16
sizeof(Cint128_1) = 16
sizeof(Cint128_2) = 16

comment:8 by anonymous, 10 years ago

Are you on #boost on irc? Do you want me to go on?

comment:9 by Marshall Clow, 10 years ago

I'm on #boost now.

comment:10 by Marshall Clow, 10 years ago

After discussing this with the OP, it turns out that he is using nvcc, Nvidia's compiler, which claims to be gcc.

Furthermore, he's seeing this error only when compiling a cuda source file (xxx.cu), not C++.

In this mode, nvcc is defining the preprocessor symbol __SIZEOF_INT128__, but not the type __int128

in reply to:  10 ; comment:11 by anonymous, 10 years ago

Replying to marshall:

After discussing this with the OP, it turns out that he is using nvcc, Nvidia's compiler, which claims to be gcc.

Furthermore, he's seeing this error only when compiling a cuda source file (xxx.cu), not C++.

In this mode, nvcc is defining the preprocessor symbol __SIZEOF_INT128__, but not the type __int128

Can you give me an indication of whether there is a workaround for this. I'm compiling a file that is named .cu but contains heavy c++. I get the 128 error with 4.7.1 nvcc release 5.0, V0.2.1221 and boost 1.53?

in reply to:  11 comment:12 by Marshall Clow, 10 years ago

Replying to anonymous:

Replying to marshall:

After discussing this with the OP, it turns out that he is using nvcc, Nvidia's compiler, which claims to be gcc.

Furthermore, he's seeing this error only when compiling a cuda source file (xxx.cu), not C++.

In this mode, nvcc is defining the preprocessor symbol __SIZEOF_INT128__, but not the type __int128

Can you give me an indication of whether there is a workaround for this. I'm compiling a file that is named .cu but contains heavy c++. I get the 128 error with 4.7.1 nvcc release 5.0, V0.2.1221 and boost 1.53?

I suspect that:

#if defined(BOOST_HAS_INT128) && defined(__CUDACC__)
#undef BOOST_HAS_INT128
#endif

added to the end of boost/config/compiler/nvcc.hpp will solve the problem; but I don't know for sure. I am working with the OP to test this.

comment:13 by viboes, 10 years ago

Component: Noneconfig
Owner: set to John Maddock

comment:14 by John Maddock, 10 years ago

Many thanks for investigating this Marshall, is there anything you need me to do?

John Maddock.

comment:15 by anonymous, 10 years ago

To the GCC 4.7.1 guy above, AFAIK IIRC CUDA 5.0 still only supports GCC 4.6.x and not 4.7.x

comment:16 by anonymous, 10 years ago

credits to @Marshall, adding this to:

#if defined(BOOST_HAS_INT128)
#undef BOOST_HAS_INT128
#endif

the end of boost/config/nvcc.hpp fixes the compile for now. This would be a quick hack for those who need boost 1.53 compiling w/ nvcc.

comment:17 by anonymous, 10 years ago

credits to @Marshall

Adding

#if defined(BOOST_HAS_INT128) && defined(__CUDACC__)
#undef BOOST_HAS_INT128
#endif

to the end of boost/config/nvcc.hpp also works. I think this is a slightly more robust solution? (@Marshall, the first time we tried it we forgot the "if", that's why it didnt work)

in reply to:  17 comment:18 by anonymous, 10 years ago

Replying to anonymous:

credits to @Marshall

Adding

#if defined(BOOST_HAS_INT128) && defined(__CUDACC__)
#undef BOOST_HAS_INT128
#endif

to the end of boost/config/nvcc.hpp also works. I think this is a slightly more robust solution? (@Marshall, the first time we tried it we forgot the "if", that's why it didnt work)

Guys, thanks for that, this worked adding that to config/compiler/nvcc.hpp (not config/nvcc,hpp for future readers). However, I have come across an other problem this time with property tree. Although the file I'm compiling with nvcc contains no device code and is pure host code, it does need to be parsed and compiled by nvcc not gcc for various reasons. Even the mere inclusion of:

#include <boost/property_tree/json_parser.hpp> #include <boost/foreach.hpp> #include <boost/property_tree/ptree.hpp>

Gives the following error, using the same set up as above in terms of my compiler, nvcc and boost 1.53. The error begins with: boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:111:73: error: expected template-name before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:111:73: error: expected ‘{’ before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:111:73: error: expected unqualified-id before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:121:79: error: expected template-name before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:121:79: error: expected ‘{’ before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/ptree_implementation.hpp:121:79: error: expected unqualified-id before ‘<’ token boost-1.53.0/include/boost/property_tree/detail/json_parser_read.hpp: In constructor ‘boost::property_tree::json_parser::json_grammar<Ptree>::definition<Scanner>::definition(const boost::property_tree::json_parser::json_grammar<Ptree>&)’: boost-1.53.0/include/boost/property_tree/detail/json_parser_read.hpp:257:298: error: ‘type name’ declared as function returning an array boost-1.53.0/include/boost/property_tree/detail/json_parser_read.hpp:257:298: error: ‘type name’ declared as function returning an array

This is before I even try to use property tree. Any thoughts or work arounds this time? It works perfectly correctly and compiles with gcc 4.7.1

Cheers,

comment:19 by anonymous, 10 years ago

CUDA 5 does NOT support GCC 4.7.* ... please try again w. gcc 4.6

in reply to:  19 comment:20 by anonymous, 10 years ago

Replying to anonymous:

CUDA 5 does NOT support GCC 4.7.* ... please try again w. gcc 4.6

Sure, I appreciate that, then again there are many of us using it quite successfully, so it would be useful to have these sort of things worked-around if possible. Could suggest a fix even though I appreciate it's unsupported?

comment:21 by anonymous, 10 years ago

Can you still try w/ GCC 4.6.*? This will help isolate the issue.

comment:22 by John Maddock, 10 years ago

I'm not against the patch as proposed. However, what happens when the CUDA guys update their compiler to support GCC-4.7.x and add support for __int128 ? Can we make the #undef conditional on the CUDA version?

comment:23 by anonymous, 10 years ago

AFAIK there is a CUDA_VERSION macro. For the CUDA 5 cuda.h we have:

 133 /**
 134  * CUDA API version number
 135  */
 136 #define CUDA_VERSION 5000
 137 

in reply to:  22 comment:24 by Marshall Clow, 10 years ago

Replying to johnmaddock:

I'm not against the patch as proposed. However, what happens when the CUDA guys update their compiler to support GCC-4.7.x and add support for __int128 ? Can we make the #undef conditional on the CUDA version?

"Always in motion is the future"

Certainly we can add something like "if GCC < 4.7" to the #ifdef, but what if the 4.7 version of nvcc still doesn't support __int128. Then we'd have to rev anyway.

John - do you have knowledge that the CUDA guys are planning this?

comment:25 by John Maddock, 10 years ago

"Always in motion is the future"

Ain't that the truth.

Certainly we can add something like "if GCC < 4.7" to the #ifdef, but what if the 4.7 >version of nvcc still doesn't support int128. Then we'd have to rev anyway.

John - do you have knowledge that the CUDA guys are planning this?

Nope, but if they "officially" support 4.7 and later and still define __SIZEOF_INT128__ then they'd better support __int128 or else it's a bug in their compiler support.

I guess either way we won't do anything about it unless someone complains. Hmmm, maybe you're right that a blanket exclusion is safer - at least pretty much all of Boost will work just fine then. OK... I think I've convinced myself :-) I'll commit the original fix unless someone disagrees.

comment:26 by John Maddock, 10 years ago

(In [83012]) Fix Int128 support on CUDA. Exclude BOOST_GCC from getting defined on CUDA. Refs #8048. Refs #7841.

comment:27 by John Maddock, 10 years ago

(In [83014]) Add comment on change. Refs #8048.

comment:28 by John Maddock, 10 years ago

Resolution: fixed
Status: newclosed

(In [83139]) Merge changes from Trunk. Fixes #6013. Fixes #7151. Fixes #7359. Fixes #7389. Fixes #7452. Fixes #7528. Fixes #7703. Fixes #7841. Fixes #7898. Fixes #7938. Fixes #8048.

in reply to:  16 comment:29 by anonymous, 9 years ago

Replying to anonymous:

credits to @Marshall, adding this to:

#if defined(BOOST_HAS_INT128)
#undef BOOST_HAS_INT128
#endif

the end of boost/config/nvcc.hpp fixes the compile for now. This would be a quick hack for those who need boost 1.53 compiling w/ nvcc.

Yes - works here too! Thanks!

comment:30 by anonymous, 9 years ago

(Original bug filer reposting)... This bug has reappeared with GCC 4.7.3 and Boost 1.54.0 and CUDA 5.5

comment:31 by anonymous, 9 years ago

The code has:

#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
#  define BOOST_HAS_INT128
#endif

Is __CUDACC__ not defined? And if not what is?

comment:32 by anonymous, 9 years ago

(Original bug filer reposting)... This bug has reappeared with GCC 4.7.3 and Boost 1.54.0 and CUDA 5.5 EDIT: on OSX but not on Linux.

comment:33 by anonymous, 9 years ago

Please see my comment above - is __CUDAC__ not defined? And if not what the heck does identify this compiler?

comment:34 by anonymous, 9 years ago

(Original bug filer) posting.

wchan:/private/tmp$ gcc --version
gcc (GCC) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wchan:/private/tmp$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_10_11:16:01_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0
wchan:/private/tmp$ cat test.cu
// #include <boost/functional/hash.hpp>
// If I uncomment the line above, it will not compile.
// error: identifier "__int128" is undefined

#include <iostream>

int main(int argc, char* argv[]) {
#if defined(__CUDACC__)
  std::cout << "__CUDACC__ == 1" << std::endl;
#else
  std::cout << "__CUDACC__ == 0" << std::endl;
#endif
}

wchan:/private/tmp$ nvcc test.cu
wchan:/private/tmp$ ./a.out 
__CUDACC__ == 1

comment:35 by John Maddock, 9 years ago

Well this is very strange then - I've checked that all uses of int128 in Boost are guarded by BOOST_HAS_INT128 (they are), and that macro is defined in boost/config/compiler/gcc.hpp via:

#if defined(__SIZEOF_INT128__) && !defined(__CUDACC__)
#  define BOOST_HAS_INT128
#endif

Can you try and figure out how/why BOOST_HAS_INT128 macro is getting set in the above code?

comment:36 by anonymous, 8 years ago

I seem to have the same issue with nvcc + clang on OS X.

Could the workaround be duplicated into clang.hpp?

comment:37 by nilsgladitz@…, 8 years ago

I created a new ticket #10693 for clang.

comment:39 by rhodri.smith@…, 7 years ago

I have a similar problem using root and boost any help appreciated

Error: class,struct,union or type int128 not defined /usr/include/boost/config/suffix.hpp:496:

comment:40 by Marshall Clow, 7 years ago

rhodri.smith@… wrote:

I have a similar problem using root and boost any help appreciated

As John said, this has been fixed, but the fix is in 1.57 and later boost releases.

If you are using one of those releases, and still having problems, then please post more details.

If you are using an older version of boost, then you can apply the same fix locally (and the github commit that he put there shows exactly what change is necessary).

comment:41 by anonymous, 7 years ago

Hi Im using Ubuntu 14.0.04, boost 1_58 and root 5.34

Error: class,struct,union or type int128 not defined /usr/include/boost/config/suffix.hpp:496:

Thanks

comment:42 by John Maddock, 7 years ago

Can you please build and run the program libs/config/test/config_info.cpp and post the output (when you run that program) here?

Also is this the system GCC or some special build?

Thanks.

comment:43 by anonymous, 7 years ago

Hi Thanks for the help, yes it's a system gcc version below is output of config info

GNU C++ version 4.9.2

cplusplus =199711L STDC =1 _WCHAR_T [no value] _WCHAR_T_DEFINED [no value] GNUC =4 GNUC_MINOR =9 GNUC_PATCHLEVEL =2 GNUG =4 VERSION ="4.9.2" REGISTER_PREFIX [no value] USER_LABEL_PREFIX [no value] EXCEPTIONS =1 ELF =1 unix =1 LP64 =1 unix =1 _WCHAR_T [no value] STDC_HOSTED =1

*

GNU libstdc++ version 20141104

GLIBCXX =20141104 _GLIBCXX_USE_WCHAR_T =1 _GLIBCXX_USE_LONG_LONG =1 _GLIBCXX_USE_NLS =1 _GLIBCXX_USE_C99_MATH =1 _GLIBCXX_USE_C99 =1 _GLIBCXX_USE_LFS =1 _GLIBCXX_SYMVER =1 _GLIBCXX_HOSTED =1

*

Detected Platform: linux

Type char is signed Type wchar_t is signed byte order for type short =0 8 byte order for type int =0 8 16 24 byte order for type long =0 8 16 24 32 40 48 56 sizeof(wchar_t) =4 sizeof(short) =2 sizeof(int) =4 sizeof(long) =8 sizeof(size_t) =8 sizeof(ptrdiff_t) =8 sizeof(void*) =8 sizeof(void(*)(void)) =8 sizeof(float) =4 sizeof(double) =8 sizeof(long double) =16 CHAR_BIT =8 CHAR_MAX =127 WCHAR_MAX =2147483647 SHRT_MAX =32767 INT_MAX =2147483647 LONG_MAX =9223372036854775807L LLONG_MAX =9223372036854775807LL LONG_LONG_MAX =9223372036854775807LL ULLONG_MAX =(9223372036854775807LL * 2ULL + 1) ULONG_LONG_MAX =(9223372036854775807LL * 2ULL + 1ULL) STDC_IEC_559 =1 STDC_IEC_559_COMPLEX =1 STDC_ISO_10646 =201103L GLIBC =2 GLIBC_MINOR =19 GNU_LIBRARY =6 _BSD_SOURCE =1 _GNU_SOURCE =1 _ISOC99_SOURCE =1 _LARGEFILE_SOURCE =1 _LARGEFILE64_SOURCE =1 _SVID_SOURCE =1 _XOPEN_SOURCE_EXTENDED =1 _POSIX_ADVISORY_INFO =200809L _POSIX_ASYNCHRONOUS_IO =200809L _POSIX_BARRIERS =200809L _POSIX_C_SOURCE =200809L _POSIX_CHOWN_RESTRICTED =0 _POSIX_CLOCK_SELECTION =200809L _POSIX_CPUTIME =0 _POSIX_FSYNC =200809L _POSIX_JOB_CONTROL =1 _POSIX_MAPPED_FILES =200809L _POSIX_MEMLOCK =200809L _POSIX_MEMLOCK_RANGE =200809L _POSIX_MEMORY_PROTECTION =200809L _POSIX_MESSAGE_PASSING =200809L _POSIX_MONOTONIC_CLOCK =0 _POSIX_NO_TRUNC =1 _POSIX_PRIORITIZED_IO =200809L _POSIX_PRIORITY_SCHEDULING =200809L _POSIX_RAW_SOCKETS =200809L _POSIX_READER_WRITER_LOCKS =200809L _POSIX_REALTIME_SIGNALS =200809L _POSIX_REGEXP =1 _POSIX_SAVED_IDS =1 _POSIX_SEMAPHORES =200809L _POSIX_SHARED_MEMORY_OBJECTS =200809L _POSIX_SHELL =1 _POSIX_SOURCE =1 _POSIX_SPAWN =200809L _POSIX_SPIN_LOCKS =200809L _POSIX_SPORADIC_SERVER =-1 _POSIX_SYNCHRONIZED_IO =200809L _POSIX_THREAD_ATTR_STACKADDR =200809L _POSIX_THREAD_ATTR_STACKSIZE =200809L _POSIX_THREAD_CPUTIME =0 _POSIX_THREAD_PRIO_INHERIT =200809L _POSIX_THREAD_PRIO_PROTECT =200809L _POSIX_THREAD_PRIORITY_SCHEDULING =200809L _POSIX_THREAD_PROCESS_SHARED =200809L _POSIX_THREAD_SAFE_FUNCTIONS =200809L _POSIX_THREAD_SPORADIC_SERVER =-1 _POSIX_THREADS =200809L _POSIX_TIMEOUTS =200809L _POSIX_TIMERS =200809L _POSIX_TRACE =-1 _POSIX_TRACE_EVENT_FILTER =-1 _POSIX_TRACE_INHERIT =-1 _POSIX_TRACE_LOG =-1 _POSIX_TYPED_MEMORY_OBJECTS =-1 _POSIX_VDISABLE ='\0' _POSIX_VERSION =200809L _POSIX2_C_BIND =200809L _POSIX2_C_DEV =200809L _POSIX2_CHAR_TERM =200809L _POSIX2_LOCALEDEF =200809L _POSIX2_SW_DEV =200809L _POSIX2_VERSION =200809L _XBS5_LP64_OFF64 =1 _XBS5_LPBIG_OFFBIG =-1 _XOPEN_CRYPT =1 _XOPEN_ENH_I18N =1 _XOPEN_LEGACY =1 _XOPEN_REALTIME =1 _XOPEN_REALTIME_THREADS =1 _XOPEN_SHM =1 _XOPEN_SOURCE =700 _XOPEN_UNIX =1 _XOPEN_VERSION =700 USE_BSD =1

*

Boost version 105800

BOOST_USER_CONFIG =<boost/config/user.hpp> BOOST_COMPILER_CONFIG ="boost/config/compiler/gcc.hpp" BOOST_STDLIB_CONFIG ="boost/config/stdlib/libstdcpp3.hpp" BOOST_PLATFORM_CONFIG ="boost/config/platform/linux.hpp" BOOST_HAS_THREADS [no value] BOOST_DEDUCED_TYPENAME =typename BOOST_HAS_CLOCK_GETTIME [no value] BOOST_HAS_DIRENT_H [no value] BOOST_HAS_EXPM1 [no value] BOOST_HAS_GETTIMEOFDAY [no value] BOOST_HAS_HASH [no value] BOOST_HAS_LOG1P [no value] BOOST_HAS_LONG_LONG [no value] BOOST_HAS_NANOSLEEP [no value] BOOST_HAS_NL_TYPES_H [no value] BOOST_HAS_NRVO [no value] BOOST_HAS_PARTIAL_STD_ALLOCATOR [no value] BOOST_HAS_PTHREADS [no value] BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE [no value] BOOST_HAS_PTHREAD_YIELD [no value] BOOST_HAS_SCHED_YIELD [no value] BOOST_HAS_SIGACTION [no value] BOOST_HAS_SLIST [no value] BOOST_HAS_STDINT_H [no value] BOOST_HAS_UNISTD_H [no value] BOOST_MSVC6_MEMBER_TEMPLATES [no value] BOOST_NO_0X_HDR_ARRAY [no value] BOOST_NO_0X_HDR_CHRONO [no value] BOOST_NO_0X_HDR_CODECVT [no value] BOOST_NO_0X_HDR_CONDITION_VARIABLE [no value] BOOST_NO_0X_HDR_FORWARD_LIST [no value] BOOST_NO_0X_HDR_FUTURE [no value] BOOST_NO_0X_HDR_INITIALIZER_LIST [no value] BOOST_NO_0X_HDR_MUTEX [no value] BOOST_NO_0X_HDR_RANDOM [no value] BOOST_NO_0X_HDR_RATIO [no value] BOOST_NO_0X_HDR_REGEX [no value] BOOST_NO_0X_HDR_SYSTEM_ERROR [no value] BOOST_NO_0X_HDR_THREAD [no value] BOOST_NO_0X_HDR_TUPLE [no value] BOOST_NO_0X_HDR_TYPEINDEX [no value] BOOST_NO_0X_HDR_TYPE_TRAITS [no value] BOOST_NO_0X_HDR_UNORDERED_MAP [no value] BOOST_NO_0X_HDR_UNORDERED_SET [no value] BOOST_NO_AUTO_DECLARATIONS [no value] BOOST_NO_AUTO_MULTIDECLARATIONS [no value] BOOST_NO_CHAR16_T [no value] BOOST_NO_CHAR32_T [no value] BOOST_NO_CONSTEXPR [no value] BOOST_NO_DECLTYPE [no value] BOOST_NO_DEFAULTED_FUNCTIONS [no value] BOOST_NO_DELETED_FUNCTIONS [no value] BOOST_NO_EXPLICIT_CONVERSION_OPERATORS [no value] BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS [no value] BOOST_NO_INITIALIZER_LISTS [no value] BOOST_NO_LAMBDAS [no value] BOOST_NO_MS_INT64_NUMERIC_LIMITS [no value] BOOST_NO_NOEXCEPT [no value] BOOST_NO_NULLPTR [no value] BOOST_NO_NUMERIC_LIMITS_LOWEST [no value] BOOST_NO_RAW_LITERALS [no value] BOOST_NO_RVALUE_REFERENCES [no value] BOOST_NO_SCOPED_ENUMS [no value] BOOST_NO_STATIC_ASSERT [no value] BOOST_NO_STD_UNORDERED [no value] BOOST_NO_TEMPLATE_ALIASES [no value] BOOST_NO_UNICODE_LITERALS [no value] BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX [no value] BOOST_NO_VARIADIC_TEMPLATES [no value] BOOST_STD_EXTENSION_NAMESPACE =gnu_cxx BOOST_UNREACHABLE_RETURN(0) [no value] BOOST_CONSTEXPR [no value] BOOST_CONSTEXPR_OR_CONST =const BOOST_STATIC_CONSTEXPR =static const

comment:44 by John Maddock, 7 years ago

I notice that BOOST_HAS_INT128 is not defined (which surprises me actually). Two more questions:

  • What's the processor architecture?
  • What are the command line args to GCC which trigger the error?
  • Is __SIZEOF_INT128__ defined when building?

OK, so that's 3 questions - sorry!

comment:45 by anonymous, 7 years ago

Hi it's x86_64

SIZEOF_INT128 = 16 when running from g++

int main() { #ifdef SIZEOF_INT128

std::cout << "SIZEOF_INT128 = " << SIZEOF_INT128 << std::endl;

#else

std::cout << "Nope! no SIZEOF_INT128" << std::endl;

#endif return 0; }

So I am essentially running a program in root, below is a minimal working example:

root [0] .x test.C+

And I receive this error:

Error: class,struct,union or type int128 not defined /usr/include/boost/config/suffix.hpp:30: test #include <stdio.h> #include <iostream>

#include "/home/rsmith/Desktop/boost_1_58_0/boost/filesystem/config.hpp" #include "/home/rsmith/Desktop/boost_1_58_0/boost/config/suffix.hpp"

int test()

{ std::cout<<"here" << std::endl; return 0;

}

comment:46 by anonymous, 7 years ago

Hi any further help on this issue?

comment:47 by anonymous, 7 years ago

So I am essentially running a program in root, below is a minimal working example:

root [0] .x test.C+

I'm still lost, what/where is the GCC invocation command that causes the issue?

comment:48 by anonymous, 7 years ago

Its when I run C code from root package, This is the code I run:

#include "/home/rsmith/Desktop/boost_1_58_0/boost/filesystem/config.hpp" #include "/home/rsmith/Desktop/boost_1_58_0/boost/config/suffix.hpp"

int test()

{ std::cout<<"here" << std::endl; return 0;

}

comment:49 by anonymous, 7 years ago

You shouldn't ever include boost/config/suffix.hpp on it's own, just boost/config.hpp.

And I still don't see the GCC command line that causes the issue.

Note: See TracTickets for help on using tickets.