Problems cross compiling VLC using Docker for Windows

This forum is about all development around libVLC.
mezzode
New Cone
New Cone
Posts: 5
Joined: 08 Apr 2019 15:54

Problems cross compiling VLC using Docker for Windows

Postby mezzode » 08 Apr 2019 15:57

I'm having issues cross compiling VLC following https://forum.videolan.org/viewtopic.php?f=14&t=146175

I keep running into this:

Code: Select all

[100%] Built target aom_av1_encoder_sse2 make[2]: Leaving directory '/vlc/contrib/contrib-win64/aom/aom_build' make[1]: Leaving directory '/vlc/contrib/contrib-win64/aom/aom_build' cd aom/aom_build && ../../../../contrib/src/pkg-static.sh aom.pc mv: cannot move 'aom.pc.tmp' to 'aom.pc': No such file or directory ../../contrib/src/aom/rules.mak:94: recipe for target '.aom' failed make: *** [.aom] Error 1

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

Re: Problems cross compiling VLC using Docker for Windows

Postby unidan » 08 Apr 2019 16:00

Hi, you should use the extras/package/win32/build.sh script directly ;)
What are the steps that you did ?

mezzode
New Cone
New Cone
Posts: 5
Joined: 08 Apr 2019 15:54

Re: Problems cross compiling VLC using Docker for Windows

Postby mezzode » 09 Apr 2019 04:22

I just followed the most recent instructions at the post:
6 sudo docker run -v ~/win64:/win64 -i -t registry.videolan.org:5000/vlc-debian-win64 /bin/bash (...you will now be running the build environment from a docker container as root)
7 apt-get update (updates the docker repositories)
8 apt-get install python (installs python on the docker image. Needed to compile Qt stuff later)
9 cd win64
10 git clone https://git.videolan.org/git/vlc
11 cd vlc
12 ./extras/package/win32/build.sh -a x86_64 -i r

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

Re: Problems cross compiling VLC using Docker for Windows

Postby unidan » 09 Apr 2019 09:41

First I would say that you should clone vlc before going into the docker container, otherwise you have to start from scratch each time it fails.

You can check this to understand how to build your full environment: https://gitlab.com/garfvl/local-vlc-compile-env

Then, registry.videolan.org:5000/vlc-debian-win64 defaults to registry.videolan.org:5000/vlc-debian-win64:latest, which is not the latest docker image. You can see on the link above how to get the latest one.

Can you try again with these two points fixed ?

mezzode
New Cone
New Cone
Posts: 5
Joined: 08 Apr 2019 15:54

Re: Problems cross compiling VLC using Docker for Windows

Postby mezzode » 09 Apr 2019 11:39

I'm using a volume mount so the repo persists anyway.

I got the "real" latest image using the script from the repo:

Code: Select all

apt update && apt install curl -y && curl -X GET "https://registry.videolan.org/v2/vlc-debian-win64/tags/list" | sed 's;";;g' | grep -o 'tags:\[[^\]*]' | sed 's;tags:\[\([^\]*\)];\1;' | tr ',' '\n' | grep -v "latest" | sort | tail -n 1
Which told me to use the 20190408183412 tag, which unfortunately still fails.

Code: Select all

docker run -v D:\projects\vlc2:/vlc -i -t registry.videolan.org:5000/vlc-debian-win64:20190408183412 /bin/bash
In the container:

Code: Select all

./extras/package/win32/build.sh -a x86_64 -i n
Fails at the same place.

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

Re: Problems cross compiling VLC using Docker for Windows

Postby unidan » 09 Apr 2019 11:45

If you don't find why it fails, you can remove aom from the build in the ../bootstrap for the contribs (pass --disable-aom inside build.sh).

mezzode
New Cone
New Cone
Posts: 5
Joined: 08 Apr 2019 15:54

Re: Problems cross compiling VLC using Docker for Windows

Postby mezzode » 09 Apr 2019 13:15

It's getting past the original error now but failing down the line.

Code: Select all

