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

katago: 1.3.5 -> 1.4.2 #87676

Merged
merged 1 commit into from May 24, 2020
Merged

katago: 1.3.5 -> 1.4.2 #87676

merged 1 commit into from May 24, 2020

Conversation

@OmnipotentEntity
Copy link
Contributor

OmnipotentEntity commented May 12, 2020

Motivation for this change

Version bump

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented May 12, 2020

Request for help.

Current version of katagoWithCuda no longer builds. Neither does this version.

The error received is during CMake's configure stage:

-- Check for working CUDA compiler: /nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/bin/nvcc
-- Check for working CUDA compiler: /nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/bin/nvcc - broken
CMake Error at /nix/store/fi94pv0wrajzx7bjxdabz1dk5nrf4dpb-cmake-3.17.0/share/cmake-3.17/Modules/CMakeTestCUDACompiler.cmake:46 (message):
  The CUDA compiler

    "/nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/bin/nvcc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /build/source/cpp/build/CMakeFiles/CMakeTmp

    Run Build Command(s):/nix/store/998ykzc5mazwak08hxayqmyqkyz18fcb-gnumake-4.2.1/bin/make cmTC_3083c/fast && /nix/store/998ykzc5mazwak08hxayqmyqkyz18fcb-gnumake-4.2.1/bin/make -f CMakeFiles/cmTC_3083c.dir/build.make CMakeFiles/cmTC_3083c.dir/build
    make[1]: Entering directory '/build/source/cpp/build/CMakeFiles/CMakeTmp'
    Building CUDA object CMakeFiles/cmTC_3083c.dir/main.cu.o
    /nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/bin/nvcc -forward-unknown-to-host-compiler   -cudart shared    -x cu -c /build/source/cpp/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_3083c.dir/main.cu.o
    Linking CUDA executable cmTC_3083c
    /nix/store/fi94pv0wrajzx7bjxdabz1dk5nrf4dpb-cmake-3.17.0/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3083c.dir/link.txt --verbose=1
    /nix/store/nr6f7jmhrxb4plz8n535s7fwymq0vns0-gcc-wrapper-7.5.0/bin/g++   CMakeFiles/cmTC_3083c.dir/main.cu.o -o cmTC_3083c  -lcudadevrt -lcudart_static  -L"/nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/targets/x86_64-linux/lib/stubs" -L"/nix/store/nzns9piy85q1x5hy43qgp5vny2qzwm1x-cudatoolkit-10.2.89/targets/x86_64-linux/lib" -lcudadevrt -lcudart
    /nix/store/3b3ighb83nhifa1v4n7855hlbdl1mhf9-binutils-2.31.1/bin/ld: /nix/store/8b71qygfrmbl9scwk83d5b589ghlhgbq-cudatoolkit-10.2.89-lib/lib/libcudart_static.a(libcudart_static.a.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
    /nix/store/3b3ighb83nhifa1v4n7855hlbdl1mhf9-binutils-2.31.1/bin/ld: /nix/store/bwzra330vib0ik4d3l8rq6gp6y2ah1fr-glibc-2.30/lib/libdl.so.2: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    make[1]: *** [CMakeFiles/cmTC_3083c.dir/build.make:104: cmTC_3083c] Error 1
    make[1]: Leaving directory '/build/source/cpp/build/CMakeFiles/CMakeTmp'
    make: *** [Makefile:138: cmTC_3083c/fast] Error 2

I encountered this error last time around, and I remember it being a compiler version issue, which is why I was on gcc8Stdenv for the CUDA build. This leads me to believe that there's perhaps an ABI mismatch between the new version of GCC (8.4.0) and the version that was available when this program was initially packaged (8.3.0).

Because ofBorg and hydra won't build Cuda stuff, this won't fail any of the automatic tests.

Soliciting ideas.

@OmnipotentEntity OmnipotentEntity requested a review from rnhmjoj May 12, 2020
@OmnipotentEntity OmnipotentEntity requested a review from knedlsepp May 12, 2020
@OmnipotentEntity OmnipotentEntity marked this pull request as draft May 12, 2020
@OmnipotentEntity OmnipotentEntity force-pushed the OmnipotentEntity:katago-1.4.1 branch from fb7745a to 676e1f4 May 13, 2020
@OmnipotentEntity OmnipotentEntity changed the title katago: 1.3.5 -> 1.4.1 katago: 1.3.5 -> 1.4.2 May 13, 2020
@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented May 13, 2020

I've pinned the issue down to a difference between cmake versions.

CMake 3.16.3 works, whereas 3.17.0 does not.

@OmnipotentEntity OmnipotentEntity force-pushed the OmnipotentEntity:katago-1.4.1 branch from 676e1f4 to 8d44783 May 13, 2020
@OmnipotentEntity OmnipotentEntity marked this pull request as ready for review May 13, 2020
@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented May 13, 2020

Now everything works after a workaround patch to CMakeLists.txt.

Copy link
Contributor

rnhmjoj left a comment

Have you tried downgrading cmake instead of patching? You could try cmake_2_8 which already has a top-level attribute. I don't know if it's too old, though.

In any case, I would wait for upstream to comment on the bug before accepting the patch.

pkgs/games/katago/default.nix Show resolved Hide resolved
@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented May 16, 2020

Unfortunately, minimum CMake version required is 3.10.2

@OmnipotentEntity OmnipotentEntity force-pushed the OmnipotentEntity:katago-1.4.1 branch 2 times, most recently from e5ae9cc to 59f214f May 17, 2020
@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented May 18, 2020

Changed the patch to CMake-dev recommended solution, changed patch = changed sha = new push.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented May 18, 2020

@GrahamcOfBorg build katago

@OmnipotentEntity OmnipotentEntity force-pushed the OmnipotentEntity:katago-1.4.1 branch from 59f214f to b1d8188 May 18, 2020
Copy link
Contributor

rnhmjoj left a comment

Based on the CMake devs comment, this is the correct solution.

@rnhmjoj rnhmjoj merged commit 919b055 into NixOS:master May 24, 2020
16 checks passed
16 checks passed
katago, katago.passthru.tests on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="b1d8188"; rev="b1d8188f1f3979a862d4975a4ee36adbb5251e04"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
katago, katago.passthru.tests on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.