I’ve been trying to build a static version of VLC for a week now. I’ve tried every dirty trick i knew with no success. After some days of building and rebuilding hell I decided to ask the developers for some help. They said “It’s impossible!”, but I didn’t want to hear anything like this. I then tried and retried again and again, but ,again, with no success. The farthest that I came was an “a minimal all built in executable”, with dynamically linked libraries.
Ldd returned like 84 external shared library links. I then realized that the VLC build system was somehow buggy. I included all the switches that ./configure accepts in my configure script that allowed me faster source configuration. It helped me a lot, because I reduced the links to around 50.
I then tryed for 2 days to compile with the same configuration using statically linked libraries… guess what… it didn’t work. The VLC build system can’t build a statically linked executable. I think it’s just the build system problem.
The fastest thing to do, was to add some switches to ld like in the previous post and hardcode the path to the libraries in the final binary and then include a libs folder with the executable.
I thought: “Maybe it should be best to include the shared libc libraries in the package too.”, and guess what again… i didn’t work
Because I didn’t want to recompile glibc on my own I decided to make a distro dependent package.
It works for now. I’m not happy with this package, this is why I’m planning to rebuild it the proper way in the future.