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-tdlib.sh: CMake Error at /mnt/c/Users/egmon/CMakeLists.txt:48 (add_subdirectory) #3182

Closed
egmontr opened this issue Dec 12, 2024 · 6 comments

Comments

@egmontr
Copy link

egmontr commented Dec 12, 2024

I am working on WSL2 with Ubuntu 24.04.

When I am starting the last script build-tdlib.sh I am getting the following error:

ubuntu@egilaptop:/mnt/c/Users/egmon/Downloads/tdlib_compile$ ./build-tdlib.sh
Generating TDLib source files...
-- The CXX compiler identification is Clang 18.1.3
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /mnt/c/Users/egmon/CMakeLists.txt:48 (add_subdirectory):
The source directory

/mnt/c

does not contain a CMakeLists.txt file.

CMake Error at CMakeLists.txt:67 (add_custom_target):
add_custom_target cannot create target "tl_generate_java" because another
target with the same name already exists. The existing target is a custom
target created in source directory "/mnt/c/Users/egmon". See documentation
for policy CMP0002 for more details.

-- Configuring incomplete, errors occurred!
See also "/mnt/c/Users/egmon/Downloads/tdlib_compile/build-native-Java/CMakeFiles/CMakeOutput.log".

So I searched for an existing "tl_generate_java", but didn't find it. Also CMakeLists.txt ist there.
What could the error be?

@levlam
Copy link
Contributor

levlam commented Dec 12, 2024

You must run all scripts from the directory in which they are located.

@egmontr
Copy link
Author

egmontr commented Dec 12, 2024

I did that. I started all scripts from the same directory.

@levlam
Copy link
Contributor

levlam commented Dec 12, 2024

You run it from the directory /mnt/c/Users/egmon/Downloads/tdlib_compile, but the script is located in td/example/android. You must not move scripts to other location.

@egmontr
Copy link
Author

egmontr commented Dec 13, 2024

Indeed. I only copied the scripts and not the whole project.
I'll try again and come back to report.

@egmontr
Copy link
Author

egmontr commented Dec 13, 2024

It has worked now. Sorry for my dumb questions and thanks for help.

@egmontr
Copy link
Author

egmontr commented Dec 16, 2024

Closed

@egmontr egmontr closed this as completed Dec 16, 2024
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