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

What is the enviroment&version of build tool-chain? #15

Open
Garithe opened this issue Mar 21, 2024 · 6 comments
Open

What is the enviroment&version of build tool-chain? #15

Garithe opened this issue Mar 21, 2024 · 6 comments
Labels
question Further information is requested

Comments

@Garithe
Copy link

Garithe commented Mar 21, 2024

I have tried clang17/libc++abi-17-dev on kali but failed on linker (looks like some symbols couldn't found in libc++, compiled 100% )
Then I tried other llvm docker but also failed .
If would be helpful to provide some version information as c++23 is not stably supported

@es3n1n
Copy link
Owner

es3n1n commented Mar 21, 2024

Honestly, the last time i tested clang 17 and libc++17, it worked fine for me. What are the errors you are getting?

@Garithe
Copy link
Author

Garithe commented Mar 21, 2024

Honestly, the last time i tested clang 17 and libc++17, it worked fine for me. What are the errors you are getting?

I got things like:
ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>::~basic_string()
ld.lld: error: undefined symbol: std::__1::random_device::operator()()
ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>::operator=(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)
ld.lld: error: undefined symbol: std::__1::random_device::~random_device()
ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>::basic_string(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)
ld.lld: error: undefined symbol: std::__1::stoull(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&, unsigned long*, int)
ld.lld: error: undefined symbol: std::runtime_error::runtime_error(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)
ld.lld: error: undefined symbol: std::__1::__fs::filesystem::path::replace_extension(std::__1::__fs::filesystem::path const&)
ld.lld: error: undefined symbol: std::__1::__fs::filesystem::__status(std::__1::__fs::filesystem::path const&, std::__1::error_code*)
ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>::assign(char const*)
ld.lld: error: undefined symbol: std::__1::__next_prime(unsigned long)

So many these error after [100%] Linking CXX executable obfuscator

@es3n1n
Copy link
Owner

es3n1n commented Mar 21, 2024

Are you sure that you installed both libc++-17-dev and libc++abi-17-dev?

@es3n1n es3n1n added the question Further information is requested label Mar 21, 2024
@Garithe
Copy link
Author

Garithe commented Mar 22, 2024

dpkg -l | grep libc++
ii libc++-17-dev:amd64 1:17.0.6-5 amd64 LLVM C++ Standard library (development files)
ii libc++1-17:amd64 1:17.0.6-5 amd64 LLVM C++ Standard library
ii libc++abi-17-dev:amd64 1:17.0.6-5 amd64 LLVM low level support for a standard C++ library (development files)
ii libc++abi1-17:amd64 1:17.0.6-5 amd64 LLVM low level support for a standard C++ library

CC=clang-17 CXX=clang++-17

[100%] Linking CXX executable obfuscator
ld.lld: error: undefined symbol: std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator>::~basic_string()
.........
ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++-17: error: linker command failed with exit code 1 (use -v to see invocation)

OS: wsl2 (kali)

@Garithe
Copy link
Author

Garithe commented Apr 5, 2024

Update: I tried on my macbook m3 and it worked with llvm17. Just can‘t succeed on my kali in wsl2.

@es3n1n
Copy link
Owner

es3n1n commented Apr 5, 2024

Update: I tried on my macbook m3 and it worked with llvm17. Just can‘t succeed on my kali in wsl2.

Can you checkout to the dev branch and remove -Wl,-L/usr/local/lib/ from https://github.com/es3n1n/obfuscator/blob/dev/src/cmake.toml#L6 ? Then make a new cmake build and try to build it

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

No branches or pull requests

2 participants