Summary: | devel/msp430-debug-stack: fails to build with boost 1.66 | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> |
Component: | Individual Port(s) | Assignee: | Lev A. Serebryakov <lev> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | Keywords: | needs-patch |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(lev) |
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 223922 |
Description
Jan Beich
![]() It looks like some conflict between new boost and new C++ std:: library, not a problem of msp430-debug-stack. I don't think I know about modern C++ and boost well enough to fix this. (In reply to Lev A. Serebryakov from comment #1) > It looks like some conflict between new boost and new C++ std:: library ThirdParty/BSL430_DLL/BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceUSB.cpp has using namespace std; using namespace::boost::asio; which is not safe after https://github.com/boostorg/asio/commit/b60e92b13ef6#diff-75d3b30d4f814d756ef0bfdbb142c37f (In reply to Lev A. Serebryakov from comment #1) > I don't think I know about modern C++ and boost well enough to fix this. A quick fix (for same behavior as Boost 1.65) is to prepend std:: for chrono conflicts. Otherwise, report upstream. Maybe they'd want to drop either/both "using namespace" lines. Thank you for explanation. I'm afraid, upstream is very unresponsive (it is Texas Instruments and their attitude to open source is strange, to say less), but I'll commit patch ASAP. A commit references this bug: Author: lev Date: Tue Dec 5 12:12:28 UTC 2017 New revision: 455578 URL: https://svnweb.freebsd.org/changeset/ports/455578 Log: Fix namespace conflict for new Boost. PR: 224094 Reported by: jbeich@FreeBSD.org Changes: head/devel/msp430-debug-stack/Makefile head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceUSB.cpp Thank you for help! Unfortunately, that's not the end of namespace ambiguity: BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:196:25: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:198:25: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:200:25: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:202:25: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:206:27: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:212:27: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(10)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ BSL430_DLL/Physical_Interfaces/MSPBSL_PhysicalInterfaceSerialUART.cpp:216:25: error: reference to 'chrono' is ambiguous this_thread::sleep_for(chrono::milliseconds(250)); ^ /usr/include/c++/v1/chrono:881:11: note: candidate found by name lookup is 'std::__1::chrono' namespace chrono { ^ /usr/local/include/boost/asio/detail/chrono.hpp:28:11: note: candidate found by name lookup is 'boost::asio::chrono' namespace chrono { ^ 7 errors generated. build log: http://sprunge.us/JAie A commit references this bug: Author: lev Date: Tue Dec 5 15:57:27 UTC 2017 New revision: 455587 URL: https://svnweb.freebsd.org/changeset/ports/455587 Log: Second try to fix compatibility with new boost PR: 224094 Reported by: jbeich@FreeBSD.org Changes: head/devel/msp430-debug-stack/Makefile head/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_FetControl.cpp head/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_DLL430_OldApiV3.cpp head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_ConfigManager.cpp head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerFet.cpp head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UpdateManagerMSP_FET430.cpp head/devel/msp430-debug-stack/files/patch-Makefile head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430_DLL_BSL430_DLL_Connections_MSPBSL_Connection5xxUSB.cpp head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430_DLL_BSL430_DLL_MSPBSL_Factory.cpp head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430_DLL_BSL430_DLL_Physical_Interfaces_MSPBSL_PhysicalInterfaceSerialUART.cpp head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_BSL430__DLL_Physical__Interfaces_MSPBSL__PhysicalInterfaceUSB.cpp head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430__DLL_Makefile After ports r455587 the port still fails to build with Boost 1.66. I wonder if something like https://github.com/arvidn/libtorrent/commit/f42b63c7ea82 would help. In file included from DLL430_v3/src/TI/DLL430/IoChannelFactory.cpp:40: ./DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.h:76:17: error: no type named 'io_service' in namespace 'boost::asio' boost::asio::io_service* ioService; ~~~~~~~~~~~~~^ DLL430_v3/src/TI/DLL430/IoChannelFactory.cpp:65:32: error: assigning to 'TI::DLL430::IoChannel *' from incompatible type 'TI::DLL430::UsbCdcIoChannel *' case PortInfo::CDC: channel = new UsbCdcIoChannel(portInfo); break; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. build log: http://sprunge.us/gWfB And one more: DLL430_v3/src/TI/DLL430/UsbCdcIoChannel.cpp:378:31: error: no type named 'io_service' in namespace 'boost::asio' ioService = new boost::asio::io_service; ~~~~~~~~~~~~~^ 1 error generated. Replacing io_service with io_context was enough for the build to succeed. A commit references this bug: Author: lev Date: Tue Dec 5 17:06:49 UTC 2017 New revision: 455593 URL: https://svnweb.freebsd.org/changeset/ports/455593 Log: Third round of adapting port to new boost 1.66 PR: 224094 Reported by: jbeich@FreeBSD.org Changes: head/devel/msp430-debug-stack/Makefile head/devel/msp430-debug-stack/files/patch-DLL430__v3_src_TI_DLL430_UsbCdcIoChannel.cpp head/devel/msp430-debug-stack/files/patch-DLL430_v3_src_TI_DLL430_UsbCdcIoChannel.h head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430_DLL_BSL430_DLL_Physical_Interfaces_MSPBSL_PhysicalInterfaceSerialUART.cpp head/devel/msp430-debug-stack/files/patch-ThirdParty_BSL430_DLL_BSL430_DLL_Physical_Interfaces_MSPBSL_PhysicalInterfaceSerialUART.h At least! I'm sorry for all this mess. I confirm, msp430-debug-stack (this port) now builds fine with Boost 1.66 on 10.3 i386/amd64, 11.1 i386/amd64, 12.0 i386/amd64. |