tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.13k stars 1.45k forks source link

tdweb build error #1749

Closed jiangjun147 closed 2 years ago

jiangjun147 commented 2 years ago

[98%] Built target tdjson_static [ 98%] Building CXX object CMakeFiles/td_wasm.dir/td/telegram/td_emscripten.cpp.o [100%] Linking CXX executable td_wasm.js wasm-ld: error: unknown argument: --exclude-libs wasm-ld: error: cannot open ALL: No such file or directory em++: error: '/Users/jiangjun/emsdk/upstream/bin/wasm-ld -o /var/folders/gt/ydphnqvd42s3h84mms0ywjw40000gn/T/emscripten_temp_we9dxxul/td_wasm.wasm --gc-sections --exclude-libs ALL -L/Users/jiangjun/emsdk/upstream/emscripten/system/local/lib -L/Users/jiangjun/emsdk/upstream/emscripten/system/lib CMakeFiles/td_wasm.dir/td/telegram/td_emscripten.cpp.o -L/Users/jiangjun/emsdk/upstream/emscripten/cache/wasm libtdjson_static.a tdactor/libtdactor.a libtdjson_private.a libtdclient.a libtdcore.a libtdapi.a tdnet/libtdnet.a tddb/libtddb.a tdactor/libtdactor.a tdutils/libtdutils.a sqlite/libtdsqlite.a ../crypto/lib/libcrypto.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libz.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libc.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libcompiler_rt.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libc++-noexcept.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libc++abi-noexcept.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libdlmalloc.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libpthread_stub.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libc_rt_wasm.a /Users/jiangjun/emsdk/upstream/emscripten/cache/wasm/libsockets.a -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --allow-undefined --import-memory --strip-debug --export-table --export main --export stackSave --export stackRestore --export stackAlloc --export __data_end --export wasm_call_ctors --export errno_location --export malloc --export free --export memalign --export memset --export htonl --export htons --export ntohs --export strlen --export _get_tzname --export _get_daylight --export _get_timezone --export emscripten_main_thread_process_queued_calls --export memcpy -z stack-size=5242880 --initial-memory=16777216 --no-entry --max-memory=2147483648 --global-base=1024' failed (1) make[3]: [td_wasm.js] Error 1 make[2]: [CMakeFiles/td_wasm.dir/all] Error 2 make[1]: [CMakeFiles/td_wasm.dir/rule] Error 2 make: [td_wasm] Error 2

jiangjun147 commented 2 years ago

emsdk 2.0.6 version

levlam commented 2 years ago

See https://github.com/tdlib/td/issues/1729.

jiangjun147 commented 2 years ago

I pulled the latest code and recompiled it, but there are still errors

jiangjun147 commented 2 years ago

My compilation environment is macos

levlam commented 2 years ago

The mentioned isuues has the exact fix.

jiangjun147 commented 2 years ago

See #1729. Is there anything to pay attention to?i see you fix it. so i pull latest code and rebuild but it erorr

jiangjun147 commented 2 years ago

image

levlam commented 2 years ago

From the mentioned issue:

Alternatively, you can try to comment the line https://github.com/tdlib/td/blob/33c689aacc78ef5a68973552b968a3bb68cdd7c6/CMake/TdSetUpCompiler.cmake#L64.

Comment out that line of code to package successfully.

jiangjun147 commented 2 years ago

Sorry, English is too bad, now it's solved