Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./build.sh failed #429

Open
peakedshout opened this issue Sep 14, 2024 · 11 comments
Open

./build.sh failed #429

peakedshout opened this issue Sep 14, 2024 · 11 comments

Comments

@peakedshout
Copy link

#23 143.0 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/InterfaceFile.cpp.o
#23 143.7 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o
#23 144.0 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o
#23 144.2 /osxcross/build/apple-libtapi/src/tapi/lib/Core/FileListReader.cpp:152:10: error: no viable conversion from returned value of type 'std::unique_ptr<FileListReader>' to function return type 'Expected<std::unique_ptr<FileListReader> >'
#23 144.2   return reader;
#23 144.2          ^~~~~~
#23 144.2 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'const llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > > &' for 1st argument
#23 144.2 template <class T> class LLVM_NODISCARD Expected {
#23 144.2                                         ^
#23 144.2 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::Error' for 1st argument
#23 144.2   Expected(Error Err)
#23 144.2   ^
#23 144.2 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::ErrorSuccess' for 1st argument
#23 144.2   Expected(ErrorSuccess) = delete;
#23 144.2   ^
#23 144.2 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > > &&' for 1st argument
#23 144.2   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#23 144.2   ^
#23 144.2 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > &]
#23 144.2     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#23 144.2                                            ^
#23 144.2 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr'
#23 144.2   Expected(
#23 144.2   ^
#23 144.2 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/PackedVersion.cpp.o
#23 144.3 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/Path.cpp.o
#23 144.3 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/ReexportFileWriter.cpp.o
#23 144.4 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/Registry.cpp.o
#23 144.4 1 error generated.
#23 144.4 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:153: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o' failed
#23 144.4 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o] Error 1
#23 144.4 make[3]: *** Waiting for unfinished jobs....
#23 144.9 /osxcross/build/apple-libtapi/src/tapi/lib/Core/APIJSONSerializer.cpp:1195:10: error: no viable conversion from returned value of type 'tapi::internal::API' to function return type 'Expected<tapi::internal::API>'
#23 144.9   return result;
#23 144.9          ^~~~~~
#23 144.9 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tapi::internal::API' to 'const llvm::Expected<tapi::internal::API> &' for 1st argument
#23 144.9 template <class T> class LLVM_NODISCARD Expected {
#23 144.9                                         ^
#23 144.9 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Error' for 1st argument
#23 144.9   Expected(Error Err)
#23 144.9   ^
#23 144.9 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::ErrorSuccess' for 1st argument
#23 144.9   Expected(ErrorSuccess) = delete;
#23 144.9   ^
#23 144.9 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Expected<tapi::internal::API> &&' for 1st argument
#23 144.9   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#23 144.9   ^
#23 144.9 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = tapi::internal::API &]
#23 144.9     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#23 144.9                                            ^
#23 144.9 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected<type-parameter-0-0>' against 'tapi::internal::API'
#23 144.9   Expected(
#23 144.9   ^
#23 145.2 1 error generated.
#23 145.2 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o] Error 1
#23 145.2 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:75: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o' failed
#23 145.6 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachODylibReader.cpp:167:10: error: no viable conversion from returned value of type 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to function return type 'Expected<std::unique_ptr<InterfaceFile> >'
#23 145.6   return file;
#23 145.6          ^~~~
#23 145.6 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'const llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > > &' for 1st argument
#23 145.6 template <class T> class LLVM_NODISCARD Expected {
#23 145.6                                         ^
#23 145.6 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::Error' for 1st argument
#23 145.6   Expected(Error Err)
#23 145.6   ^
#23 145.6 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::ErrorSuccess' for 1st argument
#23 145.6   Expected(ErrorSuccess) = delete;
#23 145.6   ^
#23 145.6 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > > &&' for 1st argument
#23 145.6   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#23 145.6   ^
#23 145.6 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > &]
#23 145.6     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#23 145.6                                            ^
#23 145.6 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr'
#23 145.6   Expected(
#23 145.6   ^
#23 145.8 1 error generated.
#23 145.8 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o] Error 1
#23 145.8 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:244: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o' failed
#23 146.3 /osxcross/build/apple-libtapi/src/tapi/lib/Core/Framework.cpp:44:17: warning: unused variable 'n' [-Wunused-variable]
#23 146.3   else if (auto n = filename.consume_back(".swiftinterface"))
#23 146.3                 ^
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:15:
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/MachOReader.h:18:
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:18:
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/APICommon.h:19:
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/ADT/BitmaskEnum.h:16:
#23 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/MathExtras.h:17:
#23 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/algorithm:62:
#23 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_algo.h:62:
#23 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_tempbuf.h:60:
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_construct.h:75:38: error: call to implicitly-deleted copy constructor of 'std::pair<llvm::MachO::Architecture, tapi::internal::API>'
#23 146.5     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
#23 146.5                                      ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:75:8: note: in instantiation of function template specialization 'std::_Construct<std::pair<llvm::MachO::Architecture, tapi::internal::API>, const std::pair<llvm::MachO::Architecture, tapi::internal::API> &>' requested here
#23 146.5                 std::_Construct(std::__addressof(*__cur), *__first);
#23 146.5                      ^
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:126:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *>' requested here
#23 146.5         __uninit_copy(__first, __last, __result);
#23 146.5         ^
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:281:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *>' requested here
#23 146.5     { return std::uninitialized_copy(__first, __last, __result); }
#23 146.5                   ^
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:324:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::pair<llvm::MachO::Architecture, tapi::internal::API> >' requested here
#23 146.5           std::__uninitialized_copy_a(__x.begin(), __x.end(),
#23 146.5                ^
#23 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:489:24: note: in instantiation of member function 'std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > >::vector' requested here
#23 146.5     new (getStorage()) storage_type(std::forward<OtherT>(Val));
#23 146.5                        ^
#23 146.5 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:704:12: note: in instantiation of function template specialization 'llvm::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > &>' requested here
#23 146.5     return results;
#23 146.5            ^
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:288:17: note: explicitly defaulted function was implicitly deleted here
#23 146.5       constexpr pair(const pair&) = default;
#23 146.5                 ^
#23 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:200:11: note: copy constructor of 'pair<llvm::MachO::Architecture, tapi::internal::API>' is implicitly deleted because field 'second' has a deleted copy constructor
#23 146.5       _T2 second;                /// @c second is a copy of the second object
#23 146.5           ^
#23 146.5 /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:381:26: note: copy constructor of 'API' is implicitly deleted because field 'allocator' has a deleted copy constructor
#23 146.5   llvm::BumpPtrAllocator allocator;
#23 146.5                          ^
#23 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Allocator.h:87:3: note: copy constructor is implicitly deleted because 'BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096, 128>' has a user-declared move constructor
#23 146.5   BumpPtrAllocatorImpl(BumpPtrAllocatorImpl &&Old)
#23 146.5   ^
#23 146.5 1 error generated.
#23 146.5 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o] Error 1
#23 146.5 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:257: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o' failed
#23 146.7 [100%] Linking CXX static library ../../../../../../lib/libtapiObjCMetadata.a
#23 146.7 [100%] Built target tapiObjCMetadata
#23 146.8 1 warning generated.
#23 146.8 make[2]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all] Error 2
#23 146.8 CMakeFiles/Makefile2:41118: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all' failed
#23 146.8 make[1]: *** [tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule] Error 2
#23 146.8 CMakeFiles/Makefile2:41771: recipe for target 'tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule' failed
#23 146.8 Makefile:11522: recipe for target 'libtapi' failed
#23 146.8 make: *** [libtapi] Error 2
#23 146.8 + _exit
#23 146.8 + EC=2
#23 146.8 + '[' 2 -ne 0 ']'
#23 146.8 + test -z build.sh
#23 146.8 
#23 146.8 exiting with abnormal exit code (2)
#23 146.8 + echo ''
#23 146.8 + echo 'exiting with abnormal exit code (2)'
#23 146.8 + test -n 1
#23 146.8 + '[' -n apple-libtapi ']'
#23 146.8 + rm -f 'build/*_built_successfully'
#23 146.8 + echo ''
#23 146.8 
#23 146.8 + test build.sh = build.sh
#23 146.8 + check_for_bug_1242300
#23 146.8 + '[' -e /etc/issue ']'
#23 146.8 ++ grep -i ubuntu.13.10 /etc/issue
#23 146.8 + '[' '' ']'
#23 ERROR: process "/bin/sh -c UNATTENDED=1 SDK_VERSION=14.5 OSX_VERSION_MIN=10.13 TARGET_DIR=/usr/local/osxcross OCDEBUG=1 ./build.sh" did not complete successfully: exit code: 2

