fuzziqersoftware / phosg

C++ helpers for some common tasks
19 stars 19 forks source link

Can't build on Raspberry Pi anymore. #35

Closed fishscene closed 1 hour ago

fishscene commented 2 hours ago

Re-pulled a fresh git clone of phosg and ran into a missing file error for zlib.h cmake --version: 3.30.1

cd ~
git clone https://github.com/fuzziqersoftware/phosg.git
cd ./phosg
cmake .
make

Error is thrown when running make:

pi@newserv:~/phosg $ make
[  2%] Building CXX object CMakeFiles/phosg.dir/src/Image.cc.o
/home/pi/phosg/src/Image.cc:15:10: fatal error: zlib.h: No such file or directory
   15 | #include <zlib.h>
      |          ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/phosg.dir/build.make:132: CMakeFiles/phosg.dir/src/Image.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:119: CMakeFiles/phosg.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

I was unable to find 'zlib.h' in the phosg repository.

fuzziqersoftware commented 1 hour ago

zlib isn't part of phosg; it's a system package. You'll have to install it using the system's package manager.

fishscene commented 1 hour ago

Aha. Sorry to trouble you. Looks like it is proceeding as normal after re-running: sudo apt install -y libz-dev I have a little script that I execute to set everything up and zlib is definitely on there. Somehow the package was unselected or uninstalled? No idea how that happened, but it's all sorted now. Thanks again!