LeelaChessZero / lc0

The rewritten engine, originally for tensorflow. Now all other backends have been ported here.
GNU General Public License v3.0
2.47k stars 534 forks source link

meson configure: error: unrecognized arguments: --buildtype release --prefix /usr/local #718

Closed LGTrader closed 4 years ago

LGTrader commented 5 years ago

New non-programmer, end-user type trying to build lc0-0.19 gcc-7.3.0 on Ubuntu (version numbers below) which is failing with the message:

mark@science:~/CODE/lc0/lc0-release-0.19$ ./build.sh 
usage: meson configure [-h] [-D SETS] [--clearcache]
                       [directory [directory ...]]
meson configure: error: unrecognized arguments: --buildtype release --prefix /usr/local
mark@science:~/CODE/lc0/lc0-release-0.19$

Same result using the explicit build command:

mark@science:~/CODE/lc0/lc0-release-0.19$ CC=clang-6.0 CXX=clang++-6.0 INSTALL_PREFIX=~/.local ./build.sh
usage: meson configure [-h] [-D SETS] [--clearcache]
                       [directory [directory ...]]
meson configure: error: unrecognized arguments: --buildtype release --prefix /home/mark/.local
mark@science:~/CODE/lc0/lc0-release-0.19$

Ideas on how to proceed much appreciated. If you need more info please let me know.

Thanks, Mark

mark@science:~$ lsb_release -a
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)
meson version 0.45.1
ninja version 1.8.2

mark@science:~$ sudo apt-get install clang-6.0 ninja-build pkg-config protobuf-compiler libprotobuf-dev meson[sudo] password for mark: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libprotobuf-dev is already the newest version (3.0.0-9.1ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu2).
clang-6.0 is already the newest version (1:6.0-1ubuntu2).
meson is already the newest version (0.45.1-2).
ninja-build is already the newest version (1.8.2-1).
protobuf-compiler is already the newest version (3.0.0-9.1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

mark@science:~/CODE/lc0/lc0-release-0.19$ apt list -a clang
Listing... Done
clang/bionic-updates 1:6.0-41~exp5~ubuntu1 amd64
clang/bionic 1:6.0-41~exp4 amd64
borg323 commented 5 years ago

You should delete the build directory and try again. meson configure is used when a previous build is detected in order to re-configure, and something goes wrong here. What meson version are you using?

LGTrader commented 5 years ago

meson 0.45.1

Removing the build directory seems to be the solution. The build completed and build/release has an lc0 executable.

Thanks for the quick reply. I'll start investigating how to run it either in Arena or using the lc0-client app.

Cheers

Naphthalin commented 4 years ago

As the issue was resolved by deleting build, this can probably be closed now.