I build using Xcode_15.4.xip but I get an error, am I missing something?

@tpoechtrager
Copy link
Owner

It's very likely your gcc (libstdc++) installation is too old.

@peakedshout
Copy link
Author

It's very likely your gcc (libstdc++) installation is too old.

#19 [15/22] RUN echo $(gcc --version)
#19 0.160 gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#19 DONE 0.2s

This is the gcc I installed via apt-get, is this old?
I tried running ./build_gcc.sh but got an error and I was dazzled by my inability to extract the reason for my error.

#21 [17/22] RUN OCDEBUG=1 ./build_gcc.sh
#21 0.219 ++ '[' -z '' ']'
#21 0.219 +++ tools/get_cpu_count.sh
#21 0.224 ++ JOBS=28
#21 0.224 ++ '[' build_gcc.sh '!=' build.sh ']'
#21 0.225 +++ tools/osxcross_conf.sh
#21 0.236 ++ res='export OSXCROSS_VERSION=0.14
#21 0.236 export OSXCROSS_OSX_VERSION_MIN=10.10
#21 0.236 export OSXCROSS_TARGET=darwin15
#21 0.236 export OSXCROSS_SDK_VERSION=10.11
#21 0.236 export OSXCROSS_SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 export OSXCROSS_TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 export OSXCROSS_PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 export OSXCROSS_TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 export OSXCROSS_BUILD_DIR=/tmp/osxcross/build
#21 0.236 export OSXCROSS_CCTOOLS_PATH=/usr/osxcross/bin
#21 0.236 export OSXCROSS_LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.236 export OSXCROSS_LINKER_VERSION=264.3.102
#21 0.236 
#21 0.236 export PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/osxcross/bin'
#21 0.236 ++ '[' -z 'export OSXCROSS_VERSION=0.14
#21 0.236 export OSXCROSS_OSX_VERSION_MIN=10.10
#21 0.236 export OSXCROSS_TARGET=darwin15
#21 0.236 export OSXCROSS_SDK_VERSION=10.11
#21 0.236 export OSXCROSS_SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 export OSXCROSS_TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 export OSXCROSS_PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 export OSXCROSS_TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 export OSXCROSS_BUILD_DIR=/tmp/osxcross/build
#21 0.236 export OSXCROSS_CCTOOLS_PATH=/usr/osxcross/bin
#21 0.236 export OSXCROSS_LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.236 export OSXCROSS_LINKER_VERSION=264.3.102
#21 0.236 
#21 0.236 export PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/osxcross/bin' ']'
#21 0.236 ++ '[' -z '' ']'
#21 0.236 ++ eval 'export OSXCROSS_VERSION=0.14
#21 0.236 export OSXCROSS_OSX_VERSION_MIN=10.10
#21 0.236 export OSXCROSS_TARGET=darwin15
#21 0.236 export OSXCROSS_SDK_VERSION=10.11
#21 0.236 export OSXCROSS_SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 export OSXCROSS_TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 export OSXCROSS_PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 export OSXCROSS_TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 export OSXCROSS_BUILD_DIR=/tmp/osxcross/build
#21 0.236 export OSXCROSS_CCTOOLS_PATH=/usr/osxcross/bin
#21 0.236 export OSXCROSS_LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.236 export OSXCROSS_LINKER_VERSION=264.3.102
#21 0.236 
#21 0.236 export PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/osxcross/bin'
#21 0.236 +++ export OSXCROSS_VERSION=0.14
#21 0.236 +++ OSXCROSS_VERSION=0.14
#21 0.236 +++ export OSXCROSS_OSX_VERSION_MIN=10.10
#21 0.236 +++ OSXCROSS_OSX_VERSION_MIN=10.10
#21 0.236 +++ export OSXCROSS_TARGET=darwin15
#21 0.236 +++ OSXCROSS_TARGET=darwin15
#21 0.236 +++ export OSXCROSS_SDK_VERSION=10.11
#21 0.236 +++ OSXCROSS_SDK_VERSION=10.11
#21 0.236 +++ export OSXCROSS_SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 +++ OSXCROSS_SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 +++ export OSXCROSS_TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 +++ OSXCROSS_TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 +++ export OSXCROSS_PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 +++ OSXCROSS_PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 +++ export OSXCROSS_TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 +++ OSXCROSS_TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 +++ export OSXCROSS_BUILD_DIR=/tmp/osxcross/build
#21 0.236 +++ OSXCROSS_BUILD_DIR=/tmp/osxcross/build
#21 0.236 +++ export OSXCROSS_CCTOOLS_PATH=/usr/osxcross/bin
#21 0.236 +++ OSXCROSS_CCTOOLS_PATH=/usr/osxcross/bin
#21 0.236 +++ export OSXCROSS_LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.236 +++ OSXCROSS_LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.236 +++ export OSXCROSS_LINKER_VERSION=264.3.102
#21 0.236 +++ OSXCROSS_LINKER_VERSION=264.3.102
#21 0.236 +++ export PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/osxcross/bin
#21 0.236 +++ PATH=/opt/cmake-3.14.5-Linux-x86_64/bin:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/osxcross/bin
#21 0.236 ++ set_path_vars
#21 0.236 ++ '[' -n 0.14 ']'
#21 0.236 ++ export VERSION=0.14
#21 0.236 ++ VERSION=0.14
#21 0.236 ++ export OSX_VERSION_MIN=10.10
#21 0.236 ++ OSX_VERSION_MIN=10.10
#21 0.236 ++ export TARGET=darwin15
#21 0.236 ++ TARGET=darwin15
#21 0.236 ++ export BASE_DIR=
#21 0.236 ++ BASE_DIR=
#21 0.236 ++ export TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 ++ TARBALL_DIR=/usr/osxcross/bin/../../tarballs
#21 0.236 ++ export BUILD_DIR=/tmp/osxcross/build
#21 0.236 ++ BUILD_DIR=/tmp/osxcross/build
#21 0.236 ++ export TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 ++ TARGET_DIR=/usr/osxcross/bin/..
#21 0.236 ++ export TARGET_DIR_SDK_TOOLS=/usr/osxcross/bin/../SDK/tools
#21 0.236 ++ TARGET_DIR_SDK_TOOLS=/usr/osxcross/bin/../SDK/tools
#21 0.236 ++ export PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 ++ PATCH_DIR=/usr/osxcross/bin/../../patches
#21 0.236 ++ export SDK_DIR=
#21 0.236 ++ SDK_DIR=
#21 0.236 ++ export SDK_VERSION=10.11
#21 0.236 ++ SDK_VERSION=10.11
#21 0.236 ++ export SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.236 ++ SDK=/usr/osxcross/bin/../SDK/MacOSX10.11.sdk
#21 0.237 ++ export LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.237 ++ LIBLTO_PATH=/usr/lib/llvm-3.8/lib
#21 0.237 ++ export LINKER_VERSION=264.3.102
#21 0.237 ++ LINKER_VERSION=264.3.102
#21 0.237 ++ unset OSXCROSS_VERSION OSXCROSS_OSX_VERSION_MIN
#21 0.237 ++ unset OSXCROSS_TARGET OSXCROSS_BASE_DIR
#21 0.237 ++ unset OSXCROSS_SDK_VERSION OSXCROSS_SDK
#21 0.237 ++ unset OSXCROSS_SDK_DIR OSXCROSS_TARBALL_DIR
#21 0.237 ++ unset OSXCROSS_PATCH_DIR OSXCROSS_TARGET_DIR
#21 0.237 ++ unset OSXCROSS_BUILD_DIR OSXCROSS_CCTOOLS_PATH
#21 0.237 ++ unset OSXCROSS_LIBLTO_PATH OSXCROSS_LINKER_VERSION
#21 0.238 ++ set -e
#21 0.238 + '[' -z '' ']'
#21 0.238 + GCC_VERSION=13.2.0
#21 0.239 ++ osxcross-cmp 10.10 '<=' 10.5
#21 0.241 + '[' 0 -eq 1 ']'
#21 0.241 + GCC_MIRROR=https://ftp.gnu.org/pub/gnu/gcc
#21 0.241 + GCC_MIRROR_WITH_SNAPSHOTS=https://mirror.koddos.net/gcc
#21 0.241 + pushd /tmp/osxcross/build
#21 ERROR: process "/bin/sh -c OCDEBUG=1 ./build_gcc.sh" did not complete successfully: exit code: 1

