Closed montao closed 4 years ago
What JsonCpp version are you using? https://github.com/open-source-parsers/jsoncpp
On y Debian I have (as given with dpkg -l 'libjsoncpp*'
command)
ii libjsoncpp-dev:amd64 1.7.4-3.1 amd64 library for reading and writing JSON for C++ (devel f>
I made improvements in commit 99a040bd66278cf388ab771f7f8
Perhaps it works better?
I made improvements in commit 99a040b
Perhaps it works better?
I will try with both Ubuntu and Debian and report back. I have two native Ubuntu installations available and three different virtual Debian installations. At least one of them should give me more clues what's going on.
On y Debian I have (as given with
dpkg -l 'libjsoncpp*'
command)ii libjsoncpp-dev:amd64 1.7.4-3.1 amd64 library for reading and writing JSON for C++ (devel f>
I have the following on Ubuntu 18
$ dpkg -l 'libjsoncpp*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii libjsoncpp-dev 1.7.4-3 amd64 library for reading and writing J
ii libjsoncpp1:am 1.7.4-3 amd64 library for reading and writing J
I made improvements in commit 99a040b
Perhaps it works better?
I start over and get this output from make (with native Ubuntu 18). I could try with a clean Debian VM or a clean Ubuntu VM to troubleshoot but it would be faster if I could fix this without starting over again.
developer@1604:~/proj/github/helpcovid$ git pull
Already up to date.
developer@1604:~/proj/github/helpcovid$ sudo make
if [ -f helpcovid ] ; then mv -f --backup helpcovid helpcovid~ ; fi
rm -f __timestamp.o __timestamp.c
make helpcovid
make[1]: Entering directory `/home/developer/proj/github/helpcovid'
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/local/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_background.o hcv_background.cc
In file included from hcv_background.cc:29:0:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_background.cc:225:2: warning: #warning hcv_process_SIGTERM_signal unimplemented [-Wcpp]
#warning hcv_process_SIGTERM_signal unimplemented
^~~~~~~
hcv_background.cc:234:2: warning: #warning hcv_process_SIGXCPU_signal unimplemented [-Wcpp]
#warning hcv_process_SIGXCPU_signal unimplemented
^~~~~~~
hcv_background.cc:243:2: warning: #warning hcv_process_SIGHUP_signal unimplemented [-Wcpp]
#warning hcv_process_SIGHUP_signal unimplemented
^~~~~~~
In file included from hcv_background.cc:29:0:
hcv_header.hh:266:18: error: ‘invocation’ in namespace ‘pqxx::prepare’ does not name a type
pqxx::prepare::invocation* m_inv;
^~~~~~~~~~
make[1]: *** [hcv_background.o] Error 1
make[1]: Leaving directory `/home/developer/proj/github/helpcovid'
make: *** [all] Error 2
developer@1604:~/proj/github/helpcovid$
Looks like I could build it in a virtual Debian (the default Debian docker container). For some reason I did not have to build and install the cpp-httplib nor the websocket++. I did have to install the ccache, the libjson and the libsll to create a working(?) build.
root@c1c9f067c2f2:/helpcovid# make
if [ -f helpcovid ] ; then mv -f --backup helpcovid helpcovid~ ; fi
rm -f __timestamp.o __timestamp.c
make helpcovid
make[1]: Entering directory '/helpcovid'
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_web.o hcv_web.cc
In file included from hcv_web.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_web.cc:132:2: warning: #warning TODO: implement hcv_stop_web [-Wcpp]
#warning TODO: implement hcv_stop_web
^~~~~~~
hcv_web.cc:140:2: warning: #warning hcv_initialize_webserver unimplemented [-Wcpp]
#warning hcv_initialize_webserver unimplemented
^~~~~~~
hcv_web.cc:291:2: warning: #warning we may want to implement secure or httponly web cookies, see RFC6265 [-Wcpp]
#warning we may want to implement secure or httponly web cookies, see RFC6265
^~~~~~~
hcv_web.cc:682:2: warning: #warning hcv_webserver_run unimplemented AJAX GET [-Wcpp]
#warning hcv_webserver_run unimplemented AJAX GET
^~~~~~~
hcv_web.cc:695:2: warning: #warning hcv_webserver_run unimplemented AJAX POST [-Wcpp]
#warning hcv_webserver_run unimplemented AJAX POST
^~~~~~~
hcv_web.cc:796:2: warning: #warning hcv_webserver->Get("/images/"...) dont work [-Wcpp]
#warning hcv_webserver->Get("/images/"...) dont work
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_database.o hcv_database.cc
In file included from hcv_database.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_database.cc:53:2: warning: #warning TODO: pqxx::transaction_base::prepared is deprecated and should not be used. [-Wcpp]
#warning TODO: pqxx::transaction_base::prepared is deprecated and should not be used.
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_main.o hcv_main.cc
In file included from hcv_main.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_models.o hcv_models.cc
In file included from hcv_models.cc:29:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_plugins.o hcv_plugins.cc
In file included from hcv_plugins.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_template.o hcv_template.cc
In file included from hcv_template.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_template.cc: In lambda function:
hcv_template.cc:654:9: warning: variable 'nbs' set but not used [-Wunused-but-set-variable]
int nbs = 0;
^~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_background.o hcv_background.cc
In file included from hcv_background.cc:29:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_background.cc:225:2: warning: #warning hcv_process_SIGTERM_signal unimplemented [-Wcpp]
#warning hcv_process_SIGTERM_signal unimplemented
^~~~~~~
hcv_background.cc:234:2: warning: #warning hcv_process_SIGXCPU_signal unimplemented [-Wcpp]
#warning hcv_process_SIGXCPU_signal unimplemented
^~~~~~~
hcv_background.cc:243:2: warning: #warning hcv_process_SIGHUP_signal unimplemented [-Wcpp]
#warning hcv_process_SIGHUP_signal unimplemented
^~~~~~~
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -c -o hcv_views.o hcv_views.cc
In file included from hcv_views.cc:29:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
hcv_views.cc:78:2: warning: #warning cookie setting needs to be implemented. [-Wcpp]
#warning cookie setting needs to be implemented.
^~~~~~~
hcv_views.cc:133:2: warning: #warning hcv_view_register_form_token incomplete [-Wcpp]
#warning hcv_view_register_form_token incomplete
^~~~~~~
hcv_views.cc:153:2: warning: #warning hcv_register_view_get incomplete [-Wcpp]
#warning hcv_register_view_get incomplete
^~~~~~~
hcv_views.cc:191:2: warning: #warning hcv_register_view_post incomplete [-Wcpp]
#warning hcv_register_view_post incomplete
^~~~~~~
hcv_views.cc:210:2: warning: #warning hcv_register_view_post unimplemented [-Wcpp]
#warning hcv_register_view_post unimplemented
^~~~~~~
./generate-timestamp.sh > __timestamp.c-tmp
'/tmp/helpcovid-7370.tar.gz' -> '/root/tmp/helpcovid.tar.gz'
cp: cannot create regular file '/root/tmp/helpcovid.tar.gz': No such file or directory
printf "const char hcv_cxx_compiler[]=\"%s\";\n" "$(ccache g++ --version | head -1)" >> __timestamp.c-tmp
mv --backup __timestamp.c-tmp __timestamp.c
ccache gcc -c -o __timestamp.o __timestamp.c
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -rdynamic -pthread -L /usr/local/lib -L /usr/lib hcv_web.o hcv_database.o hcv_main.o hcv_models.o hcv_plugins.o hcv_template.o hcv_background.o hcv_views.o __timestamp.o \
-lgiomm-2.4 -lgio-2.0 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lsigc-2.0 -ljsoncpp -lpqxx -lssl -lcrypto -rdynamic -ldl -o helpcovid-tmp
mv --backup helpcovid-tmp helpcovid
mv --backup __timestamp.c __timestamp.c~
rm -f __timestamp.o
make[1]: Leaving directory '/helpcovid'
make plugins
make[1]: Entering directory '/helpcovid'
ccache g++ -std=gnu++17 -O0 -g3 -Wall -Wextra -pthread -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/jsoncpp -I/usr/include/postgresql -DHELPCOVID_GITID=\"0c1256fcd79213e12c15dfdef6bad1f5ab53b9d2\" -rdynamic -pthread -L /usr/local/lib -L /usr/lib -fPIC -shared hcvplugin_echo.cc -o hcvplugin_echo.so
In file included from hcvplugin_echo.cc:28:
hcv_header.hh:477:2: warning: #warning TODO: add class Hcv_websocket_template_data [-Wcpp]
#warning TODO: add class Hcv_websocket_template_data
^~~~~~~
make[1]: Leaving directory '/helpcovid'
root@c1c9f067c2f2:/helpcovid# ls -al
total 80472
drwxr-xr-x 5 root root 4096 Apr 4 13:24 .
drwxr-xr-x 38 root root 4096 Apr 4 13:22 ..
-rwxr-xr-x 1 root root 195 Apr 4 13:21 .gdbinit
drwxr-xr-x 8 root root 4096 Apr 4 13:24 .git
-rw-r--r-- 1 root root 57 Apr 4 13:21 .gitignore
-rw-r--r-- 1 root root 392 Apr 4 13:21 DATA.md
-rw-r--r-- 1 root root 2835 Apr 4 13:21 DATABASE.md
-rw-r--r-- 1 root root 2555 Apr 4 13:21 HTTP_PROTOCOL.md
-rw-r--r-- 1 root root 35149 Apr 4 13:21 LICENSE
-rw-r--r-- 1 root root 4104 Apr 4 13:21 Makefile
-rw-r--r-- 1 root root 3684 Apr 4 13:21 PLUGINS.md
-rw-r--r-- 1 root root 20011 Apr 4 13:21 README.md
-rw-r--r-- 1 root root 3003 Apr 4 13:24 __timestamp.c~
-rwxr-xr-x 1 root root 2942 Apr 4 13:21 backup-database.py
-rw-r--r-- 1 root root 942 Apr 4 13:21 captchas-summary.txt
drwxr-xr-x 2 root root 4096 Apr 4 13:21 data
-rwxr-xr-x 1 root root 7431 Apr 4 13:21 generate-config.py
-rwxr-xr-x 1 root root 383 Apr 4 13:21 generate-gitid.sh
-rwxr-xr-x 1 root root 1430 Apr 4 13:21 generate-timestamp.sh
-rw-r--r-- 1 root root 11651 Apr 4 13:21 hcv_background.cc
-rw-r--r-- 1 root root 7780440 Apr 4 13:24 hcv_background.o
-rw-r--r-- 1 root root 13790 Apr 4 13:21 hcv_database.cc
-rw-r--r-- 1 root root 8317376 Apr 4 13:24 hcv_database.o
-rw-r--r-- 1 root root 25409 Apr 4 13:21 hcv_header.hh
-rw-r--r-- 1 root root 33239 Apr 4 13:21 hcv_main.cc
-rw-r--r-- 1 root root 7801048 Apr 4 13:24 hcv_main.o
-rw-r--r-- 1 root root 3403 Apr 4 13:21 hcv_models.cc
-rw-r--r-- 1 root root 7611136 Apr 4 13:24 hcv_models.o
-rw-r--r-- 1 root root 9841 Apr 4 13:21 hcv_plugins.cc
-rw-r--r-- 1 root root 7665952 Apr 4 13:24 hcv_plugins.o
-rw-r--r-- 1 root root 31430 Apr 4 13:21 hcv_template.cc
-rw-r--r-- 1 root root 8081280 Apr 4 13:24 hcv_template.o
-rw-r--r-- 1 root root 10554 Apr 4 13:21 hcv_views.cc
-rw-r--r-- 1 root root 7752064 Apr 4 13:24 hcv_views.o
-rw-r--r-- 1 root root 29801 Apr 4 13:21 hcv_web.cc
-rw-r--r-- 1 root root 8463600 Apr 4 13:24 hcv_web.o
-rw-r--r-- 1 root root 1932 Apr 4 13:21 hcvplugin_echo.cc
-rwxr-xr-x 1 root root 4760296 Apr 4 13:24 hcvplugin_echo.so
-rwxr-xr-x 1 root root 13667032 Apr 4 13:24 helpcovid
-rw-r--r-- 1 root root 147418 Apr 4 13:21 httplib.h
-rwxr-xr-x 1 root root 263 Apr 4 13:21 indent-cxx-files.sh
drwxr-xr-x 6 root root 4096 Apr 4 13:21 webroot
root@c1c9f067c2f2:/helpcovid# file helpcovid
helpcovid: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=0c1445b17dc57c08624b8971404c04605619caba, with debug_info, not stripped
root@c1c9f067c2f2:/helpcovid#
Now it sort of works from inside a Debian container. I had to change one line to make it listen... The build problem is on my part (something with my ancient native Ubuntu installation). So I can run it and edit it, it seems.
Thanks. Basile
I get compilation error trying to run make. It looks like my C++ configuration has some conflicting version. If it helps then I can reproduce the error and presumably also produce a working build in a Debian VM or container. The first error I get is the following (but if I comment out and trick myself around it there comes next build problem)
hcv_web.cc:313:33: error: conversion from ‘long int’ to ‘Json::Value’ is ambiguous