Replies: 3 comments 5 replies
-
Hi there , it’s been a while since i doing this project , pls wait I will check my build , make sure I get static executable. : )
… 2022年1月8日 16:22,Mariusz Białończyk ***@***.***> 写道:
Hi!
I am wondering if there is some easy way to create a static build (with all ffmpeg functions inside) of a rust executable.
When I am compiling a sample test program which is using ffmpeg-next then the ldd on the result file (on target host) is:
$ ldd ./ffmpeg-test
linux-vdso.so.1 => (0x00007ffcfd719000)
libavutil.so.55 => not found
libavformat.so.57 => not found
libavfilter.so.6 => not found
libavdevice.so.57 => not found
libswscale.so.4 => not found
libswresample.so.2 => not found
libavcodec.so.57 => not found
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fe56e6d2000)
librt.so.1 => /lib64/librt.so.1 (0x00007fe56e4ca000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe56e2ae000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe56e0aa000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe56dcdc000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe56eb40000)
As the result I have to install ffmpeg. Is it possible to create a static binary with ffmpeg libs included in a result binary?
—
Reply to this email directly, view it on GitHub <#87>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD5YWCEOEE7XF2MFFCBAHDLUU7X2XANCNFSM5LQLMMSQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes , I checked my project build , it’s static by default . I am using this tool build my project and it’s static by default.
https://github.com/rust-embedded/cross <https://github.com/rust-embedded/cross>
I wish I can help you , but that’s all I get .
Also I use -vv option check out rustc args and I found this line during my build : cargo:rustc-link-lib=static=global_static
Check out the cross project I mention above , at least make you cross-building easier .
Wish you best.
… 2022年1月8日 16:22,Mariusz Białończyk ***@***.***> 写道:
Hi!
I am wondering if there is some easy way to create a static build (with all ffmpeg functions inside) of a rust executable.
When I am compiling a sample test program which is using ffmpeg-next then the ldd on the result file (on target host) is:
$ ldd ./ffmpeg-test
linux-vdso.so.1 => (0x00007ffcfd719000)
libavutil.so.55 => not found
libavformat.so.57 => not found
libavfilter.so.6 => not found
libavdevice.so.57 => not found
libswscale.so.4 => not found
libswresample.so.2 => not found
libavcodec.so.57 => not found
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fe56e6d2000)
librt.so.1 => /lib64/librt.so.1 (0x00007fe56e4ca000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fe56e2ae000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fe56e0aa000)
libc.so.6 => /lib64/libc.so.6 (0x00007fe56dcdc000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe56eb40000)
As the result I have to install ffmpeg. Is it possible to create a static binary with ffmpeg libs included in a result binary?
—
Reply to this email directly, view it on GitHub <#87>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AD5YWCEOEE7XF2MFFCBAHDLUU7X2XANCNFSM5LQLMMSQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.
|
Beta Was this translation helpful? Give feedback.
5 replies
-
yes , you must have .a for static link , i get -rw-r--r-- 1 root root 89252710 Dec 20 14:24 /usr/local/lib/libavcodec.a
lrwxrwxrwx 1 root root 23 Dec 20 14:24 /usr/local/lib/libavcodec.so -> libavcodec.so.58.91.100
lrwxrwxrwx 1 root root 23 Dec 20 14:24 /usr/local/lib/libavcodec.so.58 -> libavcodec.so.58.91.100
-rwxr-xr-x 1 root root 47078232 Dec 20 14:24 /usr/local/lib/libavcodec.so.58.91.100 if you use system package manager ( apt , yum ) install your ffmpeg , there may be just shared library , or you can try to install dev-package , eg. ffmpeg-dev or something , depend on your linux system. if you compile ffmpeg yourself , you may add i think your problem can be solved : ) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am wondering if there is some easy way to create a static build (with all ffmpeg functions inside) of a rust executable.
When I am compiling a sample test program which is using
ffmpeg-next
then theldd
on the result file (on target host) is:As the result I have to install ffmpeg. Is it possible to create a static binary with ffmpeg libs included in a result binary?
Beta Was this translation helpful? Give feedback.
All reactions