@peakedshout
Copy link
Author

It's very likely your gcc (libstdc++) installation is too old.

#21 [17/24] RUN gcc --version && g++ --version
#21 0.173 gcc (GCC) 12.2.0
#21 0.173 Copyright (C) 2022 Free Software Foundation, Inc.
#21 0.173 This is free software; see the source for copying conditions.  There is NO
#21 0.173 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#21 0.173 
#21 0.174 g++ (GCC) 12.2.0
#21 0.174 Copyright (C) 2022 Free Software Foundation, Inc.
#21 0.174 This is free software; see the source for copying conditions.  There is NO
#21 0.174 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#21 0.174 
#21 DONE 0.2s

I tried to use gcc 12.2.0 to compile, but problems still occurred.

#26 143.8 [100%] Building CXX object tools/clang/tools/tapi/lib/ObjCMetadata/CMakeFiles/tapiObjCMetadata.dir/ObjCMachOBinary.cpp.o
#26 143.8 [100%] Building CXX object tools/clang/tools/tapi/lib/ObjCMetadata/CMakeFiles/tapiObjCMetadata.dir/ObjCMetadata.cpp.o
#26 143.9 Scanning dependencies of target tapiCore
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/AvailabilityInfo.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIVisitor.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIPrinter.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/API.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FakeSymbols.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/ClangDiagnostics.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileManager.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileSystem.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/Framework.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/InterfaceFile.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/HeaderFile.cpp.o
#26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/InterfaceFileManager.cpp.o
#26 144.5 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o
#26 144.6 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o
#26 144.8 /osxcross/build/apple-libtapi/src/tapi/lib/Core/FileListReader.cpp:152:10: error: no viable conversion from returned value of type 'std::unique_ptr<FileListReader>' to function return type 'Expected<std::unique_ptr<FileListReader> >'
#26 144.8   return reader;
#26 144.8          ^~~~~~
#26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'const llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > > &' for 1st argument
#26 144.8 template <class T> class LLVM_NODISCARD Expected {
#26 144.8                                         ^
#26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::Error' for 1st argument
#26 144.8   Expected(Error Err)
#26 144.8   ^
#26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::ErrorSuccess' for 1st argument
#26 144.8   Expected(ErrorSuccess) = delete;
#26 144.8   ^
#26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<FileListReader>' to 'llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > > &&' for 1st argument
#26 144.8   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#26 144.8   ^
#26 144.8 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::FileListReader, std::default_delete<tapi::internal::FileListReader> > &]
#26 144.8     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#26 144.8                                            ^
#26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr'
#26 144.8   Expected(
#26 144.8   ^
#26 144.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/PackedVersion.cpp.o
#26 145.0 1 error generated.
#26 145.0 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:153: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o' failed
#26 145.0 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o] Error 1
#26 145.0 make[3]: *** Waiting for unfinished jobs....
#26 145.8 /osxcross/build/apple-libtapi/src/tapi/lib/Core/APIJSONSerializer.cpp:1195:10: error: no viable conversion from returned value of type 'tapi::internal::API' to function return type 'Expected<tapi::internal::API>'
#26 145.8   return result;
#26 145.8          ^~~~~~
#26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tapi::internal::API' to 'const llvm::Expected<tapi::internal::API> &' for 1st argument
#26 145.8 template <class T> class LLVM_NODISCARD Expected {
#26 145.8                                         ^
#26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Error' for 1st argument
#26 145.8   Expected(Error Err)
#26 145.8   ^
#26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::ErrorSuccess' for 1st argument
#26 145.8   Expected(ErrorSuccess) = delete;
#26 145.8   ^
#26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Expected<tapi::internal::API> &&' for 1st argument
#26 145.8   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#26 145.8   ^
#26 145.8 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = tapi::internal::API &]
#26 145.8     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#26 145.8                                            ^
#26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected<type-parameter-0-0>' against 'tapi::internal::API'
#26 145.8   Expected(
#26 145.8   ^
#26 146.1 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachODylibReader.cpp:167:10: error: no viable conversion from returned value of type 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to function return type 'Expected<std::unique_ptr<InterfaceFile> >'
#26 146.1   return file;
#26 146.1          ^~~~
#26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'const llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > > &' for 1st argument
#26 146.1 template <class T> class LLVM_NODISCARD Expected {
#26 146.1                                         ^
#26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::Error' for 1st argument
#26 146.1   Expected(Error Err)
#26 146.1   ^
#26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::ErrorSuccess' for 1st argument
#26 146.1   Expected(ErrorSuccess) = delete;
#26 146.1   ^
#26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> >' to 'llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > > &&' for 1st argument
#26 146.1   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
#26 146.1   ^
#26 146.1 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::InterfaceFile, std::default_delete<tapi::internal::InterfaceFile> > &]
#26 146.1     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
#26 146.1                                            ^
#26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr'
#26 146.1   Expected(
#26 146.1   ^
#26 146.1 1 error generated.
#26 146.1 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o] Error 1
#26 146.1 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:75: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o' failed
#26 146.3 1 error generated.
#26 146.3 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:244: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o' failed
#26 146.3 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o] Error 1
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:15:
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/MachOReader.h:18:
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:18:
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/APICommon.h:19:
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/ADT/BitmaskEnum.h:16:
#26 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/MathExtras.h:17:
#26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/algorithm:62:
#26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_algo.h:62:
#26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_tempbuf.h:60:
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_construct.h:75:38: error: call to implicitly-deleted copy constructor of 'std::pair<llvm::MachO::Architecture, tapi::internal::API>'
#26 146.5     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
#26 146.5                                      ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:75:8: note: in instantiation of function template specialization 'std::_Construct<std::pair<llvm::MachO::Architecture, tapi::internal::API>, const std::pair<llvm::MachO::Architecture, tapi::internal::API> &>' requested here
#26 146.5                 std::_Construct(std::__addressof(*__cur), *__first);
#26 146.5                      ^
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:126:2: note: in instantiation of function template specialization 'std::__uninitialized_copy<false>::__uninit_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *>' requested here
#26 146.5         __uninit_copy(__first, __last, __result);
#26 146.5         ^
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:281:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *>' requested here
#26 146.5     { return std::uninitialized_copy(__first, __last, __result); }
#26 146.5                   ^
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:324:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::pair<llvm::MachO::Architecture, tapi::internal::API> >' requested here
#26 146.5           std::__uninitialized_copy_a(__x.begin(), __x.end(),
#26 146.5                ^
#26 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:489:24: note: in instantiation of member function 'std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > >::vector' requested here
#26 146.5     new (getStorage()) storage_type(std::forward<OtherT>(Val));
#26 146.5                        ^
#26 146.5 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:704:12: note: in instantiation of function template specialization 'llvm::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > &>' requested here
#26 146.5     return results;
#26 146.5            ^
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:288:17: note: explicitly defaulted function was implicitly deleted here
#26 146.5       constexpr pair(const pair&) = default;
#26 146.5                 ^
#26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:200:11: note: copy constructor of 'pair<llvm::MachO::Architecture, tapi::internal::API>' is implicitly deleted because field 'second' has a deleted copy constructor
#26 146.5       _T2 second;                /// @c second is a copy of the second object
#26 146.5           ^
#26 146.5 /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:381:26: note: copy constructor of 'API' is implicitly deleted because field 'allocator' has a deleted copy constructor
#26 146.5   llvm::BumpPtrAllocator allocator;
#26 146.5                          ^
#26 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Allocator.h:87:3: note: copy constructor is implicitly deleted because 'BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096, 128>' has a user-declared move constructor
#26 146.5   BumpPtrAllocatorImpl(BumpPtrAllocatorImpl &&Old)
#26 146.5   ^
#26 146.5 1 error generated.
#26 146.5 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:257: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o' failed
#26 146.5 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o] Error 1
#26 146.9 [100%] Linking CXX static library ../../../../../../lib/libtapiObjCMetadata.a
#26 146.9 [100%] Built target tapiObjCMetadata
#26 147.1 /osxcross/build/apple-libtapi/src/tapi/lib/Core/Framework.cpp:44:17: warning: unused variable 'n' [-Wunused-variable]
#26 147.1   else if (auto n = filename.consume_back(".swiftinterface"))
#26 147.1                 ^
#26 147.5 1 warning generated.
#26 147.5 CMakeFiles/Makefile2:41118: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all' failed
#26 147.5 make[2]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all] Error 2
#26 147.5 make[1]: *** [tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule] Error 2
#26 147.5 CMakeFiles/Makefile2:41771: recipe for target 'tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule' failed
#26 147.5 Makefile:11522: recipe for target 'libtapi' failed
#26 147.5 make: *** [libtapi] Error 2
#26 147.5 + _exit
#26 147.5 + EC=2
#26 147.5 + '[' 2 -ne 0 ']'
#26 147.5 
#26 147.5 + test -z build.sh
#26 147.5 + echo ''
#26 147.5 + echo 'exiting with abnormal exit code (2)'
#26 147.5 + test -n 1
#26 147.5 exiting with abnormal exit code (2)
#26 147.5 + '[' -n apple-libtapi ']'
#26 147.5 + rm -f 'build/*_built_successfully'
#26 147.5 
#26 147.5 + echo ''
#26 147.5 + test build.sh = build.sh
#26 147.5 + check_for_bug_1242300
#26 147.5 + '[' -e /etc/issue ']'
#26 147.5 ++ grep -i ubuntu.13.10 /etc/issue
#26 147.5 + '[' '' ']'
#26 ERROR: process "/bin/bash -c UNATTENDED=1 SDK_VERSION=14.5 OSX_VERSION_MIN=10.13 TARGET_DIR=/usr/local/osxcross OCDEBUG=1 ./build.sh" did not complete successfully: exit code: 2

