CoinFuMasterShifu / janusminer

MIT License
11 stars 9 forks source link

unable to compile on ubuntu 22.04 / not accept gnu++20 parameter #1

Closed TheCondorX closed 6 months ago

TheCondorX commented 8 months ago

The Meson build system Version: 0.53.2 Source dir: /home/user/warth/Warthog/build/src/miner/janusminer Build dir: /home/user/warth/Warthog/build/src/miner/janusminer/build Build type: native build Project name: Warthog Miner (Janushash) Project version: 0.0.1 C compiler for the host machine: cc (gcc 11.4.0 "cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0") C linker for the host machine: cc ld.bfd 2.38

meson.build:1:0: ERROR: Value "gnu++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".

JulsKawa commented 8 months ago

you should be able to compile it with docker now

CoinFuMasterShifu commented 8 months ago

What is the output of gcc -v --help 2>/dev/null | egrep "gnu"? For me it's

  -fext-numeric-literals      Interpret imaginary, fixed-point, or other gnu number suffix as the corresponding number literal rather than a user-defined number literal.
  -fgnu-keywords              Recognize GNU-defined keywords.
  -fgnu-runtime               Generate code for GNU runtime environment.
  -fgnu89-inline              Use traditional GNU semantics for inline functions.
  -std=gnu++03                Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions.  Same as -std=gnu++98.
  -std=gnu++0x                Deprecated in favor of -std=gnu++11.  Same as -std=gnu++11.
  -std=gnu++11                Conform to the ISO 2011 C++ standard with GNU extensions.
  -std=gnu++14                Conform to the ISO 2014 C++ standard with GNU extensions.
  -std=gnu++17                Conform to the ISO 2017 C++ standard with GNU extensions.
  -std=gnu++1y                Deprecated in favor of -std=gnu++14.  Same as -std=gnu++14.
  -std=gnu++1z                Deprecated in favor of -std=gnu++17.  Same as -std=gnu++17.
  -std=gnu++20                Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).
  -std=gnu++23                Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).
  -std=gnu++2a                Conform to the ISO 2020 C++ standard with GNU extensions (experimental and incomplete support).  Same as -std=gnu++20.
  -std=gnu++2b                Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support).  Same as -std=gnu++23.
  -std=gnu++98                Conform to the ISO 1998 C++ standard revised by the 2003 technical corrigendum with GNU extensions.
  -std=gnu11                  Conform to the ISO 2011 C standard with GNU extensions.
  -std=gnu17                  Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.
  -std=gnu18                  Conform to the ISO 2017 C standard (published in 2018) with GNU extensions.  Same as -std=gnu17.
  -std=gnu1x                  Deprecated in favor of -std=gnu11.  Same as -std=gnu11.
  -std=gnu2x                  Conform to the ISO 202X C standard draft with GNU extensions (experimental and incomplete support).
  -std=gnu89                  Conform to the ISO 1990 C standard with GNU extensions.  Same as -std=gnu90.
  -std=gnu90                  Conform to the ISO 1990 C standard with GNU extensions.
  -std=gnu99                  Conform to the ISO 1999 C standard with GNU extensions.
  -std=gnu9x                  Deprecated in favor of -std=gnu99.  Same as -std=gnu99.
    gnu gnu2
  -fgnu-tm                    Enable support for GNU transactional memory.
  -fgnu-unique                Use STB_GNU_UNIQUE if supported by the assembler.
  -ggnu-pubnames              Generate DWARF pubnames and pubtypes sections with GNU extensions.
  --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}]
Overview: https://gcc.gnu.org/onlinedocs/gccint/Collect2.html
  --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]
  --hash-style=STYLE          Set hash style to sysv/gnu/both.  Default: both

And what is gcc --version? For me it's

gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I know that meson prints gcc11.4.0 in your output but it is very strange that your gcc does not know c++20. I suspect you have two gcc versions installed and somehow the wrong one is chosen.