Den tors 7 aug. 2025 kl 15:41 skrev Branko Čibej <br...@apache.org>:

> On 7. 8. 25 15:05, Daniel Sahlberg wrote:
>
> Den tors 7 aug. 2025 kl 14:05 skrev Timofei Zhakov <t...@chemodax.net>:
>
>> On Thu, Aug 7, 2025 at 2:22 PM Daniel Sahlberg <
>> daniel.l.sahlb...@gmail.com> wrote:
>>
>>> Den tis 5 aug. 2025 kl 19:27 skrev Graham Leggett via dev <
>>> dev@subversion.apache.org>:
>>>
>>>> Hi all,
>>>>
>>>> I am keen to build subversion-trunk on Windows using cmake and bleeding
>>>> edge dependencies (serf-trunk, apr-trunk, etc).
>>>>
>>>> Does anyone have a script / recipe to do this in a single step?
>>>>
>>>> I have Visual Studio 2022 on Windows 11 via ssh, so ideally something
>>>> command line based.
>>>>
>>>> Does such a thing exist?
>>>>
>>>> Regards,
>>>> Graham
>>>> --
>>>>
>>>>
>>> Hi,
>>>
>>> I've so far only built it using vcpkg supplied dependencies, so sorry
>>> no. I do think it would be valuable to have such a script!
>>>
>>> I think our primary expert on Windows is Timofei, I hope he can chime in!
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>>
>>
>> I was planning to respond anyway... Sorry for the delay.
>>
>> With cmake, you can build each of apr, serf, and subversion using just a
>> few simple commands per project.
>>
>> Here is how they'd generally look like:
>>
>> ```
>> cmake -S <source> -B <source>/out [extra opts] -DCMAKE_INSTALL_PREFIX
>> <libs>
>> cmake --build <source>/out
>> cmake --install <source>/out
>> ```
>>
>> So the complete script would contain something like:
>>
>> ```pwsh
>> # checkout projects
>> svn checkout https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x apr
>> svn checkout https://svn.apache.org/repos/asf/apr/apr-util/branches/1.7.x
>> apr-util
>> svn checkout https://svn.apache.org/repos/asf/serf/trunk serf
>> svn checkout https://svn.apache.org/repos/asf/subversion/trunk svn
>>
>> # deps
>> git clone https://github.com/microsoft/vcpkg
>> Push-Location vcpkg
>> .\bootstrap-vcpkg.bat -disableMetrics
>> .\vcpkg install expat zlib sqlite3 openssl
>> Pop-Location
>>
>> # compiled binaries and libraries will appear in this directory
>> mkdir install
>> Copy-Item -Recurse .\vcpkg\installed\x64-windows\* install
>>
>> # let's keep the source trees clean, by utilising out-of-tree build
>> mkdir build
>>
>> # apr
>> cmake -S apr -B build/apr -DCMAKE_INSTALL_PREFIX=install
>> cmake --build .\build\apr\
>> cmake --install .\build\apr\ --config Debug
>>
>> # apr-util
>> cmake -S apr-util -B build/apr-util -DCMAKE_INSTALL_PREFIX=install
>> cmake --build .\build\apr-util\
>> cmake --install .\build\apr-util\ --config Debug
>>
>> # serf
>> cmake -S serf -B build/serf -DCMAKE_INSTALL_PREFIX=install
>> cmake --build .\build\serf\
>> cmake --install .\build\serf\ --config Debug
>>
>> # svn
>> cmake -S svn -B build/svn -DCMAKE_INSTALL_PREFIX=install
>> cmake --build .\build\svn\
>> cmake --install .\build\svn\ --config Debug
>> ```
>>
>> #worksforme
>>
>
> Oh, looks great, thanks!
>
>
>>
>> It's pretty much the same commands for every project assuming dependecies
>> are set up. This is why I don't think there is a need for a script; The
>> steps are still simple, but someone may want to modify something for their
>> needs. For example, use apr-2 instead of apr+apr-util, customise some
>> projects or build configurations using options, or use ninja instead of
>> vcnet.
>>
>> On the other hand, I think it might be cool to include this set of
>> commands to the INSTALL guide instead.
>>
>
> Yes, I think INSTALL is the right place to go.
>
> One minor nit: If we put this as an example in INSTALL, I think we should
> be consistent with which kind of version we use in the svn co example.
> Above you use the current branch of APR, the "next" branch of APR-util
> (don't really know the status of 1.6 vs 1.7 there) and the trunk versions
> of Subversion and Serf. Obviously there may be a good reason (for example
> Serf 1.3 doesn't have the CMake scripts - although I hope we will soon be
> able to release 1.5 with CMake support), then we can describe how to use
> another version and what is the minimum required version for each project.
>
>
>
> Graham did say bleeding-edge and explicitly mentioned apr-trunk. What
> you're discussing isn't that. :)
>

No, we're discussing what to document in INSTALL. It's my fault changing
subject :)

Sure subversion-trunk, apr-trunk and serf-trunk do work together, I just
> haven't tried using CMake for all three: APR's CMake build is explicitly
> Windows-only,
>

Good point!

I'm not completely sure how to add this to INSTALL:
- We could more or less rip out the whole "II.E Building the Latest Source
under Windows" section replacing with Timofei's script above. (The httpd
modules and the message catalog stuff seems to be missing, in addition to
not building OpenSSL from source).
- OTOH the script above could (except for the vcpkg stuff, path separator
character and APR's CMake-Windows-only) in principle work on any platform
so does it belong under "II.F Building using CMake"?

Maybe we should reorder the sections so "Building using CMake" comes first
and then have the Windows specific stuff later?

Subversion's has a bunch of problems on, e.g., macOS -- or at least did
> when I tried it a couple months ago
>

Room for improvement :)

--  and only Serf's works reliably on every platform I've tried[1].
>

>
> -- Brane
>

Cheers,
Daniel



>
>
> [1] Windows, macOS, Linux (Debian + Fedora), FreeBSD, OpenBSD, NetBSD and,
> dogs help us, BeOS. I really have to get that Solaris VM set up somehow.
>

BeOS, nice! I'm missing OS/2.

Reply via email to