cisocrgroup / pocoweb

postcorrection web
Other
11 stars 1 forks source link

Issues on ubuntu 18.04 #33

Closed stekky81 closed 4 years ago

stekky81 commented 4 years ago

Hello, on ubuntu 18.04 there are some compilation error

[rest/src/core/Archiver.o]  
In file included from rest/src/core/Archiver.cpp:7:  
rest/src/database/DbStructs.hpp:217:53: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare]  
  return lhs.bookid == rhs.bookid and lhs.projectid == lhs.projectid and  
                                                    ^
1 error generated.  
make: *** [make/config.make:60: rest/src/core/Archiver.o] Error 1  
ERROR: Service 'pocoweb' failed to build: The command '/bin/sh -c cd /build     && make CXX=clang++ -j $(nproc) install     && cd /     && rm -rf /build    && apk del ${BUILD_DEPS}' returned a non-zero code: 2  
make/docker.make:27: recipe for target 'docker-compose-build' failed  
make: *** [docker-compose-build] Error 1

and

[rest/src/api/SearchRoute.o]  
rest/src/api/SearchRoute.cpp:233:34: error: ISO C++ requires field designators to be specified in declaration order; field 'max' will be initialized after field 'skip' [-Werror,-Wreorder-init-list]  
                                 .skip = pskip,  
                                 ^~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:232:41: note: previous initialization for field 'max' is here  
                                 .max = pmax,  
                                        ^~~~  
rest/src/api/SearchRoute.cpp:235:34: error: ISO C++ requires field designators to be specified in declaration order; field 'ic' will be initialized after field 'qs' [-Werror,-Wreorder-init-list]  
                                 .qs = qs.value(),  
                                 ^~~~~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:234:40: note: previous initialization for field 'ic' is here  
                                 .ic = pi,  
                                       ^~  
rest/src/api/SearchRoute.cpp:240:34: error: ISO C++ requires field designators to be specified in declaration order; field 'max' will be initialized after field 'skip' [-Werror,-Wreorder-init-list]  
                                 .skip = pskip,  
                                 ^~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:239:41: note: previous initialization for field 'max' is here  
                                 .max = pmax,  
                                        ^~~~  
rest/src/api/SearchRoute.cpp:241:34: error: ISO C++ requires field designators to be specified in declaration order; field 'skip' will be initialized after field 'qs' [-Werror,-Wreorder-init-list]  
                                 .qs = qs.value(),  
                                 ^~~~~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:240:42: note: previous initialization for field 'skip' is here  
                                 .skip = pskip,  
                                         ^~~~~
rest/src/api/SearchRoute.cpp:245:43: error: ISO C++ requires field designators to be specified in declaration order; field 'max' will be initialized after field 'skip' [-Werror,-Wreorder-init-list]  
        conn, pq{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                          ^~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:245:37: note: previous initialization for field 'max' is here  
        conn, pq{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                    ^~~~
rest/src/api/SearchRoute.cpp:245:58: error: ISO C++ requires field designators to be specified in declaration order; field 'skip' will be initialized after field 'qs' [-Werror,-Wreorder-init-list]  
        conn, pq{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                                         ^~~~~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:245:51: note: previous initialization for field 'skip' is here  
        conn, pq{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                                  ^~~~~
rest/src/api/SearchRoute.cpp:248:43: error: ISO C++ requires field designators to be specified in declaration order; field 'max' will be initialized after field 'skip' [-Werror,-Wreorder-init-list]  
        conn, ac{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                          ^~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:248:37: note: previous initialization for field 'max' is here  
        conn, ac{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                    ^~~~  
rest/src/api/SearchRoute.cpp:248:58: error: ISO C++ requires field designators to be specified in declaration order; field 'skip' will be initialized after field 'qs' [-Werror,-Wreorder-init-list]  
        conn, ac{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                                         ^~~~~~~~~~~~~~~~  
rest/src/api/SearchRoute.cpp:248:51: note: previous initialization for field 'skip' is here  
        conn, ac{.bid = bid, .max = pmax, .skip = pskip, .qs = qs.value()});  
                                                  ^~~~~  
8 errors generated.  
make: *** [make/config.make:60: rest/src/api/SearchRoute.o] Error 1  
ERROR: Service 'pocoweb' failed to build: The command '/bin/sh -c cd /build     && make CXX=clang++ -j $(nproc) install     && cd /     && rm -rf /build    && apk del ${BUILD_DEPS}' returned a non-zero code: 2  
make/docker.make:27: recipe for target 'docker-compose-build' failed  
make: *** [docker-compose-build] Error 1

Once fixed some rest endpoints return 502 bad gateway, e.g.: /rest/api-version and /rest/books; other works correctly (e.g. login). Which is the suggested ubuntu version, 16.04?

finkf commented 4 years ago

Thanks for reporting this. Ill have a look into the issues

finkf commented 4 years ago

With #34 I just fixed these issues. You can try again.

stekky81 commented 4 years ago

Thanks, now it works correctly.