Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Rasheed__Umer
Beginner
253 Views

Failed to Build Inference Sample Applications

Hi 

I have been trying to build sample applications on Linux
Please see:
https://software.intel.com/en-us/articles/OpenVINO-InferEngine#supported-layers

We followed the steps listed in the link above and got this error when we tried to ‘make’:
/home/avidbots/intel/computer_vision_sdk/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64/libinference_engine.so: error: undefined reference to 'pthread_create'
collect2: error: ld returned 1 exit status
hello_autoresize_classification/CMakeFiles/hello_autoresize_classification.dir/build.make:114: recipe for target 'intel64/Debug/hello_autoresize_classification' failed
make[2]: *** [intel64/Debug/hello_autoresize_classification] Error 1
CMakeFiles/Makefile2:414: recipe for target
'hello_autoresize_classification/CMakeFiles/hello_autoresize_classification.dir/all' failed
make[1]: *** [hello_autoresize_classification/CMakeFiles/hello_autoresize_classification.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

0 Kudos
9 Replies
nikos1
Valued Contributor I
253 Views

Just making sure. Have you set up OpenVino environment?

source  ~/intel/computer_vision_sdk/bin/setupvars.sh

 

Rasheed__Umer
Beginner
253 Views

Hi

Yes. Tried on multiple laptops as well. Same problem persists. 

Umer

Rasheed__Umer
Beginner
253 Views

Hi 

I have also tried with both Debug and Release versions. Same issue. 

nikos1
Valued Contributor I
253 Views

Which version of cmake are you using? 

cmake --version

 

nikos1
Valued Contributor I
253 Views

Please note:

Supported Linux build environment:

Ubuntu* 16.04 LTS 64-bit or CentOS* 7.4 64-bit

GCC* 5.4.0 (for Ubuntu* 16.04) or GCC* 4.8.5 (for CentOS* 7.4)

CMake* version 2.8 or higher.

Rasheed__Umer
Beginner
253 Views

Hi 

Thanks for the quick response. The current platforms I have tested on have 

Ubuntu 16.04

GCC Version: 5.4.0 

CMake Version: 3.5.1

nikos1
Valued Contributor I
253 Views

Could you try again after

sudo apt-get install libpthread-stubs0-dev

or cmake with

cmake -DCMAKE_SHARED_LINKER_FLAGS=-pthread ..

If not successful what are the pthread entries after cmake ?

Do you get something like

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found

 

Rasheed__Umer
Beginner
253 Views

Hi 

Sorry no luck. 

Lipbthread is already installed. 

This is what terminal looks like after CMake:

avidbots@cybel:~/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build$ cmake -DCMAKE_SHARED_LINKER_FLAGS=-pthread ..
-- /etc/*-release distrib: Ubuntu 16.04
-- Host CPU features:
--   3DNOW not supported
--   3DNOWEXT not supported
--   ABM not supported
--   ADX supported
--   AES supported
--   AVX supported
--   AVX2 supported
--   AVX512CD not supported
--   AVX512F not supported
--   AVX512ER not supported
--   AVX512PF not supported
--   BMI1 supported
--   BMI2 supported
--   CLFSH supported
--   CMPXCHG16B supported
--   CX8 supported
--   ERMS supported
--   F16C supported
--   FMA supported
--   FSGSBASE supported
--   FXSR supported
--   HLE not supported
--   INVPCID supported
--   LAHF supported
--   LZCNT supported
--   MMX supported
--   MMXEXT not supported
--   MONITOR supported
--   MOVBE supported
--   MSR supported
--   OSXSAVE supported
--   PCLMULQDQ supported
--   POPCNT supported
--   PREFETCHWT1 not supported
--   RDRAND supported
--   RDSEED supported
--   RDTSCP supported
--   RTM not supported
--   SEP supported
--   SHA not supported
--   SSE supported
--   SSE2 supported
--   SSE3 supported
--   SSE4.1 supported
--   SSE4.2 supported
--   SSE4a not supported
--   SSSE3 supported
--   SYSCALL supported
--   TBM not supported
--   XOP not supported
--   XSAVE supported
-- Validation app build is switched off
-- Configuring done
-- Generating done
-- Build files have been written to: /home/avidbots/intel/computer_vision_sdk/deployment_tools/inference_engine/samples/build
 

Umer

253 Views

hi,

have the same error, "libinference_engine.so: undefined reference to `pthread_create'"

this reference help me solve the issue:

https://stackoverflow.com/questions/5395309/how-do-i-force-cmake-to-include-pthread-option-during-co...

hopes it help.

Herianto

Reply