clangen / musikcube

a cross-platform, terminal-based music player, audio engine, metadata indexer, and server in c++
https://musikcube.com
BSD 3-Clause "New" or "Revised" License
4.23k stars 295 forks source link

[Git master] Fails to compile on Linux with fatal error: microhttpd.h: No such file or directory #583

Open hartwork opened 1 year ago

hartwork commented 1 year ago

Hi!

This is what I get on Linux with latest master.

# cd "$(mktemp -d)"
# git clone https://github.com/clangen/musikcube
# cd musikcube/
# git submodule update --init
# cmake -S . -B build
# make -C build
# make -C build
make: Entering directory '/tmp/tmp.0k9P83aINW/musikcube/build'
[  3%] Built target supereqdsp
[ 41%] Built target musikcore
[ 43%] Built target taglibreader
[ 44%] Built target alsaout
[ 45%] Built target nullout
[ 47%] Built target pipewireout
[ 48%] Built target portaudioout
[ 51%] Built target pulseout
[ 52%] Building CXX object src/plugins/server/CMakeFiles/server.dir/HttpServer.cpp.o
In file included from /tmp/tmp.0k9P83aINW/musikcube/src/plugins/server/HttpServer.cpp:35:
/tmp/tmp.0k9P83aINW/musikcube/src/plugins/server/HttpServer.h:39:14: fatal error: microhttpd.h: No such file or directory
   39 |     #include <microhttpd.h>
      |              ^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/plugins/server/CMakeFiles/server.dir/build.make:90: src/plugins/server/CMakeFiles/server.dir/HttpServer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:780: src/plugins/server/CMakeFiles/server.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
make: Leaving directory '/tmp/tmp.0k9P83aINW/musikcube/build'
# git ls-files | grep microhttpd.h
src/3rdparty/win32_include/microhttpd.h
# git rev-parse HEAD
b2652ad64348f1d416a9d243ac77f40cee7bc303

Is this a bug in the build system?

Best, Sebastian

hartwork commented 1 year ago

Any thoughts?

smileaf419 commented 1 year ago

It’s listed as a Networking dependency. https://www.gnu.org/software/libmicrohttpd/

clangen commented 1 year ago

Yeah, libmicrohttpd must be available.

hartwork commented 1 year ago

It seems to compile after installing microhttpd. Any chance to have the build system detect absence of microhttpd and ask to install it?

clangen commented 1 year ago

I just added improved detection for microhttpd during build, this will be fixed in the next release.