@tpoechtrager
Copy link
Owner

tpoechtrager commented Sep 18, 2024 via email

@peakedshout
Copy link
Author

It's still using the 6.3.x installation when Clang is searching for the libstdc++ headers as can be seen in the log:

/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/algorithm:62: On Wed, Sep 18, 2024 at 6:40 AM peakedshout @.*> wrote: It's very likely your gcc (libstdc++) installation is too old. #21 [17/24] RUN gcc --version && g++ --version #21 0.173 gcc (GCC) 12.2.0 #21 0.173 Copyright (C) 2022 Free Software Foundation, Inc. #21 0.173 This is free software; see the source for copying conditions. There is NO #21 0.173 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #21 0.173 #21 0.174 g++ (GCC) 12.2.0 #21 0.174 Copyright (C) 2022 Free Software Foundation, Inc. #21 0.174 This is free software; see the source for copying conditions. There is NO #21 0.174 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #21 0.174 #21 DONE 0.2s I tried to use gcc 12.2.0 to compile, but problems still occurred. #26 143.8 [100%] Building CXX object tools/clang/tools/tapi/lib/ObjCMetadata/CMakeFiles/tapiObjCMetadata.dir/ObjCMachOBinary.cpp.o #26 143.8 [100%] Building CXX object tools/clang/tools/tapi/lib/ObjCMetadata/CMakeFiles/tapiObjCMetadata.dir/ObjCMetadata.cpp.o #26 143.9 Scanning dependencies of target tapiCore #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/AvailabilityInfo.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIVisitor.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIPrinter.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/API.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FakeSymbols.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/ClangDiagnostics.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileManager.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileSystem.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/Framework.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/InterfaceFile.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/HeaderFile.cpp.o #26 143.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/InterfaceFileManager.cpp.o #26 144.5 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o #26 144.6 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o #26 144.8 /osxcross/build/apple-libtapi/src/tapi/lib/Core/FileListReader.cpp:152:10: error: no viable conversion from returned value of type 'std::unique_ptr' to function return type 'Expected<std::unique_ptr >' #26 144.8 return reader; #26 144.8 ^~~~~~ #26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr' to 'const llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_deletetapi::internal::FileListReader > > &' for 1st argument #26 144.8 template class LLVM_NODISCARD Expected { #26 144.8 ^ #26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr' to 'llvm::Error' for 1st argument #26 144.8 Expected(Error Err) #26 144.8 ^ #26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr' to 'llvm::ErrorSuccess' for 1st argument #26 144.8 Expected(ErrorSuccess) = delete; #26 144.8 ^ #26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr' to 'llvm::Expected<std::unique_ptr<tapi::internal::FileListReader, std::default_deletetapi::internal::FileListReader > > &&' for 1st argument #26 144.8 Expected(Expected &&Other) { moveConstruct(std::move(Other)); } #26 144.8 ^ #26 144.8 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::FileListReader, std::default_deletetapi::internal::FileListReader > &] #26 144.8 using enable_if_t = typename enable_if<_Cond, _Tp>::type; #26 144.8 ^ #26 144.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr' #26 144.8 Expected( #26 144.8 ^ #26 144.9 [100%] Building CXX object tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/PackedVersion.cpp.o #26 145.0 1 error generated. #26 145.0 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:153: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o' failed #26 145.0 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/FileListReader.cpp.o] Error 1 #26 145.0 make[3]: *** Waiting for unfinished jobs.... #26 145.8 /osxcross/build/apple-libtapi/src/tapi/lib/Core/APIJSONSerializer.cpp:1195:10: error: no viable conversion from returned value of type 'tapi::internal::API' to function return type 'Expectedtapi::internal::API' #26 145.8 return result; #26 145.8 ^~~~~~ #26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'tapi::internal::API' to 'const llvm::Expectedtapi::internal::API &' for 1st argument #26 145.8 template class LLVM_NODISCARD Expected { #26 145.8 ^ #26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Error' for 1st argument #26 145.8 Expected(Error Err) #26 145.8 ^ #26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::ErrorSuccess' for 1st argument #26 145.8 Expected(ErrorSuccess) = delete; #26 145.8 ^ #26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'tapi::internal::API' to 'llvm::Expectedtapi::internal::API &&' for 1st argument #26 145.8 Expected(Expected &&Other) { moveConstruct(std::move(Other)); } #26 145.8 ^ #26 145.8 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = tapi::internal::API &] #26 145.8 using enable_if_t = typename enable_if<_Cond, _Tp>::type; #26 145.8 ^ #26 145.8 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'tapi::internal::API' #26 145.8 Expected( #26 145.8 ^ #26 146.1 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachODylibReader.cpp:167:10: error: no viable conversion from returned value of type 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile >' to function return type 'Expected<std::unique_ptr >' #26 146.1 return file; #26 146.1 ^~~~ #26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:439:41: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile >' to 'const llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile > > &' for 1st argument #26 146.1 template class LLVM_NODISCARD Expected { #26 146.1 ^ #26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:461:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile >' to 'llvm::Error' for 1st argument #26 146.1 Expected(Error Err) #26 146.1 ^ #26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:475:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile >' to 'llvm::ErrorSuccess' for 1st argument #26 146.1 Expected(ErrorSuccess) = delete; #26 146.1 ^ #26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:493:3: note: candidate constructor not viable: no known conversion from 'std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile >' to 'llvm::Expected<std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile > > &&' for 1st argument #26 146.1 Expected(Expected &&Other) { moveConstruct(std::move(Other)); } #26 146.1 ^ #26 146.1 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/type_traits:2523:44: note: candidate template ignored: disabled by 'enable_if' [with OtherT = std::unique_ptr<tapi::internal::InterfaceFile, std::default_deletetapi::internal::InterfaceFile > &] #26 146.1 using enable_if_t = typename enable_if<_Cond, _Tp>::type; #26 146.1 ^ #26 146.1 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:498:3: note: candidate template ignored: could not match 'Expected' against 'unique_ptr' #26 146.1 Expected( #26 146.1 ^ #26 146.1 1 error generated. #26 146.1 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o] Error 1 #26 146.1 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:75: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/APIJSONSerializer.cpp.o' failed #26 146.3 1 error generated. #26 146.3 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:244: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o' failed #26 146.3 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachODylibReader.cpp.o] Error 1 #26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:15: #26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/MachOReader.h:18: #26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:18: #26 146.5 In file included from /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/APICommon.h:19: #26 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/ADT/BitmaskEnum.h:16: #26 146.5 In file included from /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/MathExtras.h:17: #26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/algorithm:62: #26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_algo.h:62: #26 146.5 In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_tempbuf.h:60: #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_construct.h:75:38: error: call to implicitly-deleted copy constructor of 'std::pair<llvm::MachO::Architecture, tapi::internal::API>' #26 146.5 { ::new(static_cast<void>(__p)) _T1(std::forward<_Args>(__args)...); } #26 146.5 ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:75:8: note: in instantiation of function template specialization 'std::_Construct<std::pair<llvm::MachO::Architecture, tapi::internal::API>, const std::pair<llvm::MachO::Architecture, tapi::internal::API> &>' requested here #26 146.5 std::_Construct(std::__addressof(__cur), *__first); #26 146.5 ^ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:126:2: note: in instantiation of function template specialization 'std::__uninitialized_copy::__uninit_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> *, std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> *>' requested here #26 146.5 __uninit_copy(__first, __last, __result); #26 146.5 ^ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_uninitialized.h:281:19: note: in instantiation of function template specialization 'std::uninitialized_copy<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> , std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> >' requested here #26 146.5 { return std::uninitialized_copy(__first, __last, __result); } #26 146.5 ^ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_vector.h:324:9: note: in instantiation of function template specialization 'std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<const std::pair<llvm::MachO::Architecture, tapi::internal::API> , std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >, std::pair<llvm::MachO::Architecture, tapi::internal::API> , std::pair<llvm::MachO::Architecture, tapi::internal::API> >' requested here #26 146.5 std::__uninitialized_copy_a(__x.begin(), __x.end(), #26 146.5 ^ #26 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Error.h:489:24: note: in instantiation of member function 'std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > >::vector' requested here #26 146.5 new (getStorage()) storage_type(std::forward(Val)); #26 146.5 ^ #26 146.5 /osxcross/build/apple-libtapi/src/tapi/lib/Core/MachOReader.cpp:704:12: note: in instantiation of function template specialization 'llvm::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > >::Expected<std::vector<std::pair<llvm::MachO::Architecture, tapi::internal::API>, std::allocator<std::pair<llvm::MachO::Architecture, tapi::internal::API> > > &>' requested here #26 146.5 return results; #26 146.5 ^ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:288:17: note: explicitly defaulted function was implicitly deleted here #26 146.5 constexpr pair(const pair&) = default; #26 146.5 ^ #26 146.5 /usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_pair.h:200:11: note: copy constructor of 'pair<llvm::MachO::Architecture, tapi::internal::API>' is implicitly deleted because field 'second' has a deleted copy constructor #26 146.5 _T2 second; /// @c second is a copy of the second object #26 146.5 ^ #26 146.5 /osxcross/build/apple-libtapi/src/tapi/include/tapi/Core/API.h:381:26: note: copy constructor of 'API' is implicitly deleted because field 'allocator' has a deleted copy constructor #26 146.5 llvm::BumpPtrAllocator allocator; #26 146.5 ^ #26 146.5 /osxcross/build/apple-libtapi/src/llvm/include/llvm/Support/Allocator.h:87:3: note: copy constructor is implicitly deleted because 'BumpPtrAllocatorImpl<llvm::MallocAllocator, 4096, 4096, 128>' has a user-declared move constructor #26 146.5 BumpPtrAllocatorImpl(BumpPtrAllocatorImpl &&Old) #26 146.5 ^ #26 146.5 1 error generated. #26 146.5 tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/build.make:257: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o' failed #26 146.5 make[3]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/MachOReader.cpp.o] Error 1 #26 146.9 [100%] Linking CXX static library ../../../../../../lib/libtapiObjCMetadata.a #26 146.9 [100%] Built target tapiObjCMetadata #26 147.1 /osxcross/build/apple-libtapi/src/tapi/lib/Core/Framework.cpp:44:17: warning: unused variable 'n' [-Wunused-variable] #26 147.1 else if (auto n = filename.consume_back(".swiftinterface")) #26 147.1 ^ #26 147.5 1 warning generated. #26 147.5 CMakeFiles/Makefile2:41118: recipe for target 'tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all' failed #26 147.5 make[2]: *** [tools/clang/tools/tapi/lib/Core/CMakeFiles/tapiCore.dir/all] Error 2 #26 147.5 make[1]: *** [tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule] Error 2 #26 147.5 CMakeFiles/Makefile2:41771: recipe for target 'tools/clang/tools/tapi/tools/libtapi/CMakeFiles/libtapi.dir/rule' failed #26 147.5 Makefile:11522: recipe for target 'libtapi' failed #26 147.5 make: *** [libtapi] Error 2 #26 147.5 + _exit #26 147.5 + EC=2 #26 147.5 + '[' 2 -ne 0 ']' #26 147.5 #26 147.5 + test -z build.sh #26 147.5 + echo '' #26 147.5 + echo 'exiting with abnormal exit code (2)' #26 147.5 + test -n 1 #26 147.5 exiting with abnormal exit code (2) #26 147.5 + '[' -n apple-libtapi ']' #26 147.5 + rm -f 'build/_built_successfully' #26 147.5 #26 147.5 + echo '' #26 147.5 + test build.sh = build.sh #26 147.5 + check_for_bug_1242300 #26 147.5 + '[' -e /etc/issue ']' #26 147.5 ++ grep -i ubuntu.13.10 /etc/issue #26 147.5 + '[' '' ']' #26 ERROR: process "/bin/bash -c UNATTENDED=1 SDK_VERSION=14.5 OSX_VERSION_MIN=10.13 TARGET_DIR=/usr/local/osxcross OCDEBUG=1 ./build.sh" did not complete successfully: exit code: 2 — Reply to this email directly, view it on GitHub <#429 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AASY5JFLMM7XRSYH6QMQ3KLZXD74RAVCNFSM6AAAAABOGUW5WOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJXGQ4DCMJSGI . You are receiving this because you commented.Message ID: @.>

