From e903b190d7d0c0f5d8600cdaa5208fe5bb7951d9 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:10:31 +0300 Subject: [PATCH 01/20] Try Postgres 17 on Windows --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 99a2438..447efb4 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -39,7 +39,7 @@ jobs: username: ci password: sw0rdfish database: test - postgres-version: "14" + postgres-version: "17" - name: Checkout uses: actions/checkout@v4 From 04e3665c634372046dc969f1d2e0db32577fee0c Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:24:12 +0300 Subject: [PATCH 02/20] another try --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 447efb4..53fa20f 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -33,7 +33,7 @@ jobs: cabal-version: '3.10.2.0' - name: Set up PostgreSQL - uses: ikalnytskyi/action-setup-postgres@v6 + uses: ikalnytskyi/action-setup-postgres@v7 id: postgres with: username: ci From 956e4c5f49c838f067e3dea43c700d39e5323bab Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:33:48 +0300 Subject: [PATCH 03/20] Try 16 --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 53fa20f..06142f4 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -39,7 +39,7 @@ jobs: username: ci password: sw0rdfish database: test - postgres-version: "17" + postgres-version: "16" - name: Checkout uses: actions/checkout@v4 From a9b2ba645054e3a341e11dd9dab31a7eb24af0c0 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:40:19 +0300 Subject: [PATCH 04/20] Try 17 again --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 06142f4..53fa20f 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -39,7 +39,7 @@ jobs: username: ci password: sw0rdfish database: test - postgres-version: "16" + postgres-version: "17" - name: Checkout uses: actions/checkout@v4 From f63e7d06247b759e82c60f8156da22a5fd35e69b Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:44:49 +0300 Subject: [PATCH 05/20] try again --- postgresql-libpq-configure/configure | 8 +++++++- postgresql-libpq-configure/m4/ax_lib_postgresql.m4 | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index fe392c1..7c6a0ab 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -3911,10 +3911,14 @@ if test ${ac_cv_POSTGRESQL_LIBS+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_POSTGRESQL_LIBS="-lpq" + ac_cv_POSTGRESQL_LIBS="`"$PG_CONFIG" --libs`" || _AX_LIB_POSTGRESQL_OLD_fail=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LIBS" >&5 printf "%s\n" "$ac_cv_POSTGRESQL_LIBS" >&6; } + if test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes" +then : + break +fi POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL version" >&5 @@ -3987,6 +3991,8 @@ then : break fi + $PG_CONFIG + found_postgresql="yes" break done diff --git a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 index fea8da1..298991a 100644 --- a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 +++ b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 @@ -75,7 +75,8 @@ AC_DEFUN([_AX_LIB_POSTGRESQL_OLD],[ POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS" AC_CACHE_CHECK([for the PostgreSQL libraries LIBS],[ac_cv_POSTGRESQL_LIBS], - [ac_cv_POSTGRESQL_LIBS="-lpq"]) + [ac_cv_POSTGRESQL_LIBS="`"$PG_CONFIG" --libs`" || _AX_LIB_POSTGRESQL_OLD_fail=yes]) + AS_IF([test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"],[break]) POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS" AC_CACHE_CHECK([for the PostgreSQL version],[ac_cv_POSTGRESQL_VERSION], @@ -98,6 +99,8 @@ AC_DEFUN([_AX_LIB_POSTGRESQL_OLD],[ ]) AS_IF([test "X$found_postgresql_req_version" = "Xno"],[break]) + $PG_CONFIG + found_postgresql="yes" break done From 2e91d33b9fe881b532e5b29d32dd73a1526e38af Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:53:00 +0300 Subject: [PATCH 06/20] try again again --- postgresql-libpq-configure/configure | 94 +------------------ .../m4/ax_lib_postgresql.m4 | 35 ++++--- 2 files changed, 19 insertions(+), 110 deletions(-) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index 7c6a0ab..c3c5f95 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1520,53 +1520,6 @@ printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - } -then : - ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link ac_configure_args_raw= for ac_arg do @@ -3911,14 +3864,10 @@ if test ${ac_cv_POSTGRESQL_LIBS+y} then : printf %s "(cached) " >&6 else $as_nop - ac_cv_POSTGRESQL_LIBS="`"$PG_CONFIG" --libs`" || _AX_LIB_POSTGRESQL_OLD_fail=yes + ac_cv_POSTGRESQL_LIBS="-lpq" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_POSTGRESQL_LIBS" >&5 printf "%s\n" "$ac_cv_POSTGRESQL_LIBS" >&6; } - if test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes" -then : - break -fi POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL version" >&5 @@ -4021,46 +3970,7 @@ fi then : break fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL library linking is working" >&5 -printf %s "checking for the PostgreSQL library linking is working... " >&6; } -if test ${ac_cv_postgresql_found+y} -then : - printf %s "(cached) " >&6 -else $as_nop - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - - #include - -int -main (void) -{ - - char conninfo[]="dbname = postgres"; - PGconn *conn; - conn = PQconnectdb(conninfo); - - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_postgresql_found=yes -else $as_nop - ac_cv_postgresql_found=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_postgresql_found" >&5 -printf "%s\n" "$ac_cv_postgresql_found" >&6; } - found_postgresql="$ac_cv_postgresql_found" + found_postgresql="$ac_cv_postgresql_found" if test "X$found_postgresql" = "Xno" then : break diff --git a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 index 298991a..7c9cc7d 100644 --- a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 +++ b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 @@ -75,8 +75,7 @@ AC_DEFUN([_AX_LIB_POSTGRESQL_OLD],[ POSTGRESQL_LDFLAGS="$ac_cv_POSTGRESQL_LDFLAGS" AC_CACHE_CHECK([for the PostgreSQL libraries LIBS],[ac_cv_POSTGRESQL_LIBS], - [ac_cv_POSTGRESQL_LIBS="`"$PG_CONFIG" --libs`" || _AX_LIB_POSTGRESQL_OLD_fail=yes]) - AS_IF([test "X$_AX_LIB_POSTGRESQL_OLD_fail" = "Xyes"],[break]) + [ac_cv_POSTGRESQL_LIBS="-lpq"]) POSTGRESQL_LIBS="$ac_cv_POSTGRESQL_LIBS" AC_CACHE_CHECK([for the PostgreSQL version],[ac_cv_POSTGRESQL_VERSION], @@ -207,22 +206,22 @@ AC_DEFUN([AX_LIB_POSTGRESQL], AC_CHECK_HEADER([libpq-fe.h],[],[found_postgresql=no]) AS_IF([test "X$found_postgresql" = "Xno"],[break]) dnl try now to link - AC_CACHE_CHECK([for the PostgreSQL library linking is working],[ac_cv_postgresql_found], - [ - AC_LINK_IFELSE([ - AC_LANG_PROGRAM( - [ - #include - ], - [[ - char conninfo[]="dbname = postgres"; - PGconn *conn; - conn = PQconnectdb(conninfo); - ]] - ) - ],[ac_cv_postgresql_found=yes], - [ac_cv_postgresql_found=no]) - ]) +dnl AC_CACHE_CHECK([for the PostgreSQL library linking is working],[ac_cv_postgresql_found], +dnl [ +dnl AC_LINK_IFELSE([ +dnl AC_LANG_PROGRAM( +dnl [ +dnl #include +dnl ], +dnl [[ +dnl char conninfo[]="dbname = postgres"; +dnl PGconn *conn; +dnl conn = PQconnectdb(conninfo); +dnl ]] +dnl ) +dnl ],[ac_cv_postgresql_found=yes], +dnl [ac_cv_postgresql_found=no]) +dnl ]) found_postgresql="$ac_cv_postgresql_found" AS_IF([test "X$found_postgresql" = "Xno"],[break]) break From 32a3f7ad9b5fe93f4df0333caee980edde5e1db2 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 21:56:42 +0300 Subject: [PATCH 07/20] printf debug --- postgresql-libpq-configure/configure | 90 ++++++++++++++++++- .../m4/ax_lib_postgresql.m4 | 32 +++---- 2 files changed, 105 insertions(+), 17 deletions(-) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index c3c5f95..64b50e4 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1520,6 +1520,55 @@ printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + echo "$ac_link" + "$ac_link" || true + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link ac_configure_args_raw= for ac_arg do @@ -3970,7 +4019,46 @@ fi then : break fi - found_postgresql="$ac_cv_postgresql_found" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the PostgreSQL library linking is working" >&5 +printf %s "checking for the PostgreSQL library linking is working... " >&6; } +if test ${ac_cv_postgresql_found+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + char conninfo[]="dbname = postgres"; + PGconn *conn; + conn = PQconnectdb(conninfo); + + + ; + return 0; +} + +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ac_cv_postgresql_found=yes +else $as_nop + ac_cv_postgresql_found=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_postgresql_found" >&5 +printf "%s\n" "$ac_cv_postgresql_found" >&6; } + found_postgresql="$ac_cv_postgresql_found" if test "X$found_postgresql" = "Xno" then : break diff --git a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 index 7c9cc7d..3272f5e 100644 --- a/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 +++ b/postgresql-libpq-configure/m4/ax_lib_postgresql.m4 @@ -206,22 +206,22 @@ AC_DEFUN([AX_LIB_POSTGRESQL], AC_CHECK_HEADER([libpq-fe.h],[],[found_postgresql=no]) AS_IF([test "X$found_postgresql" = "Xno"],[break]) dnl try now to link -dnl AC_CACHE_CHECK([for the PostgreSQL library linking is working],[ac_cv_postgresql_found], -dnl [ -dnl AC_LINK_IFELSE([ -dnl AC_LANG_PROGRAM( -dnl [ -dnl #include -dnl ], -dnl [[ -dnl char conninfo[]="dbname = postgres"; -dnl PGconn *conn; -dnl conn = PQconnectdb(conninfo); -dnl ]] -dnl ) -dnl ],[ac_cv_postgresql_found=yes], -dnl [ac_cv_postgresql_found=no]) -dnl ]) + AC_CACHE_CHECK([for the PostgreSQL library linking is working],[ac_cv_postgresql_found], + [ + AC_LINK_IFELSE([ + AC_LANG_PROGRAM( + [ + #include + ], + [[ + char conninfo[]="dbname = postgres"; + PGconn *conn; + conn = PQconnectdb(conninfo); + ]] + ) + ],[ac_cv_postgresql_found=yes], + [ac_cv_postgresql_found=no]) + ]) found_postgresql="$ac_cv_postgresql_found" AS_IF([test "X$found_postgresql" = "Xno"],[break]) break From 08e6e27a0aa70c95c35574d9c297a43d2a1bd343 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:01:46 +0300 Subject: [PATCH 08/20] another --- postgresql-libpq-configure/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index 64b50e4..c00eb51 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1536,7 +1536,7 @@ esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 echo "$ac_link" - "$ac_link" || true + (eval "$ac_link") || true (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then From b8708332be7e2554fe4523f705129f2e73e2a9cf Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:04:19 +0300 Subject: [PATCH 09/20] less jobs --- .github/workflows/haskell-ci.yml | 277 ------------------------------- .github/workflows/simple.yml | 2 +- 2 files changed, 1 insertion(+), 278 deletions(-) delete mode 100644 .github/workflows/haskell-ci.yml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml deleted file mode 100644 index 705288a..0000000 --- a/.github/workflows/haskell-ci.yml +++ /dev/null @@ -1,277 +0,0 @@ -# This GitHub workflow config has been generated by a script via -# -# haskell-ci 'github' 'cabal.project' -# -# To regenerate the script (for example after adjusting tested-with) run -# -# haskell-ci regenerate -# -# For more information, see https://github.com/haskell-CI/haskell-ci -# -# version: 0.19.20250605 -# -# REGENDATA ("0.19.20250605",["github","cabal.project"]) -# -name: Haskell-CI -on: - push: - branches: - - master - pull_request: - branches: - - master -jobs: - linux: - name: Haskell-CI - Linux - ${{ matrix.compiler }} - runs-on: ubuntu-24.04 - timeout-minutes: - 60 - container: - image: buildpack-deps:jammy - services: - postgres: - image: postgres:14 - env: - POSTGRES_PASSWORD: postgres - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - continue-on-error: ${{ matrix.allow-failure }} - strategy: - matrix: - include: - - compiler: ghc-9.12.1 - compilerKind: ghc - compilerVersion: 9.12.1 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.10.1 - compilerKind: ghc - compilerVersion: 9.10.1 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.8.4 - compilerKind: ghc - compilerVersion: 9.8.4 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.6.6 - compilerKind: ghc - compilerVersion: 9.6.6 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.4.8 - compilerKind: ghc - compilerVersion: 9.4.8 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.2.8 - compilerKind: ghc - compilerVersion: 9.2.8 - setup-method: ghcup - allow-failure: false - - compiler: ghc-9.0.2 - compilerKind: ghc - compilerVersion: 9.0.2 - setup-method: ghcup - allow-failure: false - - compiler: ghc-8.10.7 - compilerKind: ghc - compilerVersion: 8.10.7 - setup-method: ghcup - allow-failure: false - - compiler: ghc-8.8.4 - compilerKind: ghc - compilerVersion: 8.8.4 - setup-method: ghcup - allow-failure: false - - compiler: ghc-8.6.5 - compilerKind: ghc - compilerVersion: 8.6.5 - setup-method: ghcup - allow-failure: false - fail-fast: false - steps: - - name: apt-get install - run: | - apt-get update - apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 - apt-get install -y libpq-dev - - name: Install GHCup - run: | - mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup" - chmod a+x "$HOME/.ghcup/bin/ghcup" - - name: Install cabal-install - run: | - "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) - echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" - - name: Install GHC (GHCup) - if: matrix.setup-method == 'ghcup' - run: | - "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") - HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') - HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') - echo "HC=$HC" >> "$GITHUB_ENV" - echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" - echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: Set PATH and environment variables - run: | - echo "$HOME/.cabal/bin" >> $GITHUB_PATH - echo "LANG=C.UTF-8" >> "$GITHUB_ENV" - echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" - echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" - HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') - echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" - echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" - echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" - echo "HEADHACKAGE=false" >> "$GITHUB_ENV" - echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" - env: - HCKIND: ${{ matrix.compilerKind }} - HCNAME: ${{ matrix.compiler }} - HCVER: ${{ matrix.compilerVersion }} - - name: env - run: | - env - - name: write cabal config - run: | - mkdir -p $CABAL_DIR - cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz - echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - - xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan - rm -f cabal-plan.xz - chmod a+x $HOME/.cabal/bin/cabal-plan - cabal-plan --version - - name: checkout - uses: actions/checkout@v4 - with: - path: source - - name: initial cabal.project for sdist - run: | - touch cabal.project - echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project - echo "packages: $GITHUB_WORKSPACE/source/postgresql-libpq-pkgconfig" >> cabal.project - echo "packages: $GITHUB_WORKSPACE/source/postgresql-libpq-configure" >> cabal.project - cat cabal.project - - name: sdist - run: | - mkdir -p sdist - $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist - - name: unpack - run: | - mkdir -p unpacked - find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; - - name: generate cabal.project - run: | - PKGDIR_postgresql_libpq="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/postgresql-libpq-[0-9.]*')" - echo "PKGDIR_postgresql_libpq=${PKGDIR_postgresql_libpq}" >> "$GITHUB_ENV" - PKGDIR_postgresql_libpq_pkgconfig="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/postgresql-libpq-pkgconfig-[0-9.]*')" - echo "PKGDIR_postgresql_libpq_pkgconfig=${PKGDIR_postgresql_libpq_pkgconfig}" >> "$GITHUB_ENV" - PKGDIR_postgresql_libpq_configure="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/postgresql-libpq-configure-[0-9.]*')" - echo "PKGDIR_postgresql_libpq_configure=${PKGDIR_postgresql_libpq_configure}" >> "$GITHUB_ENV" - rm -f cabal.project cabal.project.local - touch cabal.project - touch cabal.project.local - echo "packages: ${PKGDIR_postgresql_libpq}" >> cabal.project - echo "packages: ${PKGDIR_postgresql_libpq_pkgconfig}" >> cabal.project - echo "packages: ${PKGDIR_postgresql_libpq_configure}" >> cabal.project - echo "package postgresql-libpq" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project - echo "package postgresql-libpq-pkgconfig" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project - echo "package postgresql-libpq-configure" >> cabal.project - echo " ghc-options: -Werror=missing-methods" >> cabal.project - cat >> cabal.project <> cabal.project.local - cat cabal.project - cat cabal.project.local - - name: dump install plan - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all - cabal-plan - - name: restore cache - uses: actions/cache/restore@v4 - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - - name: install dependencies - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all - - name: build w/o tests - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: build - run: | - $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always - - name: tests - run: | - $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct - - name: cabal check - run: | - cd ${PKGDIR_postgresql_libpq} || false - ${CABAL} -vnormal check - cd ${PKGDIR_postgresql_libpq_pkgconfig} || false - ${CABAL} -vnormal check - cd ${PKGDIR_postgresql_libpq_configure} || false - ${CABAL} -vnormal check - - name: haddock - run: | - $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all - - name: unconstrained build - run: | - rm -f cabal.project.local - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all - - name: prepare for constraint sets - run: | - rm -f cabal.project.local - - name: constraint set pkg-config - run: | - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq +use-pkg-config' all --dry-run - cabal-plan topo | sort - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq +use-pkg-config' --dependencies-only -j2 all - $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq +use-pkg-config' all - - name: save cache - if: always() - uses: actions/cache/save@v4 - with: - key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} - path: ~/.cabal/store diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 53fa20f..c23bfea 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -15,7 +15,7 @@ jobs: matrix: os: [macos-latest, windows-latest] # Older GHCs need LLVM on macos-latest (ARM) - ghc: ['9.2','9.4.8','9.6.6','9.8.2','9.10.1'] + ghc: ['9.10.2'] fail-fast: false timeout-minutes: 60 From 80028f43834d131a6304da768b83cd921877d6d4 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:12:23 +0300 Subject: [PATCH 10/20] try 16 --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index c23bfea..4f5c554 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -39,7 +39,7 @@ jobs: username: ci password: sw0rdfish database: test - postgres-version: "17" + postgres-version: "16" - name: Checkout uses: actions/checkout@v4 From 194c63a75c140b3b377301f6129ca04c7e3f5a2a Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:18:45 +0300 Subject: [PATCH 11/20] more printf --- postgresql-libpq-configure/configure | 1 + 1 file changed, 1 insertion(+) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index c00eb51..8d9894f 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1536,6 +1536,7 @@ esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 echo "$ac_link" + echo "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS" (eval "$ac_link") || true (eval "$ac_link") 2>conftest.err ac_status=$? From e16de8c10c8be552b4f9c874e808db69e6be0b64 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:21:22 +0300 Subject: [PATCH 12/20] more --- .github/workflows/simple.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 4f5c554..b5ea0c0 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -16,6 +16,7 @@ jobs: os: [macos-latest, windows-latest] # Older GHCs need LLVM on macos-latest (ARM) ghc: ['9.10.2'] + psql: ['16', '17'] fail-fast: false timeout-minutes: 60 @@ -39,7 +40,7 @@ jobs: username: ci password: sw0rdfish database: test - postgres-version: "16" + postgres-version: ${{ matrix.psql }} - name: Checkout uses: actions/checkout@v4 From 5c0c01a7a5366235a064a1c77ce2ee7e4d39de99 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:34:37 +0300 Subject: [PATCH 13/20] Doors are better than Windows --- postgresql-libpq-configure/configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index 8d9894f..cf9f6cb 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1537,6 +1537,8 @@ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 echo "$ac_link" echo "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS" + ls /dependents C:/PROGRA~1/POSTGR~1/*/lib + dumpbin /dependents c:/progra~1/postgr~1/*/lib/pq.dll (eval "$ac_link") || true (eval "$ac_link") 2>conftest.err ac_status=$? From e859b0bc52b5f04037322950d3aac4b6a06752b9 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 22:41:52 +0300 Subject: [PATCH 14/20] foo --- .github/workflows/simple.yml | 5 +++++ postgresql-libpq-configure/configure | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index b5ea0c0..4cb6b25 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -42,6 +42,11 @@ jobs: database: test postgres-version: ${{ matrix.psql }} + - name: Debug + shell: bash + run: | + ldd c:/progra~1/postgr~1/*/lib/pq.dll + - name: Checkout uses: actions/checkout@v4 diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index cf9f6cb..2928900 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1538,7 +1538,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 echo "$ac_link" echo "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS" ls /dependents C:/PROGRA~1/POSTGR~1/*/lib - dumpbin /dependents c:/progra~1/postgr~1/*/lib/pq.dll + ldd c:/progra~1/postgr~1/*/lib/pq.dll (eval "$ac_link") || true (eval "$ac_link") 2>conftest.err ac_status=$? From b8b977d18bdc08b58e8f69d5edce0c211ad6b02c Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:03:57 +0300 Subject: [PATCH 15/20] foo --- .github/workflows/simple.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 4cb6b25..814a093 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -45,6 +45,8 @@ jobs: - name: Debug shell: bash run: | + ls c:/progra~1/postgr~1/ || true + ls /c || true ldd c:/progra~1/postgr~1/*/lib/pq.dll - name: Checkout From 536a57151fe53becd55acac23b4ecdd24a6476a0 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:17:26 +0300 Subject: [PATCH 16/20] foo --- .github/workflows/simple.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 814a093..aba0de1 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -46,8 +46,10 @@ jobs: shell: bash run: | ls c:/progra~1/postgr~1/ || true - ls /c || true - ldd c:/progra~1/postgr~1/*/lib/pq.dll + ls c:/progra~1/postgr~1/16 || true + ls c:/progra~1/postgr~1/17 || true + ls c:/progra~1/postgr~1/16/lib || true + ls c:/progra~1/postgr~1/17/lib || true - name: Checkout uses: actions/checkout@v4 From 482df12d1440e352e09ddbed941338d49b499cf0 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:31:50 +0300 Subject: [PATCH 17/20] WIP --- .github/workflows/simple.yml | 4 ++++ postgresql-libpq-configure/configure | 2 -- small.c | 7 +++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 small.c diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index aba0de1..ab4892e 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -50,6 +50,10 @@ jobs: ls c:/progra~1/postgr~1/17 || true ls c:/progra~1/postgr~1/16/lib || true ls c:/progra~1/postgr~1/17/lib || true + + - name: More debug + run: + C:\ghcup\ghc\910~1.2\lib/../mingw//bin\clang.exe -o smalltest -IC:/PROGRA~1/POSTGR~1/17/include -LC:/PROGRA~1/POSTGR~1/17/lib small.c -lpq - name: Checkout uses: actions/checkout@v4 diff --git a/postgresql-libpq-configure/configure b/postgresql-libpq-configure/configure index 2928900..8d9894f 100755 --- a/postgresql-libpq-configure/configure +++ b/postgresql-libpq-configure/configure @@ -1537,8 +1537,6 @@ eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 echo "$ac_link" echo "$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS" - ls /dependents C:/PROGRA~1/POSTGR~1/*/lib - ldd c:/progra~1/postgr~1/*/lib/pq.dll (eval "$ac_link") || true (eval "$ac_link") 2>conftest.err ac_status=$? diff --git a/small.c b/small.c new file mode 100644 index 0000000..06bcbaa --- /dev/null +++ b/small.c @@ -0,0 +1,7 @@ +#include + +int main() { + char conninfo[]="dbname = postgres"; + PGconn *conn; + conn = PQconnectdb(conninfo); +} From 147079b3949825bdc50d5bd27140451af2521009 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:35:56 +0300 Subject: [PATCH 18/20] again --- .github/workflows/simple.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index ab4892e..a1bfa24 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -50,13 +50,13 @@ jobs: ls c:/progra~1/postgr~1/17 || true ls c:/progra~1/postgr~1/16/lib || true ls c:/progra~1/postgr~1/17/lib || true + + - name: Checkout + uses: actions/checkout@v4 - name: More debug run: C:\ghcup\ghc\910~1.2\lib/../mingw//bin\clang.exe -o smalltest -IC:/PROGRA~1/POSTGR~1/17/include -LC:/PROGRA~1/POSTGR~1/17/lib small.c -lpq - - - name: Checkout - uses: actions/checkout@v4 - name: Cache uses: actions/cache@v4 From 1c13a69cd8cd32a5be73e330c62ed8a3613ccbc9 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:36:26 +0300 Subject: [PATCH 19/20] again2 --- .github/workflows/simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index a1bfa24..9ecac81 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -56,7 +56,7 @@ jobs: - name: More debug run: - C:\ghcup\ghc\910~1.2\lib/../mingw//bin\clang.exe -o smalltest -IC:/PROGRA~1/POSTGR~1/17/include -LC:/PROGRA~1/POSTGR~1/17/lib small.c -lpq + C:\ghcup\ghc\910~1.2\lib/../mingw//bin\clang.exe -o smalltest -IC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/include -LC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/lib small.c -lpq - name: Cache uses: actions/cache@v4 From dfca5621764989f67bc0ef0edd3398073bc29e67 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Fri, 11 Jul 2025 23:43:52 +0300 Subject: [PATCH 20/20] Try gcc --- .github/workflows/simple.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/simple.yml b/.github/workflows/simple.yml index 9ecac81..72c3fb3 100644 --- a/.github/workflows/simple.yml +++ b/.github/workflows/simple.yml @@ -54,6 +54,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: More debug + run: + gcc -o smalltest -IC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/include -LC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/lib small.c -lpq + - name: More debug run: C:\ghcup\ghc\910~1.2\lib/../mingw//bin\clang.exe -o smalltest -IC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/include -LC:/PROGRA~1/POSTGR~1/${{ matrix.psql }}/lib small.c -lpq