etr/libhttpserver

[BUG] libmicrohttpd v0.9.75 compatibility

LeSpocky opened this issue · 0 comments

Prerequisites

Description

libmicrohttpd v0.9.74 marks some definitions as deprecated, which leads to compiler warnings when using them, which libhttpserver does. This leads to build failure when calling configure with --enable-debug because that adds -Werror to compiler flags.

Steps to Reproduce

  1. Build libmicrohttpd v0.9.74 or v0.9.75
  2. Call ../configure with --enable-debug
  3. Call make

Expected behavior: Successful build.

Actual behavior: Build fails.

Reproduces how often: Always.

Versions

  • OS version: Debian GNU/Linux 10 (buster)
  • libhttpserver version: master
  • libmicrohttpd version: v0.9.75, compiled

If you have problems during build:

  • Compiler version: gcc (Debian 8.3.0-6) 8.3.0
  • autotools version: ??

Additional Information

The deprecated definitions are these:

  • MHD_HTTP_UNORDERED_COLLECTION
  • MHD_HTTP_PAYLOAD_TOO_LARGE
  • MHD_HTTP_UNPROCESSABLE_ENTITY

Full build output:

% make
make  all-recursive
make[1]: Verzeichnis „/home/adahl/src/libhttpserver/build“ wird betreten
Making all in src
make[2]: Verzeichnis „/home/adahl/src/libhttpserver/build/src“ wird betreten
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I../ -I../../src/httpserver/ -I/home/adahl/build/sysroot/http/include -DDEBUG -g -Wall -Wextra -Werror -pedantic -std=c++14 -Wno-unused-command-line-argument -O0 -fPIC -Wall  -DUSE_FASTOPEN -DHTTPSERVER_COMPILATION -D_REENTRANT   -MT libhttpserver_la-http_utils.lo -MD -MP -MF .deps/libhttpserver_la-http_utils.Tpo -c -o libhttpserver_la-http_utils.lo `test -f 'http_utils.cpp' || echo '../../src/'`http_utils.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../src -I.. -I../ -I../../src/httpserver/ -I/home/adahl/build/sysroot/http/include -DDEBUG -g -Wall -Wextra -Werror -pedantic -std=c++14 -Wno-unused-command-line-argument -O0 -fPIC -Wall -DUSE_FASTOPEN -DHTTPSERVER_COMPILATION -D_REENTRANT -MT libhttpserver_la-http_utils.lo -MD -MP -MF .deps/libhttpserver_la-http_utils.Tpo -c ../../src/http_utils.cpp  -fPIC -DPIC -o .libs/libhttpserver_la-http_utils.o
../../src/http_utils.cpp:104:13: error: Value MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE [-Werror]
 const int http_utils::http_request_entity_too_large = MHD_HTTP_PAYLOAD_TOO_LARGE;
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~           
../../src/http_utils.cpp:109:13: error: Value MHD_HTTP_UNPROCESSABLE_ENTITY is deprecated, use MHD_HTTP_UNPROCESSABLE_CONTENT [-Werror]
 const int http_utils::http_unprocessable_entity = MHD_HTTP_UNPROCESSABLE_ENTITY;
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                   
../../src/http_utils.cpp:112:13: error: Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC [-Werror]
 const int http_utils::http_unordered_collection = MHD_HTTP_UNORDERED_COLLECTION;
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~          
cc1plus: error: unrecognized command line option ‘-Wno-unused-command-line-argument’ [-Werror]
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:580: libhttpserver_la-http_utils.lo] Fehler 1
make[2]: Verzeichnis „/home/adahl/src/libhttpserver/build/src“ wird verlassen
make[1]: *** [Makefile:614: all-recursive] Fehler 1
make[1]: Verzeichnis „/home/adahl/src/libhttpserver/build“ wird verlassen
make: *** [Makefile:501: all] Fehler 2