Opened 12 years ago
Closed 10 years ago
#5048 closed Bugs (fixed)
compilation error under ia64 HP-UX11i with gcc-4.4.0
Reported by: | Owned by: | Beman Dawes | |
---|---|---|---|
Milestone: | To Be Determined | Component: | filesystem |
Version: | Boost 1.52.0 | Severity: | Problem |
Keywords: | HP-UX | Cc: |
Description
The error is:
« In file included from libs/filesystem/v3/src/utf8_codecvt_facet.cpp:19: ./libs/detail/utf8_codecvt_facet.cpp:255:7: error: missing binary operator before token "("
"g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -pthread -fPIC -mlp64 -DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -I"." -c -o "bin.v2/libs/filesystem/build/gcc-4.4.0/debug/threading-multi/v3/src/utf8_codecvt_facet.o" "libs/filesystem/v3/src/utf8_codecvt_facet.cpp"
...failed gcc.compile.c++ bin.v2/libs/filesystem/build/gcc-4.4.0/debug/threading-multi/v3/src/utf8_codecvt_facet.o... »
I solved the problem with the attached patch
Attachments (1)
Change History (9)
by , 12 years ago
Attachment: | boost_1_45_filesystem_gcc_hpux_patch added |
---|
comment:1 by , 12 years ago
Fixing the problem by defining _INCLUDE_STDCSOURCE_199901 in the jamfile solves the problem for those who use Boost.Build, but doesn't solve it for those who build via some other build system.
The preferred fix would be to add a #define _INCLUDE_STDCSOURCE_199901 somewhere, perhaps <boost/config/platform/hpux.hpp>.
Is that a workable solution? What does _INCLUDE_STDCSOURCE_199901 actually do?
--Beman
comment:2 by , 12 years ago
Indeed, changing the jam file isn't the best way.
Answering your questions: a) yes, defining in <boost/config/platform/hpux.hpp> works fine; b) the reason why the definition is required is referred in file wchar.h, as follows:
/* C99 stds require WCHAR_MAX and WCHAR_MIN to be macros which
can be used in #if constructs, hence, can't have casts Retaining the old macros for compatibility
*/
# if defined(_INCLUDE_STDCSOURCE_199901) # define WCHAR_MAX UINT_MAX /* max value of an unsigned integer */ # define WCHAR_MIN 0 # else # define WCHAR_MAX (wchar_t)UINT_MAX /* max value of an unsigned integer */ # define WCHAR_MIN (wchar_t)0 # endif
follow-up: 4 comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 6 comment:4 by , 10 years ago
Replying to bemandawes:
I'm updating from 1.45 to 1.52 now and I can tell this does not solve the problem. For some reason the define is required before getting to include this header. To compile successfully I had to define _INCLUDE_STDCSOURCE_199901 globally.
comment:5 by , 10 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Version: | Boost 1.45.0 → Boost 1.52.0 |
follow-up: 7 comment:6 by , 10 years ago
Replying to ruipfernandes@…:
Replying to bemandawes:
I'm updating from 1.45 to 1.52 now and I can tell this does not solve the problem. For some reason the define is required before getting to include this header. To compile successfully I had to define _INCLUDE_STDCSOURCE_199901 globally.
I found what the problem is: the define is misspelled. Please fix to: _INCLUDE_STDCSOURCE_199901
comment:7 by , 10 years ago
Replying to anonymous:
Replying to ruipfernandes@…:
Replying to bemandawes:
I'm updating from 1.45 to 1.52 now and I can tell this does not solve the problem. For some reason the define is required before getting to include this header. To compile successfully I had to define _INCLUDE_STDCSOURCE_199901 globally.
I found what the problem is: the define is misspelled. Please fix to:
_INCLUDE_STDC__SOURCE_199901
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
patch