On Wed, 12 Mar 2025 at 10:52, Graham Leggett via dev <dev@apr.apache.org>
wrote:

> Hi all,
>
> I've reached the end of my cmake knowledge, and need a bit of help.
>
> I've improved the error handling in the tests to tell us what's wrong.
> Cmake wants to build in a not-source-directory, but some tests assume they
> are being run from the source directory.
>
> I don't know the correct cmake way to handle this. Copy the data files?
> Support an environment variable prefix? Not sure.
>
> 22/52 Test #22: testmmap .........................***Failed    0.02 sec
> testmmap            :  apr_file_open() failed:
> D:/a/apr/apr/build/data/mmap_large_datafile.txt: The system cannot find the
> file specified.
> Line 110: expected <0>, but saw <720002>
>  SKIP: Line 119: File not open, skipping filesize test.
>  SKIP: Line 146: File not open, skipping read.
>  SKIP: Line 182: File not open, skipping mmap create.
> Line 201: expected non-NULL, but saw NULL
>  SKIP: Line 204: MMap not open, skipping size comparison.
>  SKIP: Line 244: MMap not open, skipping mmap offset.
>  SKIP: Line 221: MMap not open, skipping mmap delete.
>  SKIP: Line 81: File not open, skipping file close.
> apr_file_open() failed: D:/a/apr/apr/build/data/mmap_large_datafile.txt:
> The system cannot find the file specified.
> Line 110: expected <0>, but saw <720002>
>  SKIP: Line 119: File not open, skipping filesize test.
>  SKIP: Line 146: File not open, skipping read.
>  SKIP: Line 182: File not open, skipping mmap create.
> Line 201: expected non-NULL, but saw NULL
>  SKIP: Line 204: MMap not open, skipping size comparison.
>  SKIP: Line 244: MMap not open, skipping mmap offset.
>  SKIP: Line 221: MMap not open, skipping mmap delete.
>  SKIP: Line 81: File not open, skipping file close.
> SKIPPED 14 of 27
> FAILED 4 of 27
>
> Does this problem still occur?


> The second cmake failure is this one in apr-util:
>
> LINK Pass 1: command
> "C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1443~1.348\bin\Hostx64\x64\link.exe
> /nologo CMakeFiles\testall.dir\test\abts.c.obj
> CMakeFiles\testall.dir\test\testutil.c.obj
> CMakeFiles\testall.dir\test\testbuckets.c.obj
> CMakeFiles\testall.dir\test\testbuffer.c.obj
> CMakeFiles\testall.dir\test\testcrypto.c.obj
> CMakeFiles\testall.dir\test\testdate.c.obj
> CMakeFiles\testall.dir\test\testdbd.c.obj
> CMakeFiles\testall.dir\test\testdbm.c.obj
> CMakeFiles\testall.dir\test\testjson.c.obj
> CMakeFiles\testall.dir\test\testjose.c.obj
> CMakeFiles\testall.dir\test\testldap.c.obj
> CMakeFiles\testall.dir\test\testmd4.c.obj
> CMakeFiles\testall.dir\test\testmd5.c.obj
> CMakeFiles\testall.dir\test\testmemcache.c.obj
> CMakeFiles\testall.dir\test\testpass.c.obj
> CMakeFiles\testall.dir\test\testqueue.c.obj
> CMakeFiles\testall.dir\test\testredis.c.obj
> CMakeFiles\testall.dir\test\testreslist.c.obj
> CMakeFiles\testall.dir\test\testrmm.c.obj
> CMakeFiles\testall.dir\test\testsiphash.c.obj
> CMakeFiles\testall.dir\test\teststrmatch.c.obj
> CMakeFiles\testall.dir\test\testuri.c.obj
> CMakeFiles\testall.dir\test\testuuid.c.obj
> CMakeFiles\testall.dir\test\testxlate.c.obj
> CMakeFiles\testall.dir\test\testxml.c.obj /out:testall.exe
> /implib:testall.lib /pdb:testall.pdb /version:0.0 /machine:x64 /debug
> /INCREMENTAL /subsystem:console libaprutil-1.lib
> D:\a\apr-util\apr-util\install\lib\libapr-1.lib kernel32.lib user32.lib
> gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
> comdlg32.lib advapi32.lib /MANIFEST
> /MANIFESTFILE:CMakeFiles\testall.dir/intermediate.manifest
> CMakeFiles\testall.dir/manifest.res" failed (exit code 1120) with the
> following output:
> testldap.c.obj : error LNK2019: unresolved external symbol
> __imp_ldap_unbind_s referenced in function test_legacy_ldap_connection
> testldap.c.obj : error LNK2019: unresolved external symbol
> __imp_ldap_set_option referenced in function test_legacy_ldap_connection
> testldap.c.obj : error LNK2019: unresolved external symbol
> __imp_ldap_simple_bind_s referenced in function test_legacy_ldap_connection
>
> testldap.c.obj : error LNK2019: unresolved external symbol
> __imp_ldap_err2string referenced in function test_legacy_ldap_connection
>
> testall.exe : fatal error LNK1120: 4 unresolved externals
>
> The legacy apr-util v1.7 testall.exe (but not the trunk one) needs to be
> linked to the LDAP library on Windows for the legacy tests to compile. Not
> sure of the correct way to do that.
>

Can someone who knows cmake take a look if possible?
>
> As far as I understand, this problem has been fixed in r1924334
<https://svn.apache.org/r1924334>. Is this correct?

-- 
Ivan Zhakov

Reply via email to