Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libcerf] Add new port #7320

Merged
merged 3 commits into from
Aug 7, 2019
Merged

Conversation

AlexanderTaeschner
Copy link
Contributor

Resolves #7314.

@MVoz
Copy link
Contributor

MVoz commented Jul 18, 2019

@Rastaban
for the sake of interest looked at the log, where there may be a bug
there are no errors

what could be the reason?

@Rastaban
Copy link
Contributor

@voskrese The error happened in the post build validation, which unfortunately is not captured in the logs that are written out under the projects buildtrees so you need to look at the console output under the ** Build vcpkg and test ports ** task in Azure DevOps. I am interested in updating vcpkg to capture all console output into a port-specific log to avoid this hole in the CI system but haven't gotten around to it yet.

Here is the output:

Starting package 1/1: libcerf:x64-windows-static
Building package libcerf[core]:x64-windows-static...
Could not locate cached archive: C:\vsts\_work\1\s\archives\cb\cb32dd0a1b6524b38fab7dbf3b4f161ea7caf85d.zip
-- Downloading https://jugit.fz-juelich.de/mlz/libcerf/uploads/924b8d245ad3461107ec630734dfc781/libcerf-1.13.tgz...
-- Extracting source C:/vsts/_work/1/s/downloads/libcerf-1.13.tgz
-- Using source at C:/vsts/_work/1/s/buildtrees/libcerf/src/libcerf-1-0c1261ec09
-- Configuring x64-windows-static
-- Building x64-windows-static-dbg
-- Building x64-windows-static-rel
-- Installing: C:/vsts/_work/1/s/packages/libcerf_x64-windows-static/share/libcerf/copyright
-- Performing post-build validation
Expected Debug,Static crt linkage, but the following libs had invalid crt linkage:

    C:/vsts/_work/1/s/packages/libcerf_x64-windows-static/debug/lib/cerfcpp.lib: Release,Static

To inspect the lib files, use:
    dumpbin.exe /directives mylibfile.lib
Found 1 error(s). Please correct the portfile:
    C:\vsts\_work\1\s\ports\libcerf\portfile.cmake
-- Performing post-build validation done
Error: Building package libcerf:x64-windows-static failed with: POST_BUILD_CHECKS_FAILED
Elapsed time for package libcerf:x64-windows-static: 12.18 s

Triplet: x64-windows-static
Total elapsed time: 12.18 s
RESULTS
    libcerf:x64-windows-static: POST_BUILD_CHECKS_FAILED: 12.18 s

@MVoz
Copy link
Contributor

MVoz commented Jul 18, 2019

Alexander Taeschner

default in CMakeLists.txt

if(NOT DEFINED BUILD_SHARED_LIBS)
    option(BUILD_SHARED_LIBS "Build as shared library" ON)
endif()

static = -DBUILD_SHARED_LIBS=OFF

@MVoz
Copy link
Contributor

MVoz commented Jul 20, 2019

?

if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
  set(BUILD_SHARED_LIBS ON)
else()
  set(BUILD_SHARED_LIBS OFF)
endif()
vcpkg_configure_cmake(
    SOURCE_PATH ${SOURCE_PATH}
    PREFER_NINJA
    OPTIONS
        -DCERF_CPP=ON
        -DLIB_MAN=OFF
        -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
)

@AlexanderTaeschner
Copy link
Contributor Author

AlexanderTaeschner commented Jul 22, 2019

@voskrese: your proposed changes fail in post build validation. The question is, if it is a real problem that the static build is not supported under windows (even the error message in CI reads: "##[error] NEW ADDED PORT FAILURE: libcerf:x64-windows-static (ignore if triplet is not supported by upstream port)").

@AlexanderTaeschner
Copy link
Contributor Author

Added patch to enable libcerf:x64-windows-static build.

@AlexanderTaeschner AlexanderTaeschner changed the title Add port for libcerf. [libcerf] Add new port Jul 23, 2019
@cbezault
Copy link
Contributor

cbezault commented Aug 7, 2019

While I think you're doing the right thing here to get it to compile statically it would also have been legitimate to use vcpkg_check_linkage to force the library to be built dynamically as upstream didn't have static support.

@cbezault cbezault merged commit 3405bfd into microsoft:master Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New port request] libcerf
4 participants