Giter VIP home page Giter VIP logo

Comments (15)

sebastiandev avatar sebastiandev commented on August 16, 2024

Have you set LIBZ_INCLUDE_DIR to point to the path where zlib.h is located?

from zipper.

artellblender avatar artellblender commented on August 16, 2024

Thanks for your reply Sebastian!
I've finally found a way by changing the paths to the zlib dir and dll in the "CMakeCache.txt" generated after the error... But I don't know if it's the good way.
The files are now generated without errors.
But the last step "make" does not work :-( It says there is not target/make file... Any advice?

from zipper.

artellblender avatar artellblender commented on August 16, 2024

(it's make from cygwin64)

from zipper.

artellblender avatar artellblender commented on August 16, 2024

After further investigations:
-Using CMake GUI definitely helped solving the zlib path issues

-Compiling with MinGW leads to an error with<filesystem>in defs.h :

fatal error: filesystem: No such file or directory
#include <filesystem>

-Compiling with MVS 2017 leads unfortunately to other errors:
c:\zlib\zconf.h(477): fatal error C1083: cannot open include file : 'unistd.h' : No such file or directory

from zipper.

0ctothorp avatar 0ctothorp commented on August 16, 2024

-Compiling with MinGW leads to an error with <filesystem> in defs.h :

I have the same issue compiling on windows with MinGW32.

from zipper.

sebastiandev avatar sebastiandev commented on August 16, 2024

I don't have a windows box so I cant really test it right now. @fbergmann any ideas here?

from zipper.

fbergmann avatar fbergmann commented on August 16, 2024

I have not tested with MingW32, which currently does not yet seem to support the filesystem api. Compilation will succeed with visual studio (which can be downloaded free of charge).

from zipper.

0ctothorp avatar 0ctothorp commented on August 16, 2024

@fbergmann Yeah, I already figured that out. Compiling with Visual Studio works :) BTW is the <filesystem> header for c++17 experimental filesystem api or is it something windows specific?

from zipper.

fbergmann avatar fbergmann commented on August 16, 2024

the filesystem api is not windows specific, but there is hardly any support in the std c++ libraries for it otherwise. That is why on other system i was using a class we wrote for out other project (COPASI). So all that will need to be done is to somehow detect mingw and then disable that include and default to the other one.

from zipper.

Lecrapouille avatar Lecrapouille commented on August 16, 2024

Hi, I'm also a noob with MinGW (I don't have Window) so I'm trying to compile zipper (in blind) with appveyor, and I have the following error:

-- Looking for gzopen in LIBZ_LIBRARY-NOTFOUND
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBZ_LIBRARY

Note: I installed zlib and libzip with pacman but I do not know how to set ZLIBROOT as requested in the README:

Note: For windows users, zlib is expected to be found at ZLIBROOT.

Any help is welcomed :)

from zipper.

fbergmann avatar fbergmann commented on August 16, 2024

In this case you specifically pass along the -DLIBZ_LIBRARY= < path to libz library to link against > cheers frank

from zipper.

Lecrapouille avatar Lecrapouille commented on August 16, 2024

Hi @fbergmann ! Thx for your fast answer but I think it will be more difficult than just added -DLIBZ_LIBRARY.

In my case zlib.h seems to be located in /mingw64/include/zlib.h and /mingw32/include/zlib.h and therefore matching the CMakeLists.txt code line 124 $ENV{ZLIBROOT}/include.

So, at beginning, I tried to do that:

cd zipper
mkdir build
cd build
export ZLIBROOT="/mingw64"
cmake ..

Unfortunately failed because I do not have zdll.lib or zlib.lib files like expected by CMakeLists.txt line 113 $ENV{ZLIBROOT}/lib In fact I have files libz.a and libz.dll.a located in /mingw64/lib

So I followed your answer:

cd zipper
mkdir build
cd build
export ZLIBROOT="/mingw64"
cmake -DLIBZ_LIBRARY="/mingw64/lib" ..

But failed:

-- Looking for gzopen in C:/msys64/mingw64/lib
WARNING: Target "cmTC_80ddf" requests linking to directory "C:/msys64/mingw64/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cmTC_80ddf" requests linking to directory "C:/msys64/mingw64/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cmTC_80ddf" requests linking to directory "C:/msys64/mingw64/lib". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cmTC_80ddf" requests linking to directory "C:/msys64/mingw64/lib". Targets may link only to libraries. CMake is dropping the item.
-- Looking for gzopen in C:/msys64/mingw64/lib - not found

Note: I do not have Window computer with MinGW so I have to work blindly with an appveyor script: edit it, git push it, and see results in appveyor logs. Feel free to use and adapt my appveyor.yml script calling the pacman install script for your own tests.

from zipper.

oranja avatar oranja commented on August 16, 2024

Seems like you would need to edit the CMakeLists.txt file, such that it either:

  • takes a user-defined value for LIBZ_LIBRARY, in your case pointing straight to /mingw64/lib/libz.a (if (NOT LIBZ_LIBRARY), followed by another endif() after the current one in @L128)
  • or also accepts zlib.a in NAMES for LIBZ_LIBRARY (@l108)

Disclaimer: I did not test this solution. It's an educated guess.

from zipper.

Lecrapouille avatar Lecrapouille commented on August 16, 2024

@oranja, thanks you ! I had not time checking your suggestion yet. I postponed window CI for the moment.

from zipper.

Lecrapouille avatar Lecrapouille commented on August 16, 2024

Closed by #76

from zipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.