|
Boost : |
From: Stephen Greenfield (StephenG_at_[hidden])
Date: 2024-07-10 20:32:58
Dear Boost gurus,
Building on MacOS 12.7.3, Xcode 13.4.1, C++ dialect = C++17. Deployment target is 10.15. This particular project is x86_64 architecture. Im only linking libboost_filesystem.a and libboost_iostreams.a (I show my build boost build steps at the end).
When updating from Boost 1_71_0 to 1_85_0, Im suddenly encountering these kinds of errors:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__functional/hash.h:40:5: No member named 'memcpy' in namespace 'std::__1'; did you mean simply 'memcpy'?
/Users/stephen/dev/Boost Libraries/boost_1_85_0/boost/system/detail/append_int.hpp:23:5: No member named 'snprintf' in namespace 'boost::system::detail'; did you mean simply 'snprintf'?
In file included from /Users/stephen/dev/Screenwriter/ScreenWriterX/ScreenWriterX/Screenwriter Sources/Text Engine/CThingEdit.cp:22:
In file included from ../ScreenWriterX/ScreenWriterX/Screenwriter Sources/Text Engine/CThingEdit.h:61:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:522:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/functional:500:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__functional/function.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/shared_ptr.h:25:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__memory/unique_ptr.h:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__functional/hash.h:40:5: error: no member named 'memcpy' in namespace 'std::__1'; did you mean simply 'memcpy'?
_VSTD::memcpy(&__r, __p, sizeof(__r));
^~~~~~~
In file included from <built-in>:1:
In file included from /Users/stephen/dev/Screenwriter/ScreenWriterX/ScreenWriterX/Screenwriter Sources/Screenwriter_Prefix.pch:505:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/MacTypes.h:44:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/stdbool.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:858:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
^
In file included from /Users/stephen/dev/Screenwriter/ScreenWriterX/ScreenWriterX/Screenwriter Sources/Text Engine/CThingEdit.cp:22:
In file included from ../ScreenWriterX/ScreenWriterX/Screenwriter Sources/Text Engine/CThingEdit.h:61:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:522:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/algorithm:652:
/Users/stephen/dev/Boost Libraries/boost_1_85_0/boost/compatibility/cpp_c_headers/cstring:22:11: note: 'memcpy' declared here
using ::memcpy;
^
this is for all sorts of symbols. ALSO:
Showing All Errors Only
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/filesystem:2635:5: Use of undeclared identifier '_LIBCPP_UNREACHABLE'
When including:
#include <fstream>
The libraries were build using:
./bootstrap.sh cxxflags="-arch x86_64 -arch arm64" cflags="-arch x86_64 -arch arm64" linkflags="-arch x86_64 -arch arm64"
./b2 toolset=clang-darwin target-os=darwin architecture=arm abi=aapcs cxxflags="-arch arm64" cflags="-arch arm64" linkflags="-arch arm64" -a
mkdir -p arm64 && cp stage/lib/*.* arm64
./b2 toolset=clang-darwin target-os=darwin architecture=x86 cxxflags="-arch x86_64" cflags="-arch x86_64" linkflags="-arch x86_64" abi=sysv binary-format=mach-o -a
mkdir x86_64 && cp stage/lib/*.* x86_64
The intention was for me to eventually make UNIVERSAL dylibs using lipo but for now, I just want to get my build back to functioning with Boost 1_85_0.
NOTE that Im continuing to use Boosts Filesystem even though I THINK Xcodes C++20 might now support std::filesystem.
Ive searched all over for the answer even consulted ChatGPT but havent found a solution. But this seems like something bone-headed Ive missed.
Stephen
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk