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

[Bug] libstdc++ error on Termux #101

Open
alexmozaidze opened this issue Nov 29, 2023 · 4 comments
Open

[Bug] libstdc++ error on Termux #101

alexmozaidze opened this issue Nov 29, 2023 · 4 comments
Assignees

Comments

@alexmozaidze
Copy link

alexmozaidze commented Nov 29, 2023

When trying to compile rusty_ffmpeg with link_system_ffmpeg on Termux, I couldn't, due to the following error:

Compiling rusty_ffmpeg v0.13.1+ffmpeg.6.0
error: failed to add native library /data/data/com.termux/files/usr/lib/libstdc++.a: file too small to be an archive

error: could not compile `rusty_ffmpeg` (lib) due to previous error
zsh: exit 101   CARGO_INCREMENTAL=0 cargo r

The contents of libstdc++.a are as follows:

INPUT(-lc++_static -lc++abi)
@ldm0 ldm0 self-assigned this Nov 29, 2023
@ldm0
Copy link
Collaborator

ldm0 commented Nov 29, 2023

Please try file /data/data/com.termux/files/usr/lib/libstdc++.a and ls -al /data/data/com.termux/files/usr/lib/libstdc++.a then put the command line output here. It looks like it's not an archive file.

@alexmozaidze
Copy link
Author

❯ file /data/data/com.termux/files/usr/lib/libstdc++.a
/data/data/com.termux/files/usr/lib/libstdc++.a: ASCII text

❯ ls -al /data/data/com.termux/files/usr/lib/libstdc++.a
-rw------- 1 u0_a363 u0_a363 29 Nov 22 19:57 /data/data/com.termux/files/usr/lib/libstdc++.a

@ldm0
Copy link
Collaborator

ldm0 commented Nov 29, 2023

/data/data/com.termux/files/usr/lib/libstdc++.a: ASCII text

This shows that your libstdc++.a is a text file rather than a valid archive. There is something wrong with Termux 🤔

@alexmozaidze
Copy link
Author

alexmozaidze commented Nov 29, 2023

I googled a bit and found out that it's a linker script, which is why it's not a conventional .a archive. I am not sure about it all myself, since I'm not even that good with linkers, but searching up "linker script" I found an old GNU LD Manual that may have some answers.

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