I can't tell what I'm missing, I've installed gcc12.2.0, clang-11, cmake14, etc., and I'm going crazy with this environment variable problem.

#39 92.03 [ 53%] Built target LLVMRemarks
#39 92.03 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/LazyRandomTypeCollection.cpp.o
#39 92.03 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/Line.cpp.o
#39 92.08 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/MergingTypeTableBuilder.cpp.o
#39 92.42 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/RecordName.cpp.o
#39 92.45 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/RecordSerialization.cpp.o
#39 92.53 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SimpleTypeSerializer.cpp.o
#39 92.69 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/StringsAndChecksums.cpp.o
#39 92.70 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolDumper.cpp.o
#39 92.74 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolRecordHelpers.cpp.o
#39 92.78 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolRecordMapping.cpp.o
#39 92.86 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/SymbolSerializer.cpp.o
#39 92.87 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeDumpVisitor.cpp.o
#39 92.88 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeIndex.cpp.o
#39 93.08 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeIndexDiscovery.cpp.o
#39 93.81 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeHashing.cpp.o
#39 94.05 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeRecordHelpers.cpp.o
#39 94.11 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeRecordMapping.cpp.o
#39 94.15 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeStreamMerger.cpp.o
#39 94.34 [ 53%] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/TypeTableCollection.cpp.o
#39 95.26 [ 53%] Linking CXX static library ../libLLVMTableGen.a
#39 95.29 [ 53%] Built target LLVMTableGen
#39 95.30 [ 53%] Linking CXX executable ../../../../bin/clang-tblgen
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDag.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/CodeExpander.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDagInstr.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDagEdge.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDagOperands.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDagPredicate.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchDagPredicateDependencyEdge.cpp.o
#39 95.30 [ 53%] Building CXX object utils/TableGen/GlobalISel/CMakeFiles/LLVMTableGenGlobalISel.dir/GIMatchTree.cpp.o
#39 95.52 [ 53%] Built target clang-tblgen
#39 95.53 [ 53%] Building Attrs.inc...
#39 95.53 [ 53%] Building NodeClasses.inc...
#39 95.53 [ 53%] Building AttrImpl.inc...
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 ../../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ../../../../../../bin/clang-tblgen)
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 [ 53%] Building AttrTextNodeDump.inc...
#39 95.53 make[3]: *** [tools/clang/include/clang/AST/Attrs.inc] Error 1
#39 95.53 tools/clang/include/clang/AST/CMakeFiles/ClangAttrClasses.dir/build.make:118: recipe for target 'tools/clang/include/clang/AST/Attrs.inc' failed
#39 95.53 ../../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ../../../../../../bin/clang-tblgen)
#39 95.53 tools/clang/include/clang/Tooling/Syntax/CMakeFiles/ClangSyntaxNodeClasses.dir/build.make:114: recipe for target 'tools/clang/include/clang/Tooling/Syntax/NodeClasses.inc' failed
#39 95.53 make[3]: *** [tools/clang/include/clang/Tooling/Syntax/NodeClasses.inc] Error 1
#39 95.53 CMakeFiles/Makefile2:26135: recipe for target 'tools/clang/include/clang/AST/CMakeFiles/ClangAttrClasses.dir/all' failed
#39 95.53 make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrClasses.dir/all] Error 2
#39 95.53 make[2]: *** Waiting for unfinished jobs....
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 make[3]: *** [tools/clang/include/clang/AST/AttrImpl.inc] Error 1
#39 95.53 make[2]: *** [tools/clang/include/clang/Tooling/Syntax/CMakeFiles/ClangSyntaxNodeClasses.dir/all] Error 2
#39 95.53 tools/clang/include/clang/AST/CMakeFiles/ClangAttrImpl.dir/build.make:118: recipe for target 'tools/clang/include/clang/AST/AttrImpl.inc' failed
#39 95.53 CMakeFiles/Makefile2:27747: recipe for target 'tools/clang/include/clang/Tooling/Syntax/CMakeFiles/ClangSyntaxNodeClasses.dir/all' failed
#39 95.53 CMakeFiles/Makefile2:26161: recipe for target 'tools/clang/include/clang/AST/CMakeFiles/ClangAttrImpl.dir/all' failed
#39 95.53 make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrImpl.dir/all] Error 2
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 ../../../../../bin/clang-tblgen: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by ../../../../../bin/clang-tblgen)
#39 95.53 make[3]: *** [tools/clang/include/clang/AST/AttrTextNodeDump.inc] Error 1
#39 95.53 tools/clang/include/clang/AST/CMakeFiles/ClangAttrTextDump.dir/build.make:118: recipe for target 'tools/clang/include/clang/AST/AttrTextNodeDump.inc' failed
#39 95.53 CMakeFiles/Makefile2:26187: recipe for target 'tools/clang/include/clang/AST/CMakeFiles/ClangAttrTextDump.dir/all' failed
#39 95.53 make[2]: *** [tools/clang/include/clang/AST/CMakeFiles/ClangAttrTextDump.dir/all] Error 2
#39 97.15 [ 53%] Linking CXX static library ../../libLLVMDebugInfoCodeView.a
#39 97.17 [ 53%] Built target LLVMDebugInfoCodeView
#39 98.63 [ 53%] Linking CXX static library ../../../lib/libLLVMTableGenGlobalISel.a
#39 98.65 [ 53%] Built target LLVMTableGenGlobalISel
#39 98.65 CMakeFiles/Makefile2:27896: recipe for target 'tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/rule' failed
#39 98.65 make[1]: *** [tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/rule] Error 2
#39 98.65 Makefile:8470: recipe for target 'clangBasic' failed
#39 98.65 make: *** [clangBasic] Error 2
#39 98.65 + _exit
#39 98.65 + EC=2
#39 98.65 + '[' 2 -ne 0 ']'
#39 98.65 + test -z build.sh
#39 98.65 + echo ''
#39 98.65 + echo 'exiting with abnormal exit code (2)'
#39 98.65 + test -n 1
#39 98.65 + '[' -n apple-libtapi ']'
#39 98.65 + rm -f 'build/*_built_successfully'
#39 98.65 
#39 98.65 exiting with abnormal exit code (2)
#39 98.65 + echo ''
#39 98.65 
#39 98.65 + test build.sh = build.sh
#39 98.65 + check_for_bug_1242300
#39 98.65 + '[' -e /etc/issue ']'
#39 98.65 ++ grep -i ubuntu.13.10 /etc/issue
#39 98.65 + '[' '' ']'

