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

Build davisking.dlib failed, not exist zlib.h and mex.h #78

Open
z-pc opened this issue Aug 10, 2021 · 2 comments
Open

Build davisking.dlib failed, not exist zlib.h and mex.h #78

z-pc opened this issue Aug 10, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@z-pc
Copy link

z-pc commented Aug 10, 2021

Describe the bug
I add "org.sw.demo.davisking.dlib", the compiler (VS2019 16.10.1) not found "zlib.h " and "mex.h"
This's some last error lines:

1>[148/3934] [org.sw.demo.davisking.dlib-19.17.0]/dlib/test/probabilistic.cpp
1>[149/3934] [org.sw.demo.davisking.dlib-19.17.0]/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/test/blas_bindings/vector.cpp
1>C:/Users/TuanAnh/.sw/storage/pkg/0a/aa/5e2e/src/sdir/dlib/test/blas_bindings/vector.cpp(9): fatal error C1189: #error:  "BLAS bindings must be used for this test to make any sense"
1>command failed: exit code = 2
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/external/libpng/pngpread.c
1>C:\Users\TuanAnh\.sw\storage\pkg\0a\aa\5e2e\src\sdir\dlib\external\libpng\pngstruct.h(31): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
1>command failed: exit code = 2
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/matlab/example_mex_class.cpp
1>C:\Users\TuanAnh\.sw\storage\pkg\0a\aa\5e2e\src\sdir\dlib\matlab\mex_wrapper.cpp(114): fatal error C1083: Cannot open include file: 'mex.h': No such file or directory
1>command failed: exit code = 2
1>Total errors: 3
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'G:\OCR\OCREngine\buildvs2019\CMakeFiles\cb97bb6989e5eaed4086d4f11b2765ae\sw_build_dependencies.rule' exited with code 1.
1>Done building project "sw_build_dependencies.vcxproj" -- FAILED.

I tried again by "Actions" from website, same error.
Some main lines in CMakeFile:

cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
set(SW_BUILD_SHARED_LIBS 0)
find_package(SW REQUIRED)
sw_add_package(
	${LIBTESSERACT}
	#org.sw.demo.boost.geometry
	org.sw.demo.danbloomberg.leptonica
	org.sw.demo.artifexsoftware.mupdf
	org.sw.demo.davisking.dlib
	)
sw_execute()

add_executable(example_classifier
	example/example_classifier.cpp)

target_link_libraries(example_classifier
	PUBLIC org.sw.demo.davisking.dlib)

Did I miss something?
Thanks.

Information:
"
sw.client.sw version 1.0.0
git revision db82472
assembled on
02.06.2021 21:58:26 UTC
03.06.2021 04:58:26 SE Asia Standard Time
"
VS2019 16.10.1

@z-pc z-pc added the bug Something isn't working label Aug 10, 2021
@egorpugin
Copy link
Contributor

Hi,

dlib was not packaged properly.
It is huge.
I added it only as a stub.

@egorpugin
Copy link
Contributor

If you want to use it within sw, I need help in packaging.

Instruction:

  1. Create sw.cpp with contents from https://software-network.org/org.sw.demo.davisking.dlib/specification
  2. Update dlib version there to get the latest release (19.22).
  3. Run sw build --fetch in the directory with sw.cpp.
  4. Fix raised issues in build script (sw.cpp).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants