pasky / pachi

A fairly strong Go/Baduk/Weiqi playing program
http://pachi.or.cz/
GNU General Public License v2.0
514 stars 117 forks source link

makefiles for BSD make utilities #158

Open requiredregistration opened 1 year ago

requiredregistration commented 1 year ago

i checked this on openbsd and this is the result after entering gmake:

# gmake
/bin/sh: ./genbuild: No such file or directory
gmake: *** [Makefile:320: build.h.git] Error 1
lemonsqueeze commented 1 year ago

Hi, Thanks for your input, this definitely shouldn't be happening.

Could you give more details about what you did ? I'm assuming you're working from a git repository, as in :

$ git clone https://github.com/pasky/pachi
$ cd pachi
$ gmake

is that right ?

Output of this would help too:

$ ls -l genbuild
requiredregistration commented 1 year ago

yes, that is right, with one difference. i entered git clone --depth 1 https://github.com/pasky/pachi.git.

the output of ls -l genbuild:

-rwxr-xr-x  1 root  wheel   1099 Jul 10 01:03 genbuild
lemonsqueeze commented 1 year ago

Do you have bash installed in /bin/bash ?

requiredregistration commented 1 year ago

whether i enter gmake in ksh or in bash, the output is the same.

i also checked with and without a symbolic link (/bin/bash -> /usr/local/bin/bash). no difference.

what changed the output was the installation of bash. it uses bash for some things?

# gmake
make: unknown option -- -
gmake: *** [Makefile:314: build.h] Error 2
lemonsqueeze commented 1 year ago

what changed the output was the installation of bash. it uses bash for some things?

Yes, build needs a number of GNU tools. On OpenBSD the problem is that invoking make runs bsd make instead of gnu make, which won't work here. So you'll either have to hack your environment or Pachi's build to work around that. You could try replacing every instance of @make by @$(MAKE) in Makefile, and build with :

$ gmake MAKE=gmake

If you're serious about trying to get it to build on OpenBSD first you should have all dependencies listed in INSTALL.md installed. This assumes you have a minimal setup for compiling software (build-essential package on Ubuntu). Here at the very least this means gmake, bash, gcc, g++, all dependencies + library headers, probably perl as well. It's pointless to even try building until you have all dependencies installed (boost, caffe etc ...).