@peakedshout
Copy link
Author

I don't understand that when I solve a problem, a new problem arises. It's like endless, it's been going on for a week, I'm tired, let me be autistic.

@HinTak
Copy link

HinTak commented Sep 20, 2024

You need to check your libstdc++-dev version, I think.

@HinTak
Copy link

HinTak commented Sep 20, 2024

Argh, and I remember some years ago, oxscross can get confused by extra headers / libraries installed by cross-gcc. (Stuff used for cross compiling for arms on Intel platforms and via versa, etc)

@peakedshout
Copy link
Author

peakedshout commented Sep 20, 2024

You need to check your libstdc++-dev version, I think.

now output:

 It fails with the following output:
#44 29.32 
#44 29.32     Change Dir: '/osxcross/build/apple-libtapi/build/CMakeFiles/CMakeScratch/TryCompile-ZvU2X3'
#44 29.32     
#44 29.32     Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_09e43/fast
#44 29.32     /usr/bin/make  -f CMakeFiles/cmTC_09e43.dir/build.make CMakeFiles/cmTC_09e43.dir/build
#44 29.32     make[1]: Entering directory '/osxcross/build/apple-libtapi/build/CMakeFiles/CMakeScratch/TryCompile-ZvU2X3'
#44 29.32     Building CXX object CMakeFiles/cmTC_09e43.dir/testCXXCompiler.cxx.o
#44 29.32     /usr/bin/clang++   -I /osxcross/build/apple-libtapi/build/../src/llvm/projects/clang/include -I /osxcross/build/apple-libtapi/build/projects/clang/include  -MD -MT CMakeFiles/cmTC_09e43.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_09e43.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_09e43.dir/testCXXCompiler.cxx.o -c /osxcross/build/apple-libtapi/build/CMakeFiles/CMakeScratch/TryCompile-ZvU2X3/testCXXCompiler.cxx
#44 29.32     Linking CXX executable cmTC_09e43
#44 29.32     /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_09e43.dir/link.txt --verbose=1
#44 29.32     /usr/bin/clang++ -I /osxcross/build/apple-libtapi/build/../src/llvm/projects/clang/include -I /osxcross/build/apple-libtapi/build/projects/clang/include  CMakeFiles/cmTC_09e43.dir/testCXXCompiler.cxx.o -o cmTC_09e43
#44 29.32     /usr/bin/ld: cannot find -lc++
#44 29.32     clang: error: linker command failed with exit code 1 (use -v to see invocation)
#44 29.32     CMakeFiles/cmTC_09e43.dir/build.make:99: recipe for target 'cmTC_09e43' failed
#44 29.32     make[1]: *** [cmTC_09e43] Error 1
#44 29.32     make[1]: Leaving directory '/osxcross/build/apple-libtapi/build/CMakeFiles/CMakeScratch/TryCompile-ZvU2X3'
#44 29.32     Makefile:127: recipe for target 'cmTC_09e43/fast' failed
#44 29.32     make: *** [cmTC_09e43/fast] Error 2
#44 29.32     
#44 29.32     
#44 29.32 
#44 29.32   
#44 29.32 
#44 29.32   CMake will not be able to correctly generate this project.
#44 29.32 Call Stack (most recent call first):
#44 29.32   CMakeLists.txt:55 (project)

