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 llvm_mode failed #1

Closed
lcyfrank opened this issue Oct 15, 2021 · 3 comments
Closed

Build llvm_mode failed #1

lcyfrank opened this issue Oct 15, 2021 · 3 comments

Comments

@lcyfrank
Copy link

Thank you for your great job! But I have occured a problem while building this fuzzer.

I cd llvm_mode and type make to build the llvm_mode, but error, the message is:

/usr/bin/ld: ../afl-llvm-rt.o: in function `Tlsh_new':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh-wrapper.cpp:6: undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh-wrapper.cpp:6: undefined reference to `operator delete(void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `Tlsh_delete':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh-wrapper.cpp:46: undefined reference to `operator delete(void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `Tlsh::Tlsh()':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh.cpp:69: undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh.cpp:69: undefined reference to `operator delete(void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `Tlsh::Tlsh(Tlsh const&)':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh.cpp:74: undefined reference to `operator new(unsigned long)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh.cpp:74: undefined reference to `operator delete(void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `Tlsh::~Tlsh()':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh.cpp:80: undefined reference to `operator delete(void*)'
/usr/bin/ld: /usr/bin/ld: DWARF error: could not find variable specification at offset 7e2
/usr/bin/ld: DWARF error: could not find variable specification at offset 7ed
/usr/bin/ld: DWARF error: could not find variable specification at offset 87a
../afl-llvm-rt.o: in function `TlshImpl::~TlshImpl()':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:88: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:89: undefined reference to `operator delete[](void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `TlshImpl::reset()':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:94: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:96: undefined reference to `operator delete[](void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `TlshImpl::update(unsigned char const*, unsigned int)':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:176: undefined reference to `operator new[](unsigned long)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `TlshImpl::final(int)':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:406: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:411: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:420: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:441: undefined reference to `operator delete[](void*)'
/usr/bin/ld: /home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:462: undefined reference to `operator delete[](void*)'
/usr/bin/ld: ../afl-llvm-rt.o: in function `TlshImpl::hash(int) const':
/home/ubuntu/stateafl/llvm_mode/tlsh/src/tlsh_impl.cpp:557: undefined reference to `operator new[](unsigned long)'
/usr/bin/ld: ../afl-llvm-rt.o:(.eh_frame+0xf97): undefined reference to `__gxx_personality_v0'
/usr/bin/ld: ../afl-llvm-rt.o:(.eh_frame+0x112f): undefined reference to `__gxx_personality_v0'
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:135: test_build] Error 1

My OS is CentOS.

@rnatella
Copy link
Contributor

Hello, you may try to clean and rebuild the static libraries in llvm_mode.
You will need to init the git submodules for the project (tlsh, mvptree, containers).
Hope this helps

@lcyfrank
Copy link
Author

I add -lstdc++ in the Makefile and rebuild, then solved it.

@rnatella
Copy link
Contributor

Great, thanks for the information

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

2 participants