Open cameron-reed-1 opened 2 years ago
Hello,
I also opened cases with roguewave and redhat. RogueWave (SourcePro) was able to replicate the issue and sent this reply:
_**"1. In general, it should be possible to use SourcePro and Boost in the same application. However both Boost and SourcePro are large projects with a large number of components in them. There may be conflicts (like we're seeing above) between specific Boost and SourcePro components.
They also sent a test program that removed them (roguewave) from the process. According to them, this test program will also result in the issue. Please check it out and let me know what action might be taken and a time-frame.
Thanks. Cameron Reed.
//// test program
class MyInt { public: MyInt(int x) : x(x) {} private: int x; friend MyInt operator+(unsigned short lhs, const MyInt &rhs); }; MyInt operator+(unsigned short lhs, const MyInt& rhs) { return rhs; }_
By the way, I did make a mistake in my original compiler command that I sent. I had it as c++14 and that does not build on rhel7. In the meantime, I also had moved the SourcePro area. So, the last command line I used, which ran on both rhel7 and rhel8 (but errored out due to above issue on rhel8) is this:
/bin/g++ -DBUILD_64 -D_RWCONFIG_12s -O3 -Wformat -Wformat-security -fPIC -MD -fstack-protector -isystem/homes/reedca/cots/boost_1_80_0 -isystem/home/reedca/cots/sourcePro2021.1_Linux/includes -isystem/home/reedca/cots/sourcePro2021.1_Linux/includes/rw/config -m64 -std=c++11 -c /tms/pdsgit/reedca/pds-server-4/system/develop/aes/source/aes_CamsTest.cc -o /tms/pdsgit/reedca/pds-server-4/system/develop/aes/obj/Linux/aes_CamsTest.o
Hello, I wanted to follow up on this issue. I have implemented a temporary fix to some boost header files to resolve this issue.
Attaching the changed files here. Note, .hpp and .ipp files cannot be pasted here. I added a 'txt' suffix to both to allow pasting.
Hello, We are porting our product to RHEL8. Our old configuration is this:
$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.9 (Maipo) $ gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
and our NEW environent: $ cat /etc/redhat-release Red Hat Enterprise Linux release 8.6 (Ootpa)
$ gcc --version gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
In this new environment I am getting conflicts between boost and roguewave (SourcePro). Roguewave: SourceProEd2021.1-Linux64 (el8) Boost: boost_1_80_0
The EXACT same setup builds fine on rhel7 but not on rhel8 so i believe the new compiler is discovering this ambiguity whereas the old gcc compiler was able to resolve it.
I boiled it down to having two headers in the source file: here is the full source file: $cat aes_CamsTest.cc // START INCLUDES
include "boost/date_time/posix_time/posix_time.hpp"
include "rw/tools/bustring.h"
And here is the compile command: /bin/g++ -DBUILD_64 -D_RWCONFIG_12s -O3 -Wformat -Wformat-security -fPIC -MD -fstack-protector -isystem/homes/reedca/cots/boost_1_80_0 -isystem/apps64/pds/cots/rogue/SourceProEd2021.1-Linux64.el8/includes -isystem/apps64/pds/cots/rogue/SourceProEd12021.1-Linux64.el8/includes/rw/config -m64 -std=c++14 -c /tms/pdsgit/reedca/pds-server-4/system/develop/aes/source/aes_CamsTest.cc -o /tms/pdsgit/reedca/pds-server-4/system/develop/aes/obj/Linux/aes_CamsTest.o
The new error is here and is repeated several times for the various different boost date_time types: In file included from /homes/reedca/cots/boost_1_80_0/boost/date_time/gregorian/greg_duration_types.hpp:15, from /homes/reedca/cots/boost_1_80_0/boost/date_time/gregorian/gregorian_types.hpp:22, from /homes/reedca/cots/boost_1_80_0/boost/date_time/posix_time/posix_time_config.hpp:18, from /homes/reedca/cots/boost_1_80_0/boost/date_time/posix_time/posix_time_system.hpp:13, from /homes/reedca/cots/boost_1_80_0/boost/date_time/posix_time/ptime.hpp:12, from /homes/reedca/cots/boost_1_80_0/boost/date_time/posix_time/posix_time.hpp:15, from /tms/pdsgit/reedca/pds-server-4/system/develop/aes/source/aes_CamsTest.cc:2: /homes/reedca/cots/boost_1_80_0/boost/date_time/adjust_functors.hpp: In instantiation of 'boost::date_time::month_functor::duration_type boost::date_time::month_functor::get_offset(const date_type&) const [with date_type = boost::gregorian::date; boost::date_time::month_functor::duration_type = boost::gregorian::date_duration]':
/homes/reedca/cots/boost_1_80_0/boost/date_time/date_duration_types.hpp:67:16: required from 'constexpr boost::date_time::months_duration::duration_type boost::date_time::months_duration::get_offset(const date_type&) const [with base_config = boost::gregorian::greg_durations_config; boost::date_time::months_duration::duration_type = boost::gregorian::date_duration; boost::date_time::months_duration::date_type = boost::gregorian::date]'
/homes/reedca/cots/boost_1_80_0/boost/date_time/posix_time/date_duration_operators.hpp:33:37: required from here
/homes/reedca/cots/boost_1_80_0/boost/date_time/adjust_functors.hpp:71:110: error: ambiguous overload for 'operator+' (operand types are 'boost::gregorian::greg_year' and 'int')
const typename ymd_type::year_type year(static_cast(ymd.year + wi.add(f_)));