On Sun, May 18, 2025 at 12:49 PM Timofei Zhakov <[email protected]> wrote:
> On Sat, 17 May 2025 at 12:07 PM, Graham Leggett <[email protected]> wrote:
>
>> On 16 May 2025, at 17:53, Timofei Zhakov <[email protected]> wrote:
>>
>> > I've made a patch for apr util where I added a bundled vcpkg port to
>> test that the latest version can be built correctly according to vcpkg
>> requirements. The similar thing already exists in the trunk (apr-2) and
>> stable apr, but doesn't in the apr util.
>> >
>> > However, there would be a problem when compiling against apr 1.7.5, due
>> to the missing header. I PR-ed to the official registry update to 1.7.6,
>> but they will publish it after approximately a few weeks, so the github
>> workflow won't work. I did not actually test the workflow, but it should
>> work, since I copied it from the trunk.
>>
>> Would it be possible to add the LDAP module to the apr-util build?
>
>
>
> Yeah, it can be done through APR_HAS_LDAP cmake option. However, there is
> the same problem existing in the trunk, so the same has to be done there as
> well.
>
> I will make a new patch soonly…
>
This worked for me. Patch is in the attachments.
However, I did notice some kind of strange behaviour of module builds; It
seems like cmake tries to install their DLLs into the `lib` directory
instead of `bin`. The same problem existed in for example
apr_dbd_odbc-1.dll.
[[[
...
-- Performing post-build validation
D:\tmp\apr-util\build\vcpkg\apr-util\portfile.cmake: warning: The following
dlls were found in ${CURRENT_PACKAGES_DIR}/lib or
${CURRENT_PACKAGES_DIR}/debug/lib. Please move them to
${CURRENT_PACKAGES_DIR}/bin or ${CURRENT_PACKAGES_DIR}/debug/bin,
respectively.
D:\vcpkg\vcpkg-apr\packages\apr-util_x64-windows: note: the DLLs are
relative to ${CURRENT_PACKAGES_DIR} here
note: debug/lib/apr_dbd_odbc-1.dll
note: lib/apr_dbd_odbc-1.dll
...
]]]
I remember I had to do something with this in subversion. Let me dig down a
little bit...
--
Timofei Zhakov
Index: .github/workflows/windows-vcpkg.yml
===================================================================
--- .github/workflows/windows-vcpkg.yml (revision 1925665)
+++ .github/workflows/windows-vcpkg.yml (working copy)
@@ -18,7 +18,7 @@
port:
- apr-util
- apr-util[core]
- - apr-util[crypto,dbd-sqlite3,dbd-odbc,dbd-postgresql,xlate]
+ - apr-util[crypto,dbd-sqlite3,dbd-odbc,dbd-postgresql,xlate,ldap]
fail-fast: false
name: "${{ matrix.port }}:${{ matrix.triplet }} on ${{ matrix.os }}"
Index: build/vcpkg/apr-util/portfile.cmake
===================================================================
--- build/vcpkg/apr-util/portfile.cmake (revision 1925665)
+++ build/vcpkg/apr-util/portfile.cmake (working copy)
@@ -18,6 +18,7 @@
dbd-odbc FEATURE_DBD_ODBC
dbd-sqlite3 FEATURE_DBD_SQLITE3
dbd-postgresql FEATURE_DBD_PGQL
+ ldap FEATURE_LDAP
)
vcpkg_cmake_configure(
@@ -29,6 +30,7 @@
-DAPU_HAVE_ODBC=${FEATURE_DBD_ODBC}
-DAPU_HAVE_SQLITE3=${FEATURE_DBD_SQLITE3}
-DAPU_HAVE_PGSQL=${FEATURE_DBD_PGQL}
+ -DAPR_HAS_LDAP=${FEATURE_LDAP}
-DAPU_USE_EXPAT=ON
)
Index: build/vcpkg/apr-util/vcpkg.json
===================================================================
--- build/vcpkg/apr-util/vcpkg.json (revision 1925665)
+++ build/vcpkg/apr-util/vcpkg.json (working copy)
@@ -51,6 +51,9 @@
"dependencies": [
"libiconv"
]
+ },
+ "ldap": {
+ "description": "LDAP support"
}
},
"default-features": []