2

Hi I'm trying to build Assimp with Cmake but the following error message appears everytime I try to configure Assimp. The version of Cmake is 3.11.0 and assimp is 4.0.0.

Looking for DirectX...
DirectX_PREFIX_PATH changed.
Found DirectX: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86/d3d9.lib
DX lib dir: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86
Looking for ZLIB...
Found PkgConfig: C:/cygwin/bin/pkg-config.exe (found version "0.29.1") 
Checking for module 'zzip-zlib-config'
  No package 'zzip-zlib-config' found
Could not locate ZLIB
compiling zlib from sources
CMake Deprecation Warning at contrib/zlib/CMakeLists.txt:8 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - found
Looking for stddef.h
Looking for stddef.h - found
Check size of off64_t
Check size of off64_t - failed
Looking for fseeko
Looking for fseeko - not found
Looking for unistd.h
Looking for unistd.h - not found
Could NOT find rt (missing: RT_LIBRARY) 
Enabled formats: AMF 3DS AC ASE ASSBIN ASSXML B3D BVH COLLADA DXF CSM HMP IRRMESH IRR LWO LWS MD2 MD3 MD5 MDC MDL NFF NDO OFF OBJ OGRE OPENGEX PLY MS3D COB BLEND IFC XGL FBX Q3D Q3BSP RAW SIB SMD STL TERRAGEN 3D X X3D GLTF 3MF MMD
Disabled formats:
Looking for DirectX...
DirectX_PREFIX_PATH changed.
DX lib dir: C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86
Could NOT find IL (missing: IL_LIBRARIES IL_INCLUDE_DIR) 
CMake Error at C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:27 (message):
  The imported target "Qt5::Gui" references the file

     "C:/cygwin/include/qt5/"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:68 (_qt5_Gui_check_file_exists)
  C:/cygwin/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  tools/assimp_qt_viewer/CMakeLists.txt:19 (FIND_PACKAGE)


Configuring incomplete, errors occurred!
See also "C:/Users/peter/Desktop/assimp-master/assimp-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/peter/Desktop/assimp-master/assimp-master/build/CMakeFiles/CMakeError.log".

For the configuration generator I used Visual Studio 15 2017 since I'm using that for my IDE. Is there anyway that this can be solved?

2
  • Looks like you QT5 installation under C:/cygwin is broken. Moreover, the file C:/cygwin/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake is wrong by itself: imported target should refer to the library file, not to the include directory.
    – Tsyvarev
    Commented Aug 3, 2018 at 11:32
  • Do you want to build a native version of assimp with VisualStudio? Then using any cygwin packages in the build seems wrong to me. Try using a native Qt5 package (if you just want the library you don't need Qt5 - it is used for the viewer)
    – Loebl
    Commented Aug 3, 2018 at 11:40

2 Answers 2

2

Please try the latest version of assimp ( 4.1.0 ). The cygwin-cmake file was broken. This shall work with the latest version.

As a workaround diable the tools-support for assimp ( the library will be build, but the qt5-based viewer not ):

cmake CMakelists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF

This will fix your cmake-error, because the tools will not be affected by cmake.

0

Hi I've found the correct solution to this problem:

git clone --recursive https://github.com/gdraheim/zziplib

cd zziplib

search the word:

grep -r zzip-zlib-config

result:

docs/64on32.htm:zzip-zlib-config            zzip-zlib-config - ZLib Config (for ZZipLib)
docs/configs.htm:   zzip-zlib-config      zzip-zlib-config - ZLib Config (for ZZipLib)
docs/configs.htm:   The two entries like "zzip-sdl-config" and "zzip-zlib-config"
docs/configs.htm:   $ pkg-config zzip-zlib-config --modversion
docs/configs.htm:   $ pkg-config zzip-zlib-config --libs      
old.configure:ax_create_pkgconfig_requires="zzip-zlib-config"
old.configure.ac:[zzip/zziplib.pc], [zzip-zlib-config],[-lzzip],,[ ])
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
zzip/Makefile.am:pkgconfig_HEADERS= zzip-zlib-config.pc zziplib.pc \
zzip/Makefile.am:zzip-zlib-config.pc : Makefile
zzip/Makefile.am:    @ echo "Name: zzip-zlib-config" >>$@
zzip/Makefile.am:    echo 'Requires: zzip-zlib-config' >>$@
zzip/Makefile.in:pkgconfig_HEADERS = zzip-zlib-config.pc zziplib.pc \
zzip/Makefile.in:zzip-zlib-config.pc : Makefile
zzip/Makefile.in:    @ echo "Name: zzip-zlib-config" >>$@

now compile and install the library files:

make

make install

see what's different now :

git status

using the old configuration files to generate that pkg-config file: zzip-zlib-config.pc

mv old.configure.ac configure.ac    
mv old.configure configure

./configure

git status

the MakeFile was generated in zzip directory.

cd zzip    
make    
git status

now the zzip-zlib-config.pc was generated successfully!

make install

this step will copy the zzip-zlib-config.pc to the /usr/local/lib/pkgconfig/ directory.

and we'd better copy another one to /usr/lib/x86_64-linux-gnu/pkgconfig/ :

cp zzip-zlib-config.pc /usr/lib/x86_64-linux-gnu/pkgconfig/

locate zzip-zlib-config

/usr/lib/x86_64-linux-gnu/pkgconfig/zzip-zlib-config.pc
/usr/local/lib/pkgconfig/zzip-zlib-config.pc


pkg-config zzip-zlib-config --libs

-lz

Complete!

Not the answer you're looking for? Browse other questions tagged or ask your own question.