On Sun, Jun 16, 2024 at 10:25 AM Jun Omae <jun6...@gmail.com> wrote:
>
> On Sun, Jun 16, 2024 at 4:44 AM Timofey Zhakov <t...@chemodax.net> wrote:
> > > It seems to be caused by missing ws2_32.lib for the linking. I guess
> > > `gen_cmake.py` needs methods like `get_static_win_depends` and
> > > `get_linked_win_depends` in `gen_win.py`? Have you got success to
> > > build on your Windows environment with cmake?
> >
> > As Nathan already said, you have to apply the svn-fix-ws2_32.patch.txt
> > [4] before. Some libraries and programs use the ws2_32.lib but they
> > don't have it in the msvc-libs field. This was working in vcnet but
> > not in CMake due to private dependencies. Could you review it?
>
> Sorry. I missed your post for svn-fix-ws2_32.patch.txt. I try to build
> with vcnet and the patch, and run tests. It looks good to me.
>
> After applying the patch, cmake building succeeded with
> SVN_BUILD_PROGRAMS=ON, SVN_BUILD_TEST=ON and BUILD_SHARED_LIBS=OFF.
>
> However, it is unable to verify the binaries because win-tests.py
> cannot be run. Also, I tried to run ctest but afl-svndiff.exe seems to
> be stuck.

I haven't made the tests work yet. I think I will do it after, because
there are a lot of things to improve before with dependencies and
configurations.

The `afl-svndiff.exe` test doesn't work, because it needs a filename
to be passed (see subversion\tests\afl\afl-svndiff.c:71).
Additionally, I found a `testing` field in the build.conf which is set
to `skip`, so it has to be ignored in the test list.

The win-tests.py doesn't work because it tries to copy the
dependencies and setup environment based on --with-* options, which
are unset when using CMake.

>
> If building with BUILD_SHARED_LIBS=ON, svn*.exe and libsvn*.dll
> binaries is built successfully but some test programs are not
> successfully.
>
> [[[
[logs are cut]
> ]]]
>

These projects cannot be compiled, because some tests require static
libraries to build with, due to the private functions, which are not
exported from that library. The VC.Net generator was working because
it builds both configurations at the same time.

In the `svn-cmake-r1859.patch.txt` patch, I changed that behavior to
ignore those tests and write a warning.

Here is an example of that test. The field `msvc-force-static`
specifies to build the test with static libraries.

[[[
[fs-fs-pack-test]
description = Test fsfs packing in libsvn_fs_fs
type = exe
path = subversion/tests/libsvn_fs_fs
sources = fs-fs-pack-test.c
install = test
libs = libsvn_test libsvn_wc libsvn_fs libsvn_fs_fs libsvn_delta
       libsvn_subr apriconv apr
msvc-force-static = yes
]]]


--
Timofei Zhakov

Reply via email to