summaryrefslogtreecommitdiffstats
path: root/results/scraper/fex/1723
blob: b39358e324270ea625f342a18af1a481b713431f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Can't compile thunks on Arch Linux: undefined reference
In Asahi Linux with a 4K page kernel, I installed the following dependencies with pacman:
```
git
cmake
ninja
clang
lld
sdl2
libepoxy
squashfs-tools
squashfuse
```
I then attempted to build FEX with cmake options `-DBUILD_THUNKS=True` and `-DBUILD_TESTS=False` (if I omit `-DBUILD_THUNKS=True`, the build succeeds) with the following error:
```
FAILED: Bin/thunkgen 
: && /usr/bin/clang++ -flto=thin -fPIE -pie ThunkLibs/Generator/CMakeFiles/thunkgen.dir/main.cpp.o -o Bin/thunkgen  ThunkLibs/Generator/libthunkgenlib.a  -lclangTooling  /usr/lib/libcrypto.so && :
/usr/bin/ld: cannot find -lclangTooling: No such file or directory
```
If I place a symlink to libclang-cpp.so in /usr/lib named libclangTooling.so, I get the following error:
```
FAILED: Bin/thunkgen
: && /usr/bin/clang++ -flto=thin -fPIE -pie ThunkLibs/Generator/CMakeFiles/thunkgen.dir/main.cpp.o -o Bin/thunkgen  ThunkLibs/Generator/libthunkgenlib.a  -lclangTooling  /usr/lib/libcrypto.so && :
/usr/bin/ld: /tmp/lto-llvm-004eb0.o: undefined reference to symbol '_ZN4llvm3vfs17getRealFileSystemEv@@LLVM_13'
/usr/bin/ld: /usr/lib/libLLVM-13.so: error adding symbols: DSO missing from command line
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
```

Using lld with `-DENABLE_LLD=True` yields a similar error:
```
FAILED: Bin/thunkgen 
: && /usr/bin/clang++ -flto=thin -fuse-ld=lld -fPIE -pie ThunkLibs/Generator/CMakeFiles/thunkgen.dir/main.cpp.o -o Bin/thunkgen  ThunkLibs/Generator/libthunkgenlib.a  -lclangTooling  /usr/lib/libcrypto.so && :
ld.lld: error: undefined symbol: llvm::vfs::getRealFileSystem()
>>> referenced by main.cpp
>>>               lto.tmp:(main)

ld.lld: error: undefined symbol: llvm::deallocate_buffer(void*, unsigned long, unsigned long)
>>> referenced by main.cpp
>>>               lto.tmp:(llvm::MallocAllocator::Deallocate(void const*, unsigned long, unsigned long))

ld.lld: error: undefined symbol: llvm::SmallVectorBase<unsigned int>::grow_pod(void*, unsigned long, unsigned long)
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::SmallVectorTemplateCommon<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*> > >, void>::grow_pod(unsigned long, unsigned long))
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::SmallVectorTemplateCommon<std::pair<void*, unsigned long>, void>::grow_pod(unsigned long, unsigned long))
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::SmallVectorTemplateCommon<void*, void>::grow_pod(unsigned long, unsigned long))

ld.lld: error: undefined symbol: llvm::llvm_unreachable_internal(char const*, char const*, unsigned int)
>>> referenced by gen.cpp
>>>               lto.tmp:(clang::FunctionProtoType::getExceptionSpecSize(clang::ExceptionSpecificationType, unsigned int))
>>> referenced by gen.cpp
>>>               lto.tmp:(clang::RecursiveASTVisitor<ASTVisitor>::TraverseAttr(clang::Attr*))

ld.lld: error: undefined symbol: llvm::allocate_buffer(unsigned long, unsigned long)
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::MallocAllocator::Allocate(unsigned long, unsigned long))

ld.lld: error: undefined symbol: llvm::APInt::APInt(unsigned int, unsigned int, unsigned long const*)
>>> referenced by gen.cpp
>>>               lto.tmp:(clang::APNumericStorage::getIntValue() const)

ld.lld: error: undefined symbol: llvm::APInt::initSlowCase(unsigned long, bool)
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::APInt::APInt(unsigned int, unsigned long, bool))

ld.lld: error: undefined symbol: llvm::APInt::countLeadingZerosSlowCase() const
>>> referenced by gen.cpp
>>>               lto.tmp:(llvm::APInt::countLeadingZeros() const)
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
```