Closed Ottunger closed 1 year ago
Do you have crash call stacks? Why do you think issue with sw checks rather than with some code?
I mean, I get "regular" buffer overflows. Which make methink not sufficiently large buffers are allocated, because we never actually ran checks on the device but copied the one from another target (a macOs laptop). Wouldn't that make sense?
What are "regular" overflows? Do you have stack traces? Is your host arm64 or x64?
OK, I think I found the problem with memory, I think it is indeed not related to sw build
here!
I'm closing this as I can confirm my build is OK. Hope no one will need a more straightforward way than copying macOS checks.
Describe the bug Linked to https://github.com/SoftwareNetwork/sw/issues/100 : we've finalized months ago our build targetting android (on Windows, never got it to run on macOS) but I'd like to build for iOS now.
I'm therefore using the project https://github.com/leetal/ios-cmake to make an integration with XCode compiler into CMake. I've tested the build from both a bundled in CLion CMake and a complete separate CMake version. I use Ninja as XCode is not supported by sw.
The build fails as such (I see a
-platform x64
in there that I don't like):It has been configuerd without errors with
Expected behavior Build could create static libraries for import into an iOS project later.
To Reproduce Steps to reproduce the behavior:
set(CMAKE_CXX_STANDARD 23) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(SW_DIR C:\Users\Ottunger\.sw\storage\etc\sw\static)
set(SW_BUILD_SHARED_LIBS 0) set(DEPENDENCIES org.sw.demo.google.tesseract.libtesseract-5.2.0 org.sw.demo.intel.opencv.videoio org.sw.demo.intel.opencv.imgcodecs org.sw.demo.intel.opencv.imgproc org.sw.demo.sqlite3 )
find_package(SW REQUIRED) sw_add_package(${DEPENDENCIES}) sw_execute()
file(COPY data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_library(satoris_ocr STATIC process.cpp MRZBuilder.cpp ocr.cpp) target_link_libraries(satoris_ocr ${DEPENDENCIES} iphlpapi.lib)
add_library(satoris_ocr_shared SHARED process.cpp MRZBuilder.cpp ocr.cpp)
set_target_properties(satoris_ocr_shared PROPERTIES PUBLIC_HEADER "ocr.h;ocr_type.h")
target_link_libraries(satoris_ocr_shared ${DEPENDENCIES} iphlpapi.lib)
add_executable(satoris_ocr_exe main.cpp)
target_link_libraries(satoris_ocr_exe org.sw.demo.intel.opencv.imgcodecs iphlpapi.lib)
-trace
parameter.