Stiffstream / restinio

Cross-platform, efficient, customizable, and robust asynchronous HTTP(S)/WebSocket server C++ library with the right balance between performance and ease of use
Other
1.15k stars 93 forks source link

ISO C++ did not adopt string literal operator templates taking an argument pack of characters #45

Closed binarytrails closed 5 years ago

binarytrails commented 5 years ago

Got this error that I never saw before while integrating RESTinio into our Autotools GNU build system of the ring-daemon and it seems related to this https://github.com/citra-emu/citra/issues/4766 however, this did not fix it but removing the ; at the specified lines fixed this errors, any insights on this matter?

make[1]: Entering directory '/home/n0t/jami/ring-daemon/contrib/build/opendht'
Making install in src
make[2]: Entering directory '/home/n0t/jami/ring-daemon/contrib/build/opendht/src'
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -fPIC -DOPENDHT_JSONCPP=1 -DOPENDHT_PROXY_HTTP_PARSER_FORK -DOPENDHT_PROXY_SERVER -DOPENDHT_PROXY_CLIENT -DOPENDHT_PUSH_NOTIFICATIONS -I../include/opendht    -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -fPIC -DOPENDHT_JSONCPP=1 -DOPENDHT_PROXY_HTTP_PARSER_FORK -DOPENDHT_PROXY_SERVER -DOPENDHT_PROXY_CLIENT -DOPENDHT_PUSH_NOTIFICATIONS  -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -DNDEBUG=1 -O3 -std=c++14 -fPIC -O3 -pedantic-errors -DMSGPACK_DISABLE_LEGACY_NIL -DMSGPACK_DISABLE_LEGACY_CONVERT -c -o libopendht_la-dhtrunner.lo `test -f 'dhtrunner.cpp' || echo './'`dhtrunner.cpp
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -fPIC -DOPENDHT_JSONCPP=1 -DOPENDHT_PROXY_HTTP_PARSER_FORK -DOPENDHT_PROXY_SERVER -DOPENDHT_PROXY_CLIENT -DOPENDHT_PUSH_NOTIFICATIONS -I../include/opendht -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -fPIC -DOPENDHT_JSONCPP=1 -DOPENDHT_PROXY_HTTP_PARSER_FORK -DOPENDHT_PROXY_SERVER -DOPENDHT_PROXY_CLIENT -DOPENDHT_PUSH_NOTIFICATIONS -I/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include -DNDEBUG=1 -O3 -std=c++14 -fPIC -O3 -pedantic-errors -DMSGPACK_DISABLE_LEGACY_NIL -DMSGPACK_DISABLE_LEGACY_CONVERT -c dhtrunner.cpp  -fPIC -DPIC -o libopendht_la-dhtrunner.o
In file included from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/http_headers.hpp:16,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/request_handler.hpp:15,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/settings.hpp:18,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/all.hpp:12,
                 from ../include/opendht/http.h:28,
                 from ../include/opendht/dht_proxy_client.h:30,
                 from dhtrunner.cpp:27:
/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/fmt/format.h:3475:55: error: ISO C++ did not adopt string literal operator templates taking an argument pack of characters [-Wpedantic]
 3475 | FMT_CONSTEXPR internal::udl_formatter<Char, CHARS...> operator""_format() {
      |                                                       ^~~~~~~~
In file included from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/request_handler.hpp:15,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/settings.hpp:18,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/all.hpp:12,
                 from ../include/opendht/http.h:28,
                 from ../include/opendht/dht_proxy_client.h:30,
                 from dhtrunner.cpp:27:
/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/http_headers.hpp:38:2: error: extra ‘;’ [-Wpedantic]
   38 | };
      |  ^
In file included from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/uri_helpers.hpp:18,
                 from /home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/all.hpp:21,
                 from ../include/opendht/http.h:28,
                 from ../include/opendht/dht_proxy_client.h:30,
                 from dhtrunner.cpp:27:
/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/utils/percent_encoding.hpp:83:2: error: extra ‘;’ [-Wpedantic]
   83 | };
      |  ^
/home/n0t/jami/ring-daemon/contrib/x86_64-pc-linux-gnu/include/restinio/utils/percent_encoding.hpp:109:2: error: extra ‘;’ [-Wpedantic]
  109 | };
      |  ^
make[2]: *** [Makefile:904: libopendht_la-dhtrunner.lo] Error 1
make[2]: Leaving directory '/home/n0t/jami/ring-daemon/contrib/build/opendht/src'
make[1]: *** [Makefile:515: install-recursive] Error 1
make[1]: Leaving directory '/home/n0t/jami/ring-daemon/contrib/build/opendht'
make: *** [../../contrib/src/opendht/rules.mak:42: .opendht] Error 2
eao197 commented 5 years ago

Hi!

I'm fixing troubles with extra semicolons right now. But the issue with operator""_format is fmtlib's issue, and it is better to report it here.

binarytrails commented 5 years ago

@eao197 yeah, I just commented the semicolons and everything builds as long as my latest #42 pragma once is present to avoid redefinition error!

Is it possible to have the semicolons fix that you're on along with #42 to be added to the next release?

RESTinio has been merged to OpenDHT and it is all good :tada: but we rather avoid in our ring-daemon autotools build system to get RESTinio from master and use a release version in our rules.mak file for its dependency.

eao197 commented 5 years ago

@binarytrails The updated version of RESTinio is in the master branch now. I'll make a release of v.0.5.1.2 with these fixes tomorrow.

eao197 commented 5 years ago

@binarytrails Version v.0.5.1.2 is fixed as a tag. zip and tar.bz2 files for that version will be published on BitBucket sometime later.

eao197 commented 5 years ago

v.0.5.1.2 contains a workaround for fmtlib-5.3: https://github.com/Stiffstream/restinio/blob/master/dev/restinio/impl/include_fmtlib.hpp

binarytrails commented 5 years ago

@eao197 thank you everything builds with gnu autotools now!