warthog-network / Warthog

Experimental cryptocurrency implementation
MIT License
21 stars 13 forks source link

error when compiling on ubuntu 20.04 LTS #2

Closed makertronic closed 1 year ago

makertronic commented 1 year ago

Hi,

I have this error error when compiling

nicola@WOORKER005:~/war/Warthog/builddir$ meson compile
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja
[25/212] Compiling C object thirdparty/uSockets/libusockets.so.p/src_bsd.c.o
FAILED: thirdparty/uSockets/libusockets.so.p/src_bsd.c.o
cc -I./thirdparty/./uSockets/libusockets.so.p -I./thirdparty/./uSockets -I../thirdparty/uSockets -I../thirdparty/uSockets/src -I../subprojects/libuv-v1.44.2/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -O0 -g -fPIC -pthread -DLIBUS_USE_LIBUV -DLIBUS_NO_SSL -w -MD -MQ thirdparty/uSockets/libusockets.so.p/src_bsd.c.o -MF ./thirdparty/./uSockets/libusockets.so.p/src_bsd.c.o.d -o thirdparty/uSockets/libusockets.so.p/src_bsd.c.o -c ../thirdparty/uSockets/src/bsd.c
../thirdparty/uSockets/src/bsd.c: In function ‘bsd_create_connect_socket’:
../thirdparty/uSockets/src/bsd.c:274:104: error: parameter name omitted
  274 | LIBUS_SOCKET_DESCRIPTOR bsd_create_connect_socket(const char *host, int port, const char *source_host, int /*options*/) {
      |                                                                                                        ^~~
[45/212] Compiling C object subprojects/sqlite-amalgamation-3390300/libsqlite3.so.0.8.6.p/sqlite3.c.o
ninja: build stopped: subcommand failed.
ByPumbaa commented 1 year ago

I tried to reproduce this on Ubuntu 20.04 using Vagrant but got a different error.

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
$ meson build .
The Meson build system
Version: 0.53.2
Source dir: /home/vagrant/warthog
Build dir: /home/vagrant/warthog/build
Build type: native build
Project name: Warthog
Project version: 0.1
C compiler for the host machine: cc (gcc 9.4.0 "cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0")
C linker for the host machine: cc ld.bfd 2.34

meson.build:1:0: ERROR: Value "c++20" for combo option is not one of the choices. Possible choices are: "none", "c++98", "c++03", "c++11", "c++14", "c++17", "c++1z", "c++2a", "gnu++03", "gnu++11", "gnu++14", "gnu++17", "gnu++1z", "gnu++2a".

This clearly shows that the compiler gcc9 is too old. Ubuntu 20.04 LTS is not supported, please upgrade to a distribution which ships with gcc11 or newer.