VLC compilation problem

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
laatuv
New Cone
New Cone
Posts: 6
Joined: 25 Jul 2018 12:45

VLC compilation problem

Postby laatuv » 13 Aug 2018 11:58

Hello,

I've tried to build VLC pretty long time already. I've faced many problems, but finally I've been able to compile it and made an installation package. I've used these instructions as a guideline https://wiki.videolan.org/Win32Compile/.
My environment is Ubuntu 18.04, where I've built MinGW from source, so I was able to get gcc8 compiler, which does not have weak_ref error anymore. I've been trying to build VLC for 64bit from vlc 3.0 git repository and apparently current version there's 3.0.4.

At the moment I'm able to open VLC with wine on my Ubuntu and I'm able to play videos with it without any problems. Still I can see in my terminal this kind of error: 002e:err:module:import_dll Library libgcc_s_seh-1.dll (which is needed by L"Z:\\home\\laatuv\\vlc-3.0.4-win64\\vlc-3.0.4\\plugins\\access\\libaccess_srt_plugin.dll") not found. This is my only clue now, as when I try to open my packaged vlc on Windows, nothing happens, only download icon appears to my mouse for 1 sec, but after that it turns back to normal. I've tried to open vlc from cmd, powershell and msys panels/terminals. These also doesn't provide any error messages. I've also tried to place this dll file next to vlc.exe and other folders, which are requesting it, but it doesn't make any difference. I like to add that installer and uninstaller.exe's works on windows.

What I also realized is that my vlc.exe is like 5-6x smaller than the one which I can download from vlc websites.

Does anyone have an idea, what might be wrong in my compilation? I also would like to ask, is there any difference, if I use "build.sh" instead of doing configure first and then make?

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: VLC compilation problem

Postby unidan » 14 Aug 2018 11:28

Hi,

If you don't want to bother with installing tools in your system, you can use the docker image right from the CI: https://code.videolan.org/videolan/dock ... ree/master

The vlc-debian-win64 has every tools you might want so as to compile for windows. A guide using this method should definitively be written anyway as it is by far the easiest one. It should fix your issue too. You just have to run the ./extra/package/win32/build.sh file or follow what Travis does.

I believe the release version is bigger because there might be debugging symbols included so as to work with the crash reporting tool, but it's a shot in the dark.

laatuv
New Cone
New Cone
Posts: 6
Joined: 25 Jul 2018 12:45

Re: VLC compilation problem

Postby laatuv » 14 Aug 2018 12:30

Hello unidan and thanks for your reply!

I've never used docker to build anything, so that is why I have tried to fight my way to compile VLC with this toolchain. I already tried once building it with docker-image but that didn't lead me pretty far, mostly because I didn't have much clue what to do... Is there any chance that you could you provide a small guide, how to use this docker-image for building vlc? It would help me a lot.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: VLC compilation problem

Postby unidan » 14 Aug 2018 15:51

It should look like this, the -v option in docker run allows you to mount on of your directory directly into the docker container.

Code: Select all

# configuration, only each time you update the image docker pull registry.videolan.org:5000/vlc-debian-win64 docker images docker image -t vlc-debian-win64 theshaofthevlcimage # build time, inside the vlc directory docker run -it -v"$(pwd):/vlc" vlc-debian-win64 /bin/bash # inside the container cd /vlc && ./extra/package/win32/build.sh

laatuv
New Cone
New Cone
Posts: 6
Joined: 25 Jul 2018 12:45

Re: VLC compilation problem

Postby laatuv » 15 Aug 2018 12:38

Thanks unidan, your instructions helped and I was able to compile vlc, which also opened on Windows. Here's how I exactly did that:

For all commands outside the docker container I used sudo rights

1. Installed docker & docker.io from package manager
2. Pulled docker image with command: docker pull registry.videolan.org:5000/vlc-debian-win64 and after that I checked it exists with docker images command.
3. Downloaded vlc source with command git clone http://git.videolan.org/git/vlc.git vlc and then moved to vlc folder
4. In vlc folder I used command: docker run -it -v"$(pwd):/vlc" registry.videolan.org:5000/vlc-debian-win64 /bin/bash and now you are in the container!
5. Check numbers 7-9 first and come back to this! Did the same steps as unidan mentioned: /vlc && ./extra/package/win32/build.sh
6. Got libssp error with the first build, because libssp was misconfigured.
7. Downloaded nano from package manager apt-get update && apt-get install nano
8. Browsed myself to /opt/gcc-x86_64-w64-mingw32/x86_64-w64-mingw32/lib/ and opened libssp.la file with nano
9. Changed last line: libdir='/opt/gcc-x86_64-w64-mingw32/x86_64-w64-mingw32/lib' (for some reason build didn't understand ../ in this or .la files)
10. Did build again and went to win64/vlc-x-x-x folder, did "make package-win-common" there
11. Copied the whole folder from my virtualmachine to Windows host and it all worked!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: MSN [Bot] and 44 guests