|
Boost : |
From: Stephen Greenfield (StephenG_at_[hidden])
Date: 2024-07-11 18:47:00
Richard
> This usually happens because you're compiling with one standard library
> (e.g. libc++, the default on clang) while your boost libraries were
> compiled with another (e.g. libstdc++, the default on gcc).
That makes sense.
Does my MacOS program need to be compiled for GCC (IE GNU C++17 / GNU C++20), and then linked with libstdc++ to be compatible with the default build of Boost, or the opposite: build Boost and link with libc++?
I saw that theres a list of toolsets, but in the getting started with unix variants, included with the 1_85_0 .zip package, there is no listing for toolset=clang or toolset=clang-darwin. Nor is there any mention of clang on:
https://www.boost.org/doc/libs/1_85_0/more/getting_started/unix-variants.html
Stephen
-- ------------------------------ Message: 5 Date: Thu, 11 Jul 2024 09:43:01 +0200 From: Richard Hodges <hodges.r_at_[hidden]> To: boost_at_[hidden] Subject: Re: [boost] Updating from 1_71_0 to 1_85_0: "No member named 'memcpy' in namespace 'std::__1'" Message-ID: <CALvx3haD3uRR4sXjjDq5Hrw4XoTq11HMqQyq2D5taJQzH7ys7A_at_[hidden]> Content-Type: text/plain; charset="UTF-8" This usually happens because you're compiling with one standard library (e.g. libc++, the default on clang) while your boost libraries were compiled with another (e.g. libstdc++, the default on gcc). R On Thu, 11 Jul 2024 at 02:21, Stephen Greenfield via Boost < boost_at_[hidden]> wrote: > 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. I?m 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, I?m 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 I?m continuing to use Boost?s Filesystem ? even though I THINK > Xcode?s C++20 might now support std::filesystem. > > I?ve searched all over for the answer ? even consulted ChatGPT ? but > haven?t found a solution. But this seems like something bone-headed I?ve > missed. > > Stephen > > _______________________________________________ > Unsubscribe & other changes: > http://lists.boost.org/mailman/listinfo.cgi/boost > ------------------------------ Subject: Digest Footer _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost ------------------------------ End of Boost Digest, Vol 7279, Issue 2 **************************************
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk