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

Error : While Building recognizer executable #74

Closed
bhargavravat opened this issue Jul 9, 2020 · 7 comments
Closed

Error : While Building recognizer executable #74

bhargavravat opened this issue Jul 9, 2020 · 7 comments

Comments

@bhargavravat
Copy link

Hi @DoubangoTelecom :

I am trying to build executable of recognizer , however unable to build it.

I followed steps given in README.md .

Here is the error output. ****
image

@bhargavravat
Copy link
Author

Here is the exact log of the output:

I am into directory :
/data/ultimateALPR-SDK/samples/c++/recognizer

This is the command which I am running :
g++ recognizer.cxx -O3 -I../../../c++ -L../../../binaries/linux/x86_64 -lultimate_alpr-sdk -o recognizer

This is output which I am getting :
/usr/bin/ld: warning: libtensorflow.so.1, needed by ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so, not found (try using -rpath or -rpath-link) /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_Message@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_GraphGetTensorNumDims@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteImportGraphDefOptions@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_SessionRun@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteGraph@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewSessionOptions@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_GraphImportGraphDef@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewStatus@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DataTypeSize@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_SetConfig@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewImportGraphDefOptions@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_CloseSession@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteSession@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteTensor@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_GetCode@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewGraph@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteStatus@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteBuffer@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_TensorType@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_GraphGetTensorShape@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_TensorData@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_TensorByteSize@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_GraphOperationByName@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NumDims@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewBuffer@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_Dim@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_NewSession@VERS_1.0'
/usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_AllocateTensor@VERS_1.0' /usr/bin/ld: ../../../binaries/linux/x86_64/libultimate_alpr-sdk.so: undefined reference to TF_DeleteSessionOptions@VERS_1.0'
collect2: error: ld returned 1 exit status
`

@DoubangoTelecom
Copy link
Owner

@mochechan
Copy link

@DoubangoTelecom
Copy link
Owner

After following https://github.com/DoubangoTelecom/ultimateALPR-SDK/blob/master/samples/c%2B%2B/README.md#gpu-acceleration-tensorflow-linux, the problem is still existing. Any suggestion?
fail2compile

Link to tensorflow library -ltensorflow

@mochechan
Copy link

Link to tensorflow library -ltensorflow

Success. Thank you.

Additional question: How to setup CMakeLists.txt rather than using g++ directly?
The CMakeLists.txt in ultimateALPR-SDK/samples/c++/recognizer/ has some problems.

failcmake

@DoubangoTelecom
Copy link
Owner

DoubangoTelecom commented Jul 14, 2021

Link to tensorflow library -ltensorflow

Success. Thank you.

Additional question: How to setup CMakeLists.txt rather than using g++ directly?
The CMakeLists.txt in ultimateALPR-SDK/samples/c++/recognizer/ has some problems.

failcmake

These CMake files have dependencies on private code. We think it's useless to create one for a single file. If you still want one use https://github.com/DoubangoTelecom/FaceLivenessDetection-SDK/blob/master/samples/cpp/liveness/CMakeLists.txt.:
Some changes:

  • project (liveness VERSION 1.0.0 LANGUAGES CXX C) -> project (recognizer VERSION 1.0.0 LANGUAGES CXX C)
  • ${CMAKE_CURRENT_SOURCE_DIR}/../../../cpp -> ${CMAKE_CURRENT_SOURCE_DIR}/../../../c++
  • libFaceLivenessDetectionSDK.so -> libultimate_alpr-sdk.so
  • set (SOURCE liveness.cxx) -> set (SOURCE recognizer.cxx)
  • and add libtensorflow to target_link_libraries(...)
    ... haven't tested but I think that's it.

@DoubangoTelecom
Copy link
Owner

#162

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

3 participants