Compilation Fail
opened this issue · comments
FAILED: lib/Module/CMakeFiles/kleeModule.dir/FunctionAlias.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DKLEE_UCLIBC_BCA_NAME=\"klee-uclibc.bca\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/include -I/Users/ dev/klee/build/include -I/Users/ dev/klee/include -I/usr/local/include -I/opt/homebrew/Cellar/stp/2.3.3_2/include -I/opt/homebrew/include -Wall -Wextra -Wno-unused-parameter -O2 -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fno-exceptions -fno-rtti -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=gnu++17 -MD -MT lib/Module/CMakeFiles/kleeModule.dir/FunctionAlias.cpp.o -MF lib/Module/CMakeFiles/kleeModule.dir/FunctionAlias.cpp.o.d -o lib/Module/CMakeFiles/kleeModule.dir/FunctionAlias.cpp.o -c /Users/ dev/klee/lib/Module/FunctionAlias.cpp
/Users/ dev/klee/lib/Module/FunctionAlias.cpp:140:17: error: no member named 'getElementType' in 'llvm::PointerType'
type = ptr->getElementType();
~~~ ^
1 error generated.
[309/652] Building CXX object lib/Module/CMakeFiles/kleeModule.dir/IntrinsicCleaner.cpp.o
/Users/ dev/klee/lib/Module/IntrinsicCleaner.cpp:100:56: warning: 'getPointerElementType' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
Builder.CreateLoad(castedSrc->getType()->getPointerElementType(),
^
/usr/local/include/llvm/IR/Type.h:377:5: note: 'getPointerElementType' has been explicitly marked deprecated here
[[deprecated("Deprecated without replacement, see "
^
/Users/ dev/klee/lib/Module/IntrinsicCleaner.cpp:109:44: warning: 'getPointerElementType' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
auto pSrcType = pSrc->getType()->getPointerElementType();
^
/usr/local/include/llvm/IR/Type.h:377:5: note: 'getPointerElementType' has been explicitly marked deprecated here
[[deprecated("Deprecated without replacement, see "
^
/Users/ dev/klee/lib/Module/IntrinsicCleaner.cpp:110:44: warning: 'getPointerElementType' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
auto pDstType = pDst->getType()->getPointerElementType();
^
/usr/local/include/llvm/IR/Type.h:377:5: note: 'getPointerElementType' has been explicitly marked deprecated here
[[deprecated("Deprecated without replacement, see "
^
3 warnings generated.
ninja: build stopped: subcommand failed.
I'm on
clang version 16.0.0 (https://github.com/llvm/llvm-project.git ec83c7e358ecd7db9af2d980b6d528f5ea6865a4)
Target: arm64-apple-darwin21.6.0
Thread model: posix
I fixed that error by replacing the func by Type::getPointerElementType()
but I have another issue :
FAILED: lib/Core/CMakeFiles/kleeCore.dir/Executor.cpp.o
/Library/Developer/CommandLineTools/usr/bin/c++ -DKLEE_UCLIBC_BCA_NAME=\"klee-uclibc.bca\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/include -I/Users/ dev/klee/build/include -I/Users/ dev/klee/include -I/usr/local/include -I/opt/homebrew/Cellar/stp/2.3.3_2/include -I/opt/homebrew/include -Wall -Wextra -Wno-unused-parameter -O2 -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -fno-exceptions -fno-rtti -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -std=gnu++17 -MD -MT lib/Core/CMakeFiles/kleeCore.dir/Executor.cpp.o -MF lib/Core/CMakeFiles/kleeCore.dir/Executor.cpp.o.d -o lib/Core/CMakeFiles/kleeCore.dir/Executor.cpp.o -c /Users/ dev/klee/lib/Core/Executor.cpp
In file included from /Users/ dev/klee/lib/Core/Executor.cpp:16:
/Users/ dev/klee/lib/Core/GetElementPtrTypeIterator.h:31:19: warning: 'iterator<std::forward_iterator_tag, llvm::Type *>' is deprecated [-Wdeprecated-declarations]
: public std::iterator<std::forward_iterator_tag, llvm::Type *, ptrdiff_t> {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::forward_iterator_tag, llvm::Type *>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:1066:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
# define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:1043:48: note: expanded from macro '_LIBCPP_DEPRECATED'
# define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
^
In file included from /Users/ dev/klee/lib/Core/Executor.cpp:16:
/Users/ dev/klee/lib/Core/GetElementPtrTypeIterator.h:32:16: warning: 'iterator<std::forward_iterator_tag, llvm::Type *>' is deprecated [-Wdeprecated-declarations]
typedef std::iterator<std::forward_iterator_tag, llvm::Type *, ptrdiff_t>
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::forward_iterator_tag, llvm::Type *>' has been explicitly marked deprecated here
struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__config:1066:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17'
# define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
There are two issues here:
clang version 16.0.0 (https://github.com/llvm/llvm-project.git ec83c7e358ecd7db9af2d980b6d528f5ea6865a4)
Target: arm64-apple-darwin21.6.0
We do not support ARM and haven't even merged support for LLVM 14 (#1477) yet.
the issue isn't about ARM since I'm compiling it using rosetta 2 and make support.
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_OSX_ARCHITECTURES="x86_64" -DENABLE_UNIT_TESTS=OFF -GNinja -DENABLE_SYSTEM_TESTS=OFF
I hope this has been resolved, but please reopen with more info if not.