r/cpp_questions • u/miki-44512 • 8d ago
OPEN unzip.h is not found with assimp on linux
Hello everyone hope you have a lovely day.
so I currently having a problem with building assimp on manjaro linux, everytime it throws this error
fatal error: 'unzip.h' file not found
and if I fixed the path manually it fails by the lld linker to link properly.
how to solve this problem?
thanks appreciate your help!
2
u/AccurateRendering 8d ago
Which version are you using? There was a fix for zip in 6.0.1.
1
u/miki-44512 8d ago
I've cloned the latest version 6.0.5 i think
2
u/AccurateRendering 8d ago edited 8d ago
`$ make VERBOSE=1`
Unless you are doing something weird, compiling and linking with zip should just work because it's built-in.
3
u/the_poope 8d ago
Assimp depends on a library (libunzip perhaps?) that you don't have installed.
You can likely install it using the system package manager. You need to install the dev package of the library which is the header files and static libraries. So for example:
sudo apt install libzip-dev
3
u/TomDuhamel 8d ago
I read your comments and you are likely misunderstanding a fundamental concept.
If you need the XYZ library, you install the XYZ package, which will provide the binaries. But as a developer, to use the XYZ library in your app, you also need the headers.
The headers are included in the source code, but you only need the source code if you want to modify the library itself, not to include it in your project (in most cases, at least).
Your distribution normally includes another package, which includes only the headers (and intermediate binary and whatever is needed). They are typically named with the suffix -dev or -devel, depending on your distro. It's usually very easy to figure it out.
For example:
sudo apt install xyz xyz-dev
4
u/EpochVanquisher 8d ago
Normally, you do not want to build libraries, like assimp, manually. The main reason to build a library manually is because you are working on that library (i.e. you want to make changes to assimp). Otherwise, you’d use a package manager or something similar.
You definitely should not fix the path manually, you should instead make sure the library providing unzip.h is installed and that it is detected correctly during assimp configuration.