From dd776564c07aa32bdea14b5e826bda0e69ce31a0 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Fri, 29 Nov 2024 23:21:16 -0600 Subject: [PATCH 01/17] Switch to new windows build image. --- .github/opam/liquidsoap-core-windows.opam | 3 +++ .github/workflows/ci.yml | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index a75bcc1ddb..29e4a39cd3 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -30,6 +30,9 @@ depends: [ "magic-mime-windows" "menhir" "menhirLib-windows" + "uri" + "uri-windows" + "ocurl-windows" "mem_usage-windows" {>= "0.1.1"} "metadata-windows" {>= "0.3.0"} "dune-site-windows" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0495270eea..c37319a3c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -482,14 +482,14 @@ jobs: path: ${{ github.workspace }}/${{ github.run_number }}/s3-artifacts build_win32: - runs-on: ubuntu-latest + runs-on: depot-ubuntu-22.04-4 needs: build_details strategy: fail-fast: false matrix: system: [x64] container: - image: savonet/liquidsoap-win32-deps-${{ matrix.system }} + image: savonet/liquidsoap-win32-${{ matrix.system }} options: --user root -v ${{ github.workspace }}/${{ github.run_number }}:/tmp/${{ github.run_number }} env: OPAM_DEPS: ao-windows,lastfm-windows,camomile-windows,cry-windows,dtools-windows,duppy-windows,ffmpeg-windows,ffmpeg-avutil-windows,mm-windows,re-windows,portaudio-windows,samplerate-windows,sedlex-windows,ssl-windows,srt-windows,winsvc-windows,mem_usage-windows From 3d1c08db74dccf45a5dab1721dacf2283eb98395 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Fri, 29 Nov 2024 23:38:41 -0600 Subject: [PATCH 02/17] Try this. --- .github/scripts/build-win32.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/scripts/build-win32.sh b/.github/scripts/build-win32.sh index 1daa3284f6..3641c25dd3 100755 --- a/.github/scripts/build-win32.sh +++ b/.github/scripts/build-win32.sh @@ -42,15 +42,9 @@ export CC="" echo "::group::Installing deps" eval "$(opam config env)" -opam repository set-url default https://github.com/ocaml/opam-repository.git -opam repository set-url windows https://github.com/ocaml-cross/opam-cross-windows.git +cd /home/opam/opam-cross-windows +git pull --rebase https://github.com/ocaml-cross/opam-cross-windows.git main opam update windows -# shellcheck disable=SC2046 -opam upgrade -y $(echo "$OPAM_DEPS" | sed -e 's#,# #g') ffmpeg-windows ffmpeg-avutil-windows -opam remove -y pcre-windows - -# Debug -opam reinstall -y cry-windows echo "::endgroup::" From f7453c7412acec51b1d0c810fb86f8ddc974ea4c Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Fri, 29 Nov 2024 23:47:57 -0600 Subject: [PATCH 03/17] Remove this for now. --- .github/scripts/build-win32.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/scripts/build-win32.sh b/.github/scripts/build-win32.sh index 3641c25dd3..c2a4681c36 100755 --- a/.github/scripts/build-win32.sh +++ b/.github/scripts/build-win32.sh @@ -39,15 +39,6 @@ export OPAMSOLVERTIMEOUT=480 export OPAMJOBS="$CPU_CORES" export CC="" -echo "::group::Installing deps" - -eval "$(opam config env)" -cd /home/opam/opam-cross-windows -git pull --rebase https://github.com/ocaml-cross/opam-cross-windows.git main -opam update windows - -echo "::endgroup::" - echo "::group::Install liquidsoap-windows" opam install -y liquidsoap-core-windows echo "::endgroup::" From fdcafd95ac8ad9a3d1215c65a55d2f23a684085f Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Fri, 29 Nov 2024 23:58:38 -0600 Subject: [PATCH 04/17] Bring this back. --- .github/scripts/build-win32.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/scripts/build-win32.sh b/.github/scripts/build-win32.sh index c2a4681c36..68a6fbd092 100755 --- a/.github/scripts/build-win32.sh +++ b/.github/scripts/build-win32.sh @@ -39,6 +39,14 @@ export OPAMSOLVERTIMEOUT=480 export OPAMJOBS="$CPU_CORES" export CC="" +echo "::group::Installing deps" + +eval "$(opam config env)" +opam repository set-url windows https://github.com/ocaml-cross/opam-cross-windows.git +opam update windows + +echo "::endgroup::" + echo "::group::Install liquidsoap-windows" opam install -y liquidsoap-core-windows echo "::endgroup::" From 9105c178228c64aa9f2d64cec93fc9e7aa65e699 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 00:43:45 -0600 Subject: [PATCH 05/17] curl-windows --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 29e4a39cd3..142b94dc81 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -32,7 +32,7 @@ depends: [ "menhirLib-windows" "uri" "uri-windows" - "ocurl-windows" + "curl-windows" "mem_usage-windows" {>= "0.1.1"} "metadata-windows" {>= "0.3.0"} "dune-site-windows" From bbb80d0f751ea973fc01c6e5473f991e12131920 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 00:52:16 -0600 Subject: [PATCH 06/17] Add this. --- .github/opam/liquidsoap-core-windows.opam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 142b94dc81..3c7da65336 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -32,6 +32,8 @@ depends: [ "menhirLib-windows" "uri" "uri-windows" + "fileutils" + "fileutils-windows" "curl-windows" "mem_usage-windows" {>= "0.1.1"} "metadata-windows" {>= "0.3.0"} From 9523dbfd0bc0c626482b891ff74ba54311eb682c Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:00:23 -0600 Subject: [PATCH 07/17] Add this. --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 3c7da65336..72f9ca81d2 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac" + "LDFLAGS=-lssp -lfdk-aac -lcurl" "dune" "build" "-x" From e3f62f9870ceb688876a8ecb9c1d194284a6046c Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:06:25 -0600 Subject: [PATCH 08/17] Add this. --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 72f9ca81d2..9f94163962 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lldap" "dune" "build" "-x" From 0d42127384857fa1fc5c54beb82e1db43f291354 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:12:50 -0600 Subject: [PATCH 09/17] And that. --- src/core/tools/unix_c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/tools/unix_c.c b/src/core/tools/unix_c.c index 46fe7e0a5c..2f2316a4b8 100644 --- a/src/core/tools/unix_c.c +++ b/src/core/tools/unix_c.c @@ -1,5 +1,6 @@ #ifdef _WIN32 #include +#include #include #else #define _GNU_SOURCE From c500f85d53837b32325d8de95f76011eff883208 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:14:47 -0600 Subject: [PATCH 10/17] Better. --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 9f94163962..19d35353c7 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lldap" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32" "dune" "build" "-x" From 193f55e3c517286eb816e0322545f8593f3ce406 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:22:14 -0600 Subject: [PATCH 11/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 19d35353c7..1f0072ae66 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl" "dune" "build" "-x" From 146621072b47e74a17f0234b744ba5e909000f3a Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:32:06 -0600 Subject: [PATCH 12/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 1f0072ae66..93eca98460 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2" "dune" "build" "-x" From ea704504ff850ef82b1b05fc68f7872f7956302c Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 01:38:49 -0600 Subject: [PATCH 13/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 93eca98460..54a54810e7 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl" "dune" "build" "-x" From d2720574136e1ec0eb13ad4756add6b88823f1aa Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 08:12:49 -0600 Subject: [PATCH 14/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 54a54810e7..2147aed7da 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2" "dune" "build" "-x" From 29aade226a4cc8985e0e0ea9bf22276cc6f7e0d6 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 09:13:32 -0600 Subject: [PATCH 15/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index 2147aed7da..eb4966988d 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2 -lav" "dune" "build" "-x" From 9bb8cd3d91b76473f582100478a1f84d6bd3062d Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 09:26:15 -0600 Subject: [PATCH 16/17] Update liquidsoap-core-windows.opam --- .github/opam/liquidsoap-core-windows.opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index eb4966988d..d66d721a9f 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2 -lav" + "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2 -lavutil" "dune" "build" "-x" From b2d1dda2eebd57e4ba14887d8d01438b9cc95285 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sat, 30 Nov 2024 12:35:16 -0600 Subject: [PATCH 17/17] Try this. --- .github/opam/liquidsoap-core-windows.opam | 2 +- scripts/dune | 2 +- src/bin/dune | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/opam/liquidsoap-core-windows.opam b/.github/opam/liquidsoap-core-windows.opam index d66d721a9f..ffda9f1e75 100644 --- a/.github/opam/liquidsoap-core-windows.opam +++ b/.github/opam/liquidsoap-core-windows.opam @@ -128,7 +128,7 @@ build: [ "LIQUIDSOAP_BUILD_TARGET=standalone" "LIQUIDSOAP_SYS_CONFIG=mingw" "LIQUIDSOAP_ENABLE_BUILD_CONFIG=false" - "LDFLAGS=-lssp -lfdk-aac -lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2 -lavutil" + "LIQ_LDFLAGS=-lcurl -lwldap32 -ldl -lnghttp2 -lpsl -lssh2 -lidn2 -lzstd -lunistring -lbrotlicommon -lbrotlidec -lcrypt32 -liconv -lpthread -lz -lbcrypt -lwinmm -lksuser -link /usr/src/mxe/usr/x86_64-w64-mingw32.static/lib/libavutil.a" "dune" "build" "-x" diff --git a/scripts/dune b/scripts/dune index b96c64c5e6..01550d6dc8 100644 --- a/scripts/dune +++ b/scripts/dune @@ -1,6 +1,6 @@ (executable (name gen_emacs_completion) - (link_flags -cclib %{env:LDFLAGS=}) + (link_flags -cclib %{env:LIQ_LDFLAGS=}) (libraries liquidsoap_runtime) (modules gen_emacs_completion)) diff --git a/src/bin/dune b/src/bin/dune index f94ad5af4f..667bbe82c1 100644 --- a/src/bin/dune +++ b/src/bin/dune @@ -2,7 +2,7 @@ (name liquidsoap) (public_name liquidsoap) (package liquidsoap-core) - (link_flags -cclib %{env:LDFLAGS=}) + (link_flags -cclib %{env:LIQ_LDFLAGS=}) (libraries liquidsoap_runtime) (modules liquidsoap))