We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I run make -j4 on my macOS I get error
make -j4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I get this error on version v1.8.0. With version v1.7.0 everything is fine.
v1.8.0
v1.7.0
How can this be fixed?
➜ Release git:(master) ✗ make -j4 [ 1%] Built target tl-parser [ 1%] Built target generate_mime_types_gperf [ 2%] Built target tdsqlite [ 3%] Built target tdtl [ 3%] Generate git_commit.h [ 4%] Built target tdmime_auto [ 4%] Generate TLO files [ 6%] Built target generate_common [ 6%] Built target generate_c [ 7%] Built target td_generate_java_api [ 7%] Built target remove_documentation [ 7%] Built target tl_generate_tlo [ 8%] Generate common TL source files [ 8%] Built target git_commit [ 25%] Built target tdutils [ 26%] Built target memprof [ 27%] Built target generate_json [ 28%] Built target tdactor [ 28%] Built target bench_crypto [ 28%] Built target check_tls [ 29%] Built target rmdir [ 29%] Built target bench_empty [ 29%] Built target bench_log [ 30%] Built target bench_queue [ 30%] Generate JSON TL source files [ 34%] Built target tddb [ 37%] Built target tdnet [ 37%] Built target tl_generate_json [ 38%] Built target example [ 39%] Built target binlog_dump [ 39%] Built target bench_actor [ 39%] Built target bench_http [ 40%] Built target bench_http_server [ 40%] Built target bench_http_server_cheat [ 41%] Built target bench_http_server_fast [ 41%] Built target bench_http_reader [ 42%] Built target bench_db [ 42%] Built target tl_generate_common [ 43%] Built target wget [ 43%] Built target tdapi [ 85%] Built target tdcore [ 86%] Built target bench_handshake [ 86%] Built target bench_tddb [ 86%] Built target tdclient [ 86%] Built target bench_misc [ 86%] Built target tdjson_private [ 86%] Built target check_proxy [ 86%] Built target tg_cli [ 87%] Built target tdjson_static [ 89%] Built target tdjson [ 89%] Linking CXX executable bin/tdlib_json_cli [100%] Built target run_all_tests clang: warning: argument unused during compilation: '-static-libgcc' [-Wunused-command-line-argument] clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument] ld: library not found for -lcrt0.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/tdlib_json_cli] Error 1 make[1]: *** [CMakeFiles/tdlib_json_cli.dir/all] Error 2 make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
I solved this problem. I replaced
set(CMAKE_EXE_LINKER_FLAGS " -static") target_link_libraries(tdlib_json_cli Td::TdJsonStatic -static-libgcc -static-libstdc++)
to
target_link_libraries(tdlib_json_cli Td::TdJsonStatic)
i.e. just removed static links at CMakeLists.txt
CMakeLists.txt
Sorry, something went wrong.
Why logic with static was added to project? Can we omit it?
Why logic with static was added to project?
Static link can produce static-linked binary, which can distribute between machines without version-specificed libraries installed.
No branches or pull requests
When I run
make -j4
on my macOS I get errorI get this error on version
v1.8.0
.With version
v1.7.0
everything is fine.How can this be fixed?
The text was updated successfully, but these errors were encountered: