[serf] new port (build using scons)
In this version on the port, we are going to use the official build system of the library, Scons. There is already a helper for getting it from the internet, but it wasn't actually working, and should be it with Python should be updated.
Included changes:
- Update scons version to the latest.
- Using Python3 instead of Python2 for scons.
- Support scons for Unix
- Add the port for Serf library
It worked on my Linux VM, but fails on Azure Pipelines, due to missing scons on the system. I have a question: how to make it installed there? I've already specified apt_package_name and brew_package_name variables in the vcpkg_find_acquire_program(SCONS).cmake script and it suggests to install this tool.
Oups... Didn't notice that little problem, failing the build. Sorry...
@Cheney-W Could you please answer the question above?
It worked on my Linux VM, but fails on Azure Pipelines, due to missing scons on the system. I have a question: how to make it installed there? I've already specified apt_package_name and brew_package_name variables in the vcpkg_find_acquire_program(SCONS).cmake script and it suggests to install this tool.
By the way, if it is impossible, I am happy to drop Linux and MacOS support, since it is not that much important for me with apt-get working great there.
It worked on my Linux VM, but fails on Azure Pipelines, due to missing scons on the system. I have a question: how to make it installed there? I've already specified apt_package_name and brew_package_name variables in the vcpkg_find_acquire_program(SCONS).cmake script and it suggests to install this tool.
By the way, if it is impossible, I am happy to drop Linux and MacOS support, since it is not that much important for me with apt-get working great there.
Also CMake is coming soon in the library and this could be done then.
If the failures on Linux and macOS are only due to missing dependencies rather than the port not supporting these platforms, you can mark the corresponding triplets as failed in the ci.baseline for now.
You might find the similar recipe for serf on ConanCenter useful to check for any missed config options and what not: https://github.com/conan-io/conan-center-index/blob/master/recipes/serf/all/conanfile.py
I'm afraid it takes much more patching to make serf use the right link libs across platforms, linkage types, and debug/release. For example, this isn't matched with
zlib.lib:/debug/lib/zlibd.libIt might be possible to query pc files (via
x_vcpkg_pkgconfig_get_modules) to avoid hard coding.
Unfortunately, it requires a lot of patching, to allow passing the path to the libraries via command line. However, I fixed the debug libraries by patching scons files and checking for debug configuration.
Well, you fixed the release/debug lib name aspect for Windows. I'm skeptical about cross-platform and static linkage being solved. But I don't want to learn scons now.
In the latest local test, port also has an usage issue, the release mode file: \packages\serf_x64-windows\lib\pkgconfig\serf-1.pc includes the following contents:
libdir=${prefix}/debug/lib
In the latest local test, port also has an usage issue, the release mode file: \packages\serf_x64-windows\lib\pkgconfig\serf-1.pc includes the following contents:
libdir=${prefix}/debug/lib
Thanks, I see.
https://github.com/microsoft/vcpkg/pull/41043/commits/9f0712302d90548d8c13d27d5f549f7349a201b9 seems to be resolving the issue. Additionally, pkgconfig module passes my local testing.
Usage test passed with x64-windows.
build release version before debug. Seems to be fixing the issue with incorrect pkfconfig modules somehow.
Suspicious.
Azure pipelines worker seems to be stuck somewhere.
arm64-windows failures:
Creating library libserf-1.lib and object libserf-1.exp
auth_digest.obj : error LNK2019: unresolved external symbol __imp__apr_palloc@8 referenced in function _build_auth_header
auth_spnego.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
auth_spnego_sspi.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
allocator.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
ssl_buckets.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
auth.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
auth_basic.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
context.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
incoming.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
outgoing.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
ssltunnel.obj : error LNK2001: unresolved external symbol __imp__apr_palloc@8
context.obj : error LNK2019: unresolved external symbol __imp__apr_array_make@12 referenced in function _serf_context_create
...
https://dev.azure.com/vcpkg/public/_build/results?buildId=108231&view=artifacts&pathAsName=false&type=publishedArtifacts
https://github.com/microsoft/vcpkg/pull/41043/commits/4d761df509f91f86c5d791c4b0e251bbc831a556
[serf] this library doesn't support ARM.
See: https://github.com/apache/serf/blob/73f26fab7baca09c5257ac1da725589a639a44de/SConstruct#L143
ARM is not listed there, so there is no official support.
Hey! What's about to merge it?
Thanks!