mv: cannot move 'source/x265.pc.in.tmp' to 'source/x265.pc.in': No such file or directory ../../contrib/src/x265/rules.mak:28: recipe for target 'x265' failed make: *** [x265] Error 1 make: Target 'all' not remade because of errors. + make -j1 rm -f -R aribb24 && tar xvzfo ../../contrib/tarballs/aribb24-1.0.3.tar.gz aribb24-1.0.3/ aribb24-1.0.3/.gitignore aribb24-1.0.3/COPYING aribb24-1.0.3/Makefile.am aribb24-1.0.3/README.md aribb24-1.0.3/bootstrap aribb24-1.0.3/configure.ac aribb24-1.0.3/src/ aribb24-1.0.3/src/aribb24.c aribb24-1.0.3/src/aribb24.pc.in aribb24-1.0.3/src/aribb24/ aribb24-1.0.3/src/aribb24/aribb24.h aribb24-1.0.3/src/aribb24/bits.h aribb24-1.0.3/src/aribb24/decoder.h aribb24-1.0.3/src/aribb24/parser.h aribb24-1.0.3/src/aribb24_private.h aribb24-1.0.3/src/convtable.h aribb24-1.0.3/src/decoder.c aribb24-1.0.3/src/decoder_macro.h aribb24-1.0.3/src/decoder_private.h aribb24-1.0.3/src/drcs.c aribb24-1.0.3/src/drcs.h aribb24-1.0.3/src/md5.c aribb24-1.0.3/src/md5.h aribb24-1.0.3/src/parser.c aribb24-1.0.3/src/parser_private.h (cd aribb24-1.0.3 && patch -fp1) < ../../contrib/src/aribb24/libm.patch patching file configure.ac patching file src/aribb24.pc.in (cd aribb24-1.0.3 && ../../../contrib/src/pkg-static.sh "src/aribb24.pc.in") mv: cannot move 'src/aribb24.pc.in.tmp' to 'src/aribb24.pc.in': No such file or directory ../../contrib/src/aribb24/rules.mak:21: recipe for target 'aribb24' failed make: *** [aribb24] Error 1
I tried using prebuilt contrib (for 4.X) as recommended by https://gitlab.com/garfvl/local-vlc-compile-env but that didn't fix it.
Tip 2: use prebuilt contrib
```bash
$ mkdir -p contrib/contrib-win64 && cd contrib/contrib-win64
$ export URLPREFIX="http://nightlies.videolan.org/build/win ... 4-mingw32-" # for vlc 3.X
$ export URLPREFIX="http://nightlies.videolan.org/build/win ... 4-mingw32-" # for vlc 4.X
$ wget ${URLPREFIX}`date +%Y%m%d`.tar.bz2 -O vlc-contrib-x86_64-w64-mingw32-latest.tar.bz2 || wget ${URLPREFIX}`date --date=yesterday +%Y%m%d`.tar.bz2 -O vlc-contrib-x86_64-w64-mingw32-latest.tar.bz2
$ cd ../..
$ compile-vlc-win64 extras/package/win32/build.sh -p -a x86_64
```

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

Re: Problems cross compiling VLC using Docker for Windows

Postby unidan » 09 Apr 2019 13:21

If you want to use prebuilt, first remove the contrib/contrib-win64 and contrib/x86_64-.... directories.
But something looks weird in your configuration. do you compile from vlc's root directory ?

Did you clean up everything before doing so ?

mezzode
New Cone
New Cone
Posts: 5
Joined: 08 Apr 2019 15:54

Re: Problems cross compiling VLC using Docker for Windows

Postby mezzode » 10 Apr 2019 13:33

I am compiling from the root directory. Wasn't sure what I needed to be cleaning up between compiles, I ended up just re-cloning the repo and using prebuilt and it didnt error out! Not sure what to do next though, I can't run win64/vlc.exe, do I need to package it like https://wiki.videolan.org/Win32Compile#Packaging_VLC or something else?

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

Re: Problems cross compiling VLC using Docker for Windows

Postby unidan » 10 Apr 2019 14:37

After used build.sh, you can do

Code: Select all

make package-win-common
to have a directory that you can share.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 32 guests