MediaArea / MediaInfo

Convenient unified display of the most relevant technical and tag data for video and audio files.
https://MediaArea.net/MediaInfo
BSD 2-Clause "Simplified" License
1.41k stars 160 forks source link

how to build static mediainfo without dependent system libraries? #268

Open andrewmabc opened 6 years ago

andrewmabc commented 6 years ago

I refer to the following webpage, and build mediainfo. But there are dependent system libraries. https://github.com/MediaArea/MediaInfo

ldd ./mediainfo linux-vdso.so.1 => (0x00007ffe7e3b6000) libz.so.1 => /lib64/libz.so.1 (0x00007f91d1cc3000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f91d1aa6000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f91d179e000) libm.so.6 => /lib64/libm.so.6 (0x00007f91d149c000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f91d1285000) libc.so.6 => /lib64/libc.so.6 (0x00007f91d0ec2000) /lib64/ld-linux-x86-64.so.2 (0x000055c09c0e9000)

Is there any way to build static mediainfo without dependent system libraries?

Thanks!

Regards

andrew

JeromeMartinez commented 6 years ago

We developed script for static building of all not system. You are on your own for static building of system libs, it is classic autotools stuff, a patch would be appreciated if you develop this support. Contact us directly if you want us to develop it.

Revan654 commented 6 years ago

If your asking if you could build the exe/linuxfile and then run that .exe/linuxfile without the need to other dll and such files, Then yes it's possible. I did it last night using MSYS2 setup.

Here are the Flags I was using:

CFLAGS: -mthreads -mtune=generic -O2 -pipe LDFLAGS: -pipe -static-libgcc -static-libstdc++ CMAKE: -G Ninja -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=/local64 -DUNIX=on -DCMAKE_BUILD_TYPE=Release -DBUILD_ZLIB=off -DBUILD_ZENLIB=off

Maybe this will be a helpful starting point.