When I install clang16 through the repository source and can view the version normally, the execution shows that I don't have libc++? When I specifically install RUN apt-get install -y --force-yes libc++1=3.5-2 libc++abi1=3.5-2
RUN apt-get install -y --force-yes libc++-dev libc++abi-dev and then my clang just disappeared.

I even think there's something wrong with my docker image, and it's coming from an image that packages some of the tools I need for my development language.

@HinTak
Copy link

HinTak commented Sep 20, 2024

This is wrong, / irrelevant : libc++1=3.5-2 libc++abi1=3.5-2.

libc++1 / libc++abi1 comes from the clang family and libstdc++ / libstdc++-dev is from the gcc family. Yes, it is slightly confusing, clang being able to use the c++ library from gcc / g++. But those two are different libraries and different headers.

Your docker image is likely a very old linux distribution with hard dependency on libstdc++=6.3 and having some g++ 6.3 bits. As you known current g++ is about 14 / 15, so 6.3 is really old.

@peakedshout
Copy link
Author

This is wrong, / irrelevant : libc++1=3.5-2 libc++abi1=3.5-2.

libc++1 / libc++abi1 comes from the clang family and libstdc++ / libstdc++-dev is from the gcc family. Yes, it is slightly confusing, clang being able to use the c++ library from gcc / g++. But those two are different libraries and different headers.

Your docker image is likely a very old linux distribution with hard dependency on libstdc++=6.3 and having some g++ 6.3 bits. As you known current g++ is about 14 / 15, so 6.3 is really old.

You are right, when I compile using the debian12 image, everything works fine. But I am not sure if using a higher version will cause compatibility issues with the compiled program. (If I remember correctly, it is usually forward compatible.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants