Conversation
|
x64-windows-static build does not work with the opencv feature because patches failed to be applied (see #2762) |
|
I found a bug here: https://github.com/willyd/caffe/blob/vcpkg/cmake/Cuda.cmake#L42 The output of the detect code can contains warning information like The last line is the expected version, however, the previous Edit regex from |
|
Besides, generated *.exe should be copied into |
|
@cmpute Thanks for you comments I will have a look. |
|
A big rework of OpenCV has been recently merged. Other work will come soon, but the first part maybe is enough for your x64-windows-static to be successful. Please let me know, I am very interested in a |
|
@willyd Any update pls? |
|
Here are the test results. The left results column is the latest commit to this PR, the right results column is test results from master: Blank space means the port did not exist. BTW, please modify the control version in vcpkg/ports/caffe2/control file, because you modified the vcpkg/ports/caffe2/portfile.cmake file. |
|
@Cheney-W instead of destroying the installed caffe2 installation, I would make them exclusive, blocking the installation in case the other is found. |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
| Source: caffe | ||
| Version: 1.0.0 | ||
| Build-Depends: boost-smart-ptr, boost-thread, boost-function, boost-date-time, boost-bind, boost-filesystem, boost-random, boost-math, boost-algorithm, gflags, glog, hdf5, protobuf, openblas | ||
| Description: Caffe: a fast open framework for deep learning. |
There was a problem hiding this comment.
Could you please add Homepage here?
| @@ -0,0 +1,92 @@ | |||
| if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86) | |||
| message(FATAL_ERROR "Caffe cannot be built for the x86 architecture") | |||
| endif() | |||
There was a problem hiding this comment.
Maybe we can use vcpkg_fail_port_install(ON_ARCH "x86") instead.
| message(FATAL_ERROR "Caffe cannot be built for the x86 architecture") | ||
| endif() | ||
|
|
||
| include(vcpkg_common_functions) |
There was a problem hiding this comment.
include(vcpkg_common_functions) is no longer needed.
Could you please remove this line?
|
|
||
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO willyd/caffe |
| set(USE_LEVELDB ON) | ||
| else() | ||
| set(USE_LEVELDB OFF) | ||
| endif() |
There was a problem hiding this comment.
As for these features, please use vcpkg_check_features() instead.
| file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) | ||
|
|
||
|
|
||
| file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe RENAME copyright) |
There was a problem hiding this comment.
Could you update
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe RENAME copyright)
as
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)?
| file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe) | ||
| file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/caffe2) | ||
|
|
||
| # Remove caffe includes to avoid conflict with caffe port |
There was a problem hiding this comment.
if (VCPKG_TARGET_ARCHITECTURE STREQUAL x86)
message(FATAL_ERROR "Caffe2 cannot be built for the x86 architecture")
endif()
This can be replaced by vcpkg_fail_port_install(ON_ARCH "x86").
There was a problem hiding this comment.
please also remove include(vcpkg_common_functions) here.
There was a problem hiding this comment.
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/msvc-fixes.patch
)
This can be merged in
vcpkg_from_github(
...
PATCHES msvc-fixes.patch
)
|
|
||
| # Remove empty directories from include (should probably fix or | ||
| # patch caffe2 install script) | ||
| file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/caffe2/test) |
There was a problem hiding this comment.
# Remove bin directory
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
endif()
# Remove bin directory
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
These two parts can be merged to this:
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()
There was a problem hiding this comment.
Could you please update
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/caffe2)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/caffe2 RENAME copyright)
as
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)?
|
I’m going to close this PR because it’s been a long time since any update has been made. If this is something you’d like to see merged and work is being done, please reopen. |
WIP Do not merge. I am waiting for CI builds to pass on Caffe's side to update the github URLs in the portfile.
Alternative to PR #2570.
More features, based off caffe windows branch, dynamic and static linking should work (provided consuming projects use the /WHOLEARCHIVE flag)
New modular boost dependencies kindly provided by @cmpute.
@jasjuang @vlj your comments are welcome.