Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Build fails #46

Closed
huningxin opened this issue Dec 3, 2018 · 6 comments
Closed

Build fails #46

huningxin opened this issue Dec 3, 2018 · 6 comments

Comments

@huningxin
Copy link

Linux build fails against commit 02add7c

my Linux box is ubuntu 16.04.5

Build cldnn with mkdir build; cd build; cmake ..; make

The error message is:

[ 51%] Built target cldnn_kernel_selector
make[2]: Circular codegen/test_builds/api_c_test.c <- codegen/test_builds/api_c_test.c dependency dropped.
make[2]: Circular codegen/test_builds/api_cpp_test.cpp <- codegen/test_builds/api_cpp_test.cpp dependency dropped.
make[2]: Circular codegen/test_builds/api_cpp_test.cpp <- codegen/test_builds/api_cpp_test.cpp dependency dropped.
make[2]: Circular codegen/test_builds/api_c_test.c <- codegen/test_builds/api_c_test.c dependency dropped.
[ 51%] Building C object api_test_builds/CMakeFiles/api_test_builds.dir/__/codegen/test_builds/api_c_test.c.o
In file included from /home/nhu/code/clDNN/build/codegen/test_builds/api_c_test.c:16:0:
/home/nhu/code/clDNN/api/C/pooling.h:56:1: error: unknown type name ‘bool’
 bool global_pooling;
 ^
api_test_builds/CMakeFiles/api_test_builds.dir/build.make:213: recipe for target 'api_test_builds/CMakeFiles/api_test_builds.dir/__/codegen/test_builds/api_c_test.c.o' failed
make[2]: *** [api_test_builds/CMakeFiles/api_test_builds.dir/__/codegen/test_builds/api_c_test.c.o] Error 1
CMakeFiles/Makefile2:141: recipe for target 'api_test_builds/CMakeFiles/api_test_builds.dir/all' failed
make[1]: *** [api_test_builds/CMakeFiles/api_test_builds.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@huningxin
Copy link
Author

huningxin commented Dec 19, 2018

Linux build still fails against commit 8c4ccde

ubuntu 16.04.5

build command

mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=Release ..; make

cmake warning message

-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
[clDNN] CLDNN__ARCHITECTURE_TARGET: Target architecture is not specified. Trying to deduce it from context.
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7") 
CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106400
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:595 (find_package)


CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106400
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:595 (find_package)


CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106400
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:595 (find_package)


CMake Warning at /usr/share/cmake-3.5/Modules/FindBoost.cmake:725 (message):
  Imported targets not available for Boost version 106400
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:763 (_Boost_COMPONENT_DEPENDENCIES)
  /usr/share/cmake-3.5/Modules/FindBoost.cmake:1332 (_Boost_MISSING_DEPENDENCIES)
  CMakeLists.txt:595 (find_package)


-- Boost version: 1.64.0
-- Found the following Boost libraries:
--   system
--   date_time
--   program_options
--   filesystem
-- [clDNN] ======================== clDNN Project =======================
-- [clDNN] Version:          1.4.20.0
-- [clDNN]
-- [clDNN] Build type:       Release (for single-configuration generators)
-- [clDNN] Av. build types:  Debug;Release (for multi-configuration generators)
-- [clDNN]
-- [clDNN] Output bin directory:
-- [clDNN]  - "/home/nhu/code/clDNN/build/out/Linux64/Release"
-- [clDNN] Output lib directory:
-- [clDNN]  - "/home/nhu/code/clDNN/build/out/Linux64/Release"
-- [clDNN] Architecture:
-- [clDNN]  - target: Linux64    (detected: Linux64)
-- [clDNN]
-- [clDNN]
-- [clDNN] Advanced:
-- [clDNN]  - ICD version used to build:     6.3
-- [clDNN]  - boost ver. used to build:      1.64.0
-- [clDNN]
-- [clDNN]  - Include/Build cldnn core:      ON
-- [clDNN]  - Include/Build kernel selector: ON
-- [clDNN]  - Include/Build tests:           ON
-- [clDNN]  - Include/Build tutorial:        ON
-- [clDNN]
-- [clDNN]  - Run tests:                     OFF
-- [clDNN]
-- [clDNN]  - Use static C++ Runtime:        OFF
-- [clDNN]  - Allow unsafe size opts:        ON
-- [clDNN]  - CMake debug trace:             OFF
-- [clDNN]
-- [clDNN]
-- [clDNN] ICD:
-- [clDNN]  - Root:            /home/nhu/code/clDNN/common/intel_ocl_icd/6.3
-- [clDNN]     + Headers:      /home/nhu/code/clDNN/common/intel_ocl_icd/6.3/linux/include
-- [clDNN]     + Static libs:  /home/nhu/code/clDNN/common/intel_ocl_icd/6.3/linux/Release/lib/x64
-- [clDNN]     + Shared libs:  /home/nhu/code/clDNN/common/intel_ocl_icd/6.3/linux/Release/bin/x64
-- [clDNN]     + Libs to link: /home/nhu/code/clDNN/common/intel_ocl_icd/6.3/linux/Release/bin/x64
-- [clDNN]
-- [clDNN] boost libraries:
-- [clDNN]  - Root:            /home/nhu/code/clDNN/common/boost/1.64.0
-- [clDNN]     + Headers:      /home/nhu/code/clDNN/common/boost/1.64.0/include/boost-1_64
-- [clDNN]     + Libs to link: /home/nhu/code/clDNN/common/boost/1.64.0/linux/x64/lib
-- [clDNN] =============================================================================
-- Performing Test CLDNN__COMPILER_SUPPORTS_CXX14
-- Performing Test CLDNN__COMPILER_SUPPORTS_CXX14 - Success
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- [clDNN] Selected capabilities: public
-- Configuring done
CMake Error at src/CMakeLists.txt:227 (add_library):
  Target "clDNN_shlib" links to target "Boost::filesystem" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at src/CMakeLists.txt:227 (add_library):
  Target "clDNN_shlib" links to target "Boost::system" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at tests/CMakeLists.txt:123 (add_executable):
  Target "tests" links to target "Boost::filesystem" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at tests/CMakeLists.txt:123 (add_executable):
  Target "tests" links to target "Boost::system" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


CMake Error at tutorial/CMakeLists.txt:60 (add_executable):
  Target "tutorial" links to target "Boost::filesystem" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?


CMake Error at tutorial/CMakeLists.txt:60 (add_executable):
  Target "tutorial" links to target "Boost::system" but the target was not
  found.  Perhaps a find_package() call is missing for an IMPORTED target, or
  an ALIAS target is missing?


-- Generating done
-- Build files have been written to: /home/nhu/code/clDNN/build

build error message

[ 76%] Building CXX object src/CMakeFiles/clDNN_shlib.dir/gpu/ocl_base_event.cpp.o
In file included from /home/nhu/code/clDNN/src/gpu/engine_info.cpp:139:0:
/home/nhu/code/clDNN/src/caps/public/mode.inc:17:6: error: ‘cldnn::gpu::{anonymous}::public_caps’ defined but not used [-Werror=unused-variable]
 bool public_caps = true;
      ^
[ 76%] Building CXX object src/CMakeFiles/clDNN_shlib.dir/gpu/max_unpooling_gpu.cpp.o
cc1plus: all warnings being treated as errors
src/CMakeFiles/clDNN_shlib.dir/build.make:2798: recipe for target 'src/CMakeFiles/clDNN_shlib.dir/gpu/engine_info.cpp.o' failed
make[2]: *** [src/CMakeFiles/clDNN_shlib.dir/gpu/engine_info.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:86: recipe for target 'src/CMakeFiles/clDNN_shlib.dir/all' failed
make[1]: *** [src/CMakeFiles/clDNN_shlib.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

after simply comment the unused variable as

diff --git a/src/caps/public/mode.inc b/src/caps/public/mode.inc
index d2f02af..67bedc6 100644
--- a/src/caps/public/mode.inc
+++ b/src/caps/public/mode.inc
@@ -14,6 +14,6 @@
 // limitations under the License.
 */
 
-bool public_caps = true;
+//bool public_caps = true;
 bool is_imad_supported(int) { return false; }

, it ends up with a linking error

[ 51%] Linking CXX shared library ../out/Linux64/Release/libclDNN64.so
/usr/bin/ld: cannot find -lBoost::filesystem
/usr/bin/ld: cannot find -lBoost::system
collect2: error: ld returned 1 exit status
src/CMakeFiles/clDNN_shlib.dir/build.make:3943: recipe for target 'out/Linux64/Release/libclDNN64.so' failed
make[2]: *** [out/Linux64/Release/libclDNN64.so] Error 1
CMakeFiles/Makefile2:86: recipe for target 'src/CMakeFiles/clDNN_shlib.dir/all' failed
make[1]: *** [src/CMakeFiles/clDNN_shlib.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

@emptyVoid
Copy link

On Ubuntu 18.04 build succeeds after commenting out bool public_caps = true;.
As per your link error, I think CMake 3.9 or newer (or at least its FindBoost.cmake module) is needed to properly detect Boost 1.64.

@huningxin
Copy link
Author

Thanks @emptyVoid ! The cmake passed by applying newer FindBoost.cmake. I just noticed It is already documented in the README.md.

@smarcink
Copy link
Contributor

@huningxin Unused variable should be fixed in next drop.

@huningxin
Copy link
Author

That's great! Thanks @smarcink !

@tponieck
Copy link
Contributor

tponieck commented Jan 4, 2019

fix has been released

@tponieck tponieck closed this as completed Jan 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants