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

libnd4j - undefined reference to `sd::PrintTo(sd::NDArray const&, std::ostream*) #10057

Open
archenroot opened this issue Dec 28, 2023 · 1 comment

Comments

@archenroot
Copy link

Issue Description

Tried to build master branch and fails on libnd4j:

[100%] Linking CXX executable runtests
cd /home/zangetsu/proj/public/deeplearning4j/libnd4j/blasbuild/cpu/tests_cpu/layers_tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/runtests.dir/link.txt --verbose=1
/usr/bin/c++  -fPIC -DSD_ALL_OPS=true -DBUILD_TESTS=true -fmax-errors=3 -fopenmp -O3 -fPIC -D_RELEASE=true @CMakeFiles/runtests.dir/objects1.rsp -o runtests   -L/home/zangetsu/.javacpp/cache/openblas-0.3.23-1.5.9-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64  -L/home/zangetsu/.javacpp/cache/openblas-0.3.23-1.5.9-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64/lib  -Wl,-rpath,/home/zangetsu/.javacpp/cache/openblas-0.3.23-1.5.9-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64:/home/zangetsu/.javacpp/cache/openblas-0.3.23-1.5.9-linux-x86_64.jar/org/bytedeco/openblas/linux-x86_64/lib -lopenblas ../../cpu_features-build/libcpu_features.a ../../lib/libgtest.a ../../lib/libgtest_main.a -ldl ../../lib/libgtest.a 
/usr/bin/ld: CMakeFiles/runtests.dir/BooleanOpsTests.cpp.o: in function `testing::AssertionResult testing::internal::CmpHelperEQFailure<sd::NDArray, sd::NDArray>(char const*, char const*, sd::NDArray const&, sd::NDArray const&)':
BooleanOpsTests.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIN2sd7NDArrayES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIN2sd7NDArrayES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_]+0x230): undefined reference to `sd::PrintTo(sd::NDArray const&, std::ostream*)'
/usr/bin/ld: BooleanOpsTests.cpp:(.text._ZN7testing8internal18CmpHelperEQFailureIN2sd7NDArrayES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_[_ZN7testing8internal18CmpHelperEQFailureIN2sd7NDArrayES3_EENS_15AssertionResultEPKcS6_RKT_RKT0_]+0x4d5): undefined reference to `sd::PrintTo(sd::NDArray const&, std::ostream*)'
/usr/bin/ld: CMakeFiles/runtests.dir/DeclarableOpsTests10.cpp.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > testing::PrintToString<sd::NDArray>(sd::NDArray const&)':
DeclarableOpsTests10.cpp:(.text._ZN7testing13PrintToStringIN2sd7NDArrayEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_[_ZN7testing13PrintToStringIN2sd7NDArrayEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_]+0x209): undefined reference to `sd::PrintTo(sd::NDArray const&, std::ostream*)'
collect2: error: ld returned 1 exit status
make[2]: *** [tests_cpu/layers_tests/CMakeFiles/runtests.dir/build.make:3706: tests_cpu/layers_tests/runtests] Error 1
make[2]: Leaving directory '/home/zangetsu/proj/public/deeplearning4j/libnd4j/blasbuild/cpu'
make[1]: *** [CMakeFiles/Makefile2:542: tests_cpu/layers_tests/CMakeFiles/runtests.dir/all] Error 2
make[1]: Leaving directory '/home/zangetsu/proj/public/deeplearning4j/libnd4j/blasbuild/cpu'
make: *** [Makefile:166: all] Error 2

Version Information

Please indicate relevant versions, including, if relevant:

  • Deeplearning4j version
org.deeplearning4j deeplearning4j 1.0.0-SNAPSHOT
  • Platform information (OS, etc)
    java 17.0.9 2023-10-17 LTS
    Java(TM) SE Runtime Environment Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS-jvmci-23.0-b21)
    Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS-jvmci-23.0-b21, mixed mode, sharing)
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=22.04
    DISTRIB_CODENAME=jammy
    DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"

  • CUDA version, if used
    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2021 NVIDIA Corporation
    Built on Thu_Nov_18_09:45:30_PST_2021
    Cuda compilation tools, release 11.5, V11.5.119
    Build cuda_11.5.r11.5/compiler.30672275_0

  • NVIDIA driver version, if in use
    535.129.03

Additional Information

Where applicable, please also provide:

I used mvn clean install -Dgpu -X command on master branch.

Contributing

I am willing to provide fix, but not sure how to fix this. Thx for navigation/feedback.

@agibsonccc
Copy link
Contributor

agibsonccc commented Dec 28, 2023

That's probably fixed on my working branch here: #10052 Mainly posting this for reference. After this I plan on splitting this up in to neater PRS.

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

No branches or pull requests

2 participants