Issues with libzzip.so.13

Problems building or running the engine, queries about how to use features etc.
Post Reply
Aang23
Gnoblar
Posts: 2
Joined: Sat Jan 26, 2019 8:52 pm
x 1

Issues with libzzip.so.13

Post by Aang23 »

Ogre Version: 1.12.0
Operating System: Ubuntu 18.04.3 LTS
Render System: OpenGL 3+

A while ago I had started a project with Ogre, using Cmake. I had installed Ogre from the github repo, and everything worked fine. Today I updated Ogre (same way), and updated my CMakeList.
Now here's what I'm getting :

Code: Select all

./bin/mtest: error while loading shared libraries: libzzip.so.13: cannot open shared object file: No such file or directory
I tried many things like compiling ZZip from sources, using the one provided with Ogre... etc, but couldn't get anything to work.

Here's my CMakeList.txt (here using Ogre's ZZip) :

Code: Select all

cmake_minimum_required (VERSION 3.0.0)

#set the executable 
project (mtest)
set(EXECUTABLE_OUTPUT_PATH bin)
file(GLOB_RECURSE CPPS src/*.cpp)
add_executable (mtest ${CPPS})

#defines Ogre3D
find_package(OGRE 1.12.0 REQUIRED COMPONENTS Bites RTShaderSystem)
file(COPY ${OGRE_CONFIG_DIR}/resources.cfg DESTINATION ${CMAKE_BINARY_DIR})
target_link_libraries(mtest ${OGRE_LIBRARIES}) 

#defines ZZip
add_library(zzip INTERFACE IMPORTED)
set_target_properties(zzip PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/home/user/Documents/ogre/build/Dependencies/include/"
  INTERFACE_LINK_LIBRARIES "/home/user/Documents/ogre/build/Dependencies/lib/libzzip.so")
target_link_libraries(mtest zzip) 

#defines OIS
add_library(ois INTERFACE IMPORTED)
set_target_properties(ois PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/usr/local/include/ois/"
  INTERFACE_LINK_LIBRARIES "/usr/local/lib/libOIS.so")
target_link_libraries(mtest ois) 

#defines spdlog
find_package(spdlog REQUIRED)
target_link_libraries(mtest spdlog::spdlog) 

Here's the gotten error when ZZip is not declared in the CMakeList.txt file :

Code: Select all

-- Found OGRE
--   static     : OFF
--   components : Bites;HLMS;MeshLodGenerator;Overlay;Paging;Property;RTShaderSystem;Terrain;Volume
--   plugins    : Plugin_BSPSceneManager;Plugin_OctreeSceneManager;Plugin_PCZSceneManager;Plugin_ParticleFX;RenderSystem_GL;RenderSystem_GL3Plus;Codec_STBI;Codec_FreeImage;Codec_EXR
--   media      : /usr/local/share/OGRE/Media
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alan/Documents/xmpp_tests/build
Scanning dependencies of target mtest
[ 33%] Building CXX object CMakeFiles/mtest.dir/src/logger.cpp.o
[ 66%] Building CXX object CMakeFiles/mtest.dir/src/main.cpp.o
[100%] Linking CXX executable bin/mtest
/usr/bin/ld: warning: libzzip.so.13, needed by /usr/local/lib/libOgreMain.so.1.12.0, not found (try using -rpath or -rpath-link)
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_close'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_error'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_read'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_strerror_of'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_close'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dirhandle'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_read'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_tell'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_open_ext_io'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_seek'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_dir_stat'
/usr/local/lib/libOgreMain.so.1.12.0: undefined reference to `zzip_file_open'
collect2: error: ld returned 1 exit status
CMakeFiles/mtest.dir/build.make:131: recipe for target 'bin/mtest' failed
make[2]: *** [bin/mtest] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mtest.dir/all' failed
make[1]: *** [CMakeFiles/mtest.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Thanks in advance to anyone who's gonna be answering.
User avatar
EricB
Bronze Sponsor
Bronze Sponsor
Posts: 360
Joined: Fri Apr 09, 2010 5:28 am
Location: Florida
x 213
Contact:

Re: Issues with libzzip.so.13

Post by EricB »

Using Cmake-gui and pointing cmake to the libzzip you want to use is a lot more easier.

If your copy of libzzip is version 13, you could simply renaming /home/user/Documents/ogre/build/Dependencies/lib/libzzip.so to libzzip.so.13
Thatwould probably fix the issue. Likewise, you could use symlinks, or alter the Ogre.so via patchelf to point to the copy of libzzip you have. (I rpath everything to the bin directory anyway my self.)

As for the cmakes shipped with Ogre and any changes to that, paroj will have to answer for that.
Image
Aang23
Gnoblar
Posts: 2
Joined: Sat Jan 26, 2019 8:52 pm
x 1

Re: Issues with libzzip.so.13

Post by Aang23 »

I have already tried renaming the .so, but that didn't work. Using cmake-gui doesn't work either.
I also tried setting the LD_LIBRARY_PATH and some others things, like changing gcc's paths.


Thanks for answering !
Post Reply