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

[arrayfire] Build error #26763

Closed
Kaltxi opened this issue Sep 12, 2022 · 9 comments · Fixed by #26773 or #26782
Closed

[arrayfire] Build error #26763

Kaltxi opened this issue Sep 12, 2022 · 9 comments · Fixed by #26773 or #26782
Assignees
Labels
category:port-bug The issue is with a library, which is something the port should already support

Comments

@Kaltxi
Copy link

Kaltxi commented Sep 12, 2022

Host Environment

  • OS: Windows 11
  • Compiler: MSVC

To Reproduce
Steps to reproduce the behavior:
./vcpkg install arrayfire[core,opencl]:x64-windows

Failure logs

-- Building x64-windows-dbg
CMake Warning at scripts/cmake/vcpkg_execute_build_process.cmake:60 (message):
  Please ensure your system has sufficient memory.
Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/arrayfire/portfile.cmake:77 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)


-- Restarting build without parallelism
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:129 (message):
    Command failed: "C:/Program Files/CMake/bin/cmake.exe" --build . --config Debug --target install -- -v -j7
    Working Directory: D:/Tools/vcpkg/buildtrees/arrayfire/x64-windows-dbg
    See logs for more information:
      D:\Tools\vcpkg\buildtrees\arrayfire\install-x64-windows-dbg-out.log
      D:\Tools\vcpkg\buildtrees\arrayfire\install-x64-windows-dbg-out-1.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/arrayfire/portfile.cmake:77 (vcpkg_cmake_install)
  scripts/ports.cmake:147 (include)


error: building arrayfire:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
    https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+arrayfire
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[arrayfire]+Build+error
Include '[arrayfire] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
    vcpkg-tool version: 2022-09-01-dfb82802c8cc562ce3b665a904a65b22314de724
    vcpkg-scripts version: 8e3595fad 2022-09-09 (3 days ago)

Additional context
It seems to fail on linking clFFT: LINK : fatal error LNK1104: cannot open file 'third_party\clFFT\lib\import\clFFT.lib', and indeed there isn't such file at that directory, though there is \third_party\clFFT\lib64\import\clFFT.lib.

install-x64-windows-dbg-out-1.log
install-x64-windows-dbg-out.log

@JackBoosY
Copy link
Contributor

JackBoosY commented Sep 13, 2022

[465/466] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\backend\opencl\CMakeFiles\afopencl.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x64\link.exe  @CMakeFiles\afopencl.rsp  /out:bin\afopencl.dll /implib:src\backend\opencl\afopencl.lib /pdb:bin\afopencl.pdb /dll /version:3.8 /machine:x64 /nologo    /debug /INCREMENTAL  && cd ."
FAILED: bin/afopencl.dll src/backend/opencl/afopencl.lib 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\backend\opencl\CMakeFiles\afopencl.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100220~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x64\link.exe  @CMakeFiles\afopencl.rsp  /out:bin\afopencl.dll /implib:src\backend\opencl\afopencl.lib /pdb:bin\afopencl.pdb /dll /version:3.8 /machine:x64 /nologo    /debug /INCREMENTAL  && cd ."
LINK Pass 1: command "C:\PROGRA~1\MIB055~1\2022\COMMUN~1\VC\Tools\MSVC\1433~1.316\bin\Hostx64\x64\link.exe @CMakeFiles\afopencl.rsp /out:bin\afopencl.dll /implib:src\backend\opencl\afopencl.lib /pdb:bin\afopencl.pdb /dll /version:3.8 /machine:x64 /nologo /debug /INCREMENTAL /MANIFEST /MANIFESTFILE:src\backend\opencl\CMakeFiles\afopencl.dir/intermediate.manifest src\backend\opencl\CMakeFiles\afopencl.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'third_party\clFFT\lib\import\clFFT.lib'
ninja: build stopped: subcommand failed.

At lease we need to change the internal vendor clfft to port clfft.
I can reproduce this issue locally.

@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Sep 13, 2022
@Kaltxi
Copy link
Author

Kaltxi commented Sep 13, 2022

Pull request make installation finish for me locally. It works in VS with MSBuild, but when trying to use with CMake, it fails.

cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=D:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake leads to:

CMake Error at D:/Tools/vcpkg/installed/x64-windows/share/arrayfire/ArrayFireConfig.cmake:94 (message):
  File or directory D:/Tools/vcpkg/installed/x64-windows/debug/include
  referenced by variable ArrayFire_INCLUDE_DIRS does not exist !
Call Stack (most recent call first):
  D:/Tools/vcpkg/installed/x64-windows/share/arrayfire/ArrayFireConfig.cmake:110 (set_and_check)
  D:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake:829 (_find_package)
  CMakeLists.txt:6 (find_package)

CMakeLists.txt:

cmake_minimum_required(VERSION 3.15)

project(vcpkg-test CXX)

find_package(ArrayFire REQUIRED)

add_executable(vcpkg-test src/main.cxx)
target_compile_features(vcpkg-test PRIVATE cxx_std_17)

target_link_libraries(vcpkg-test
    PRIVATE
        ArrayFire::afopencl)

@Yury-Fridlyand
Copy link

GHA windows env was updated yesterday and damaged build workflow which uses vcpkg.
actions/runner-images@7339304

@JackBoosY
Copy link
Contributor

GHA windows env was updated yesterday and damaged build workflow which uses vcpkg. actions/runner-images@7339304

@Yury-Fridlyand Can you please provide the failure output and the logs?

@Yury-Fridlyand
Copy link

Please, see opensearch-project/sql#828.

The reason of failure was new environment variable VCPKG_ROOT added to the image.

@JackBoosY
Copy link
Contributor

@Yury-Fridlyand I saw the changes and it seems correct. Can you please provide the failure log?

@Yury-Fridlyand
Copy link

https://github.com/opensearch-project/sql/actions/runs/3047392063/jobs/4911328315

I don't say that changes are incorrect, but they affected build process in my project. Fortunately, the fix was quite simple.

@JackBoosY
Copy link
Contributor

cc @BillyONeal about this issue, I don't know which changes affect this.

@dg0yt
Copy link
Contributor

dg0yt commented Sep 14, 2022

https://github.com/opensearch-project/sql/actions/runs/3047392063/jobs/4911328315

What I see in the raw log is a problem with building aws sdk. Which may start at:

Release Win32 D:\a\sql\sql\sql-odbc\src\aws-sdk-cpp D:\a\sql\sql\sql-odbc\build\aws-sdk\build D:\a\sql\sql\sql-odbc\build\aws-sdk\install D:\a\sql\sql\sql-odbc/src/vcpkg x86

Note the mixed slash style in D:\a\sql\sql\sql-odbc/src/vcpkg which appears again in error

CMake Error at D:/a/sql/sql/sql-odbc/build/aws-sdk/build/CMakeFiles/CMakeTmp/CMakeLists.txt:16 (target_link_libraries):
2022-09-13T18:22:23.3784859Z   Syntax error in cmake code at
2022-09-13T18:22:23.3785114Z 
2022-09-13T18:22:23.3785390Z     D:/a/sql/sql/sql-odbc/build/aws-sdk/build/CMakeFiles/CMakeTmp/CMakeLists.txt:16
2022-09-13T18:22:23.3785690Z 
2022-09-13T18:22:23.3785862Z   when parsing string
2022-09-13T18:22:23.3786083Z 
2022-09-13T18:22:23.3786334Z     D:\a\sql\sql\sql-odbc/src/vcpkg/packages/curl_x86-windows/lib
2022-09-13T18:22:23.3786612Z 
2022-09-13T18:22:23.3786796Z   Invalid character escape '\a'.

I don't see how this is connected to vcpkg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support
Projects
None yet
4 participants