[
https://issues.apache.org/jira/browse/XERCESC-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Roger Leigh closed XERCESC-2113.
--------------------------------
Resolution: Invalid
This one is a bit strange. Building xerces in isolation, everything is working
fine.
This is working:
cd
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xt2/src
&& /usr/bin/CC -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1
-D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS -isystem
/usr/local/include
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xt2
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xt2/src
-Wall -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wextra -Wformat=2
-Wimplicit-atomic-properties -Wmissing-declarations -Wno-long-long
-Woverlength-strings -Woverloaded-virtual -Wredundant-decls -Wreorder
-Wswitch-default -Wunused-variable -Wwrite-strings -Wno-variadic-macros
-fstrict-aliasing -msse2 -O3 -DNDEBUG -fPIC -pthread -std=gnu++14 -o
CMakeFiles/xerces-c.dir/xercesc/util/Base64.cpp.o -c
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src/xercesc/util/Base64.cpp
This is failing:
cd
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-build/src
&& /usr/bin/CC -DHAVE_CONFIG_H=1 -DXERCES_BUILDING_LIBRARY=1
-D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE=1 -Dxerces_c_EXPORTS -I/usr/local/include
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-build
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src
-I/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-build/src
-isystem
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/stage/include
-Wall -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wextra -Wformat=2
-Wimplicit-atomic-properties -Wmissing-declarations -Wno-long-long
-Woverlength-strings -Woverloaded-virtual -Wredundant-decls -Wreorder
-Wswitch-default -Wunused-variable -Wwrite-strings -Wno-variadic-macros
-fstrict-aliasing -msse2 -O3 -DNDEBUG -fPIC -pthread -std=gnu++14 -o
CMakeFiles/xerces-c.dir/xercesc/util/Base64.cpp.o -c
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src/xercesc/util/Base64.cpp
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src/xercesc/util/Base64.cpp:149:14:
error:
use of undeclared identifier 'XERCES_SIZE_MAX'
else if (XERCES_SIZE_MAX - inputLength < 2) {
^
1 error generated.
It's all down to using -I/usr/local/include and not -isystem /usr/local/include
which is a bit odd.
If I update Base64.cpp to include config.h, I get a warning about
/usr/local/include/xercesc/util/Xerces_autoconf_config.hpp:65:9: warning:
'XERCES_XMLCH_T' macro redefined [-Wmacro-redefined]
but it all works. But it then fails with
[ 1%] Building CXX object
src/CMakeFiles/xerces-c.dir/xercesc/util/BinInputStream.cpp.o
/opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src/xercesc/util/BinInputStream.cpp:48:30:
error:
out-of-line definition of 'getEncoding' does not match any declaration in
'xercesc_3_1::BinInputStream'
const XMLCh* BinInputStream::getEncoding() const
^~~~~~~~~~~
I think what's happening here is that the xerces 3.1 headers in /usr/local are
being included in preference to those in the source tree. This is definitely
not a xerces problem; it's my problem, so I'll close this.
> Base64.cpp missing config.h include
> -----------------------------------
>
> Key: XERCESC-2113
> URL: https://issues.apache.org/jira/browse/XERCESC-2113
> Project: Xerces-C++
> Issue Type: Bug
> Components: Build, Utilities
> Affects Versions: 3.2.0
> Reporter: Roger Leigh
>
> {{{
> 13:04:43
> /opt/hudson/workspace/OME-FILES-CPP-DEV-merge-superbuild/BUILD_TYPE/Release/node/brill/build/xerces-source/src/xercesc/util/Base64.cpp:149:14:
> error: use of undeclared identifier 'XERCES_SIZE_MAX'
> 13:04:43 else if (XERCES_SIZE_MAX - inputLength < 2) {
> 13:04:43 ^
> }}}
> I think this is because of a missing stdint.h include. This is provided by
> config.h, but there's no config.h include in Base64.cpp. Other platforms
> must be getting this via an indirect include.
> Note that this also has other portability implications (though they don't
> need tackling right now). Using size_t implies using SIZE_MAX, but SIZE_MAX
> requires stdint.h. stdint.h was previously optional, with fallbacks used if
> not present, but this makes it effectively mandatory, making all of the other
> integer portability logic redundant. i.e. we could just require
> stdint.h/cstdint unconditionally and drop all of the other logic.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]