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

[tesseract] libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for #12540

Closed
AlejandroCamba opened this issue Jul 22, 2020 · 3 comments
Assignees
Labels
category:question This issue is a question

Comments

@AlejandroCamba
Copy link

Describe the bug
A clear and concise description of what the bug is.

Environment

  • OS: [MacOS]
  • Compiler:
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - works

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install tesseract

  2. CMakeLists.txt:
    find_package(Tesseract CONFIG REQUIRED)
    target_link_libraries(startProject PRIVATE libtesseract)

  3. import in main.cpp:
    #include <tesseract/baseapi.h>

  4. Declare:
    tesseract::TessBaseAPI test;

Expected behavior
Be able to use tesseract classes

Failure logs
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname::collate_byname failed to construct for

Additional context
I'm using opencv and libzippp with vcpkg as well, both compile and work with normality

Complete CMakeLists.txt:

cmake_minimum_required(VERSION 3.0)
project(startProject)

find_package(libzip REQUIRED)
find_package(libzippp CONFIG REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Tesseract CONFIG REQUIRED)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)

add_executable(startProject main.cpp)
target_link_libraries(startProject PRIVATE libtesseract)
target_link_libraries(startProject PRIVATE zip)
target_link_libraries(startProject PRIVATE libzippp::libzippp)

include_directories( ${OpenCV_INCLUDE_DIRS} )
link_directories( ${OpenCV_LIB_DIR} )

target_link_libraries(startProject PRIVATE ${OpenCV_LIBS})

@PhoebeHui
Copy link
Contributor

@AlejandroCamba, it looks a locale issue, see microsoft/homebrew-mssql-release#18.

@PhoebeHui PhoebeHui added the category:question This issue is a question label Mar 1, 2021
@PhoebeHui
Copy link
Contributor

@AlejandroCamba, does this still be a problem for you?

@PhoebeHui
Copy link
Contributor

I have confirmed, this is built successfully for me.

 cmake_minimum_required(VERSION 3.0)
 project(main)
 set(CMAKE_CXX_STANDARD 11)
 add_executable(main main.cpp)

 find_package(Tesseract CONFIG REQUIRED)
 target_link_libraries(main PRIVATE libtesseract)

#include <tesseract/baseapi.h>

int main()
{
  tesseract::TessBaseAPI test;
return 0;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants