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

cannot link core 1.136.1 #2972

Closed
r10s opened this issue Mar 5, 2024 · 7 comments
Closed

cannot link core 1.136.1 #2972

r10s opened this issue Mar 5, 2024 · 7 comments
Assignees
Labels
blocker bug build build and release related issues

Comments

@r10s
Copy link
Member

r10s commented Mar 5, 2024

even though 1.136.1 reverts bumping the toolchain, there is an error similar to #2969 :

log: https://gist.github.com/r10s/b6a3ad2abce3f392ef263e0aad8855cc
rust-toolchain: 1.72.0 (unchanged)
build-environment: macOS

i double checked and tested 1.135.0 in the same environment, ran ./script/clean-core.sh and also tried to clean other caches (cargo clean), but no success :/

as openssl pops up in the log, maybe deltachat/deltachat-core-rust#5319 is related?

ios has lots of warnings with 1.136.1, maybe related, maybe sth. else deltachat/deltachat-ios#2104

@r10s r10s changed the title cannot compile core 1.136.1 cannot link core 1.136.1 Mar 5, 2024
@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

deltachat/deltachat-core-rust#5319 is not related, it is a problem with nix turning files into symlinks, not cloning submodules etc., could not be related. That issue is about compilation and this issue is about linking to libc.

You don't have any RUSTFLAGS in your environment or anything similar? Do you have ~/.cargo/config or ./.cargo/config?

@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

Nightly also failed to build on Linux with Rust 1.76.0, so I will debug it now. Will downgrade to Rust 1.72 and see if it helps.

EDIT: fails with Rust 1.72 and core 1.136.1:

-- ndk-build --
Android NDK: WARNING: APP_PLATFORM android-16 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-16. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.    
[armeabi-v7a] Compile thumb  : native-utils <= dc_wrapper.c
[armeabi-v7a] SharedLibrary  : libnative-utils.so
ld: error: undefined symbol: stdout
>>> referenced by sqlite3.c
>>>               743cfc0ef0363398-sqlite3.o:(sqlcipher_cipher_profile) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced by sqlite3.c
>>>               743cfc0ef0363398-sqlite3.o:(sqlcipher_set_log) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: stderr
>>> referenced by sqlite3.c
>>>               743cfc0ef0363398-sqlite3.o:(sqlcipher_cipher_profile) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced by sqlite3.c
>>>               743cfc0ef0363398-sqlite3.o:(sqlcipher_set_log) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(open_console) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced 14 more times

ld: error: undefined symbol: mmap64
>>> referenced by sqlite3.c
>>>               743cfc0ef0363398-sqlite3.o:(aSyscall) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: __FD_SET_chk
>>> referenced by bio_sock.c
>>>               libcrypto-lib-bio_sock.o:(BIO_socket_wait) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: tcgetattr
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(open_console) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: stdin
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(open_console) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(close_console) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: signal
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(read_string_inner) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: tcsetattr
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(read_string_inner) in archive jni/armeabi-v7a/libdeltachat.a
>>> referenced by ui_openssl.c
>>>               libcrypto-lib-ui_openssl.o:(read_string_inner) in archive jni/armeabi-v7a/libdeltachat.a

ld: error: undefined symbol: __cmsg_nxthdr
>>> referenced by e_afalg.c
>>>               libcrypto-lib-e_afalg.o:(afalg_do_cipher) in archive jni/armeabi-v7a/libdeltachat.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/nix/store/kb80gk11prjd5frdyaylwvc0r052a8ji-ndk-23-2-8568313-23.2.8568313/build/core/build-binary.mk:716: obj/local/armeabi-v7a/libnative-utils.so] Error 1

I am building inside nix develop shell.

@link2xt link2xt self-assigned this Mar 5, 2024
@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

Looks like in commit deltachat/deltachat-core-rust@ddc2704 dependency cc got upgraded from 1.0.83 to 1.0.89 and lost its libc dependency.

@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

For Android builds cc 1.0.83 works. 1.0.84 and 1.0.85 are yanked. With 1.0.86 it fails to build.

link2xt added a commit to deltachat/deltachat-core-rust that referenced this issue Mar 5, 2024
1.0.84 and 1.0.85 are yanked.
With 1.0.86 and 1.0.89 Delta Chat for Android fails to build.

Fixes <deltachat/deltachat-android#2972>.
@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

Downgraded cc:
deltachat/deltachat-core-rust@02d6833

Will tag core 1.136.2 after testing another time.

@link2xt
Copy link
Contributor

link2xt commented Mar 5, 2024

I tagged 1.136.2

@r10s r10s added the build build and release related issues label Mar 6, 2024
@r10s
Copy link
Member Author

r10s commented Mar 6, 2024

thanks a lot for fixing! with 1.136.2 everything compiles and links smoothly again - also the deltachat-ios warnings of deltachat/deltachat-ios#2104 are gone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug build build and release related issues
Projects
None yet
Development

No branches or pull requests

2 participants