Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pachi 12.70 build failure #153

Open
chenrui333 opened this issue Feb 11, 2023 · 9 comments
Open

pachi 12.70 build failure #153

chenrui333 opened this issue Feb 11, 2023 · 9 comments

Comments

@chenrui333
Copy link

👋 trying to build the latest release, but run into some build issue. The error log is as below:

error build log
  josekifix/sgfdump: SGF perl module is missing, try:
  	$ cpan 
  	cpan[1]> install Games::SGF::Go 

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/4150781860/jobs/7180684514
relates to Homebrew/homebrew-core#122989

@lemonsqueeze
Copy link
Collaborator

Hi,
It's trying to process the josekifix SGF files but a perl module is missing.

You can either:

  • Install the missing perl module (for example using cpan like the error suggests),
  • Skip this part of the build if you don't care about joseki fixes (or will get josekifix.gtp from elsewhere - it ships with the binary release) : Edit josekifix/Makefile and replace :
    all: lib.a data
    by
    all: lib.a

@lemonsqueeze
Copy link
Collaborator

If it makes life easier for homebrew i could add this file to the repository, this way it won't have to be regenerated on git-clone builds. Let me know what works best for you.

@chenrui333
Copy link
Author

  • Install the missing perl module (for example using cpan like the error suggests),

I was trying this route by installing the perl module, but somehow it seems did not get picked up.

I can also certainly ignore the joseki fixes, but not sure what would be the impact there.

@lemonsqueeze
Copy link
Collaborator

lemonsqueeze commented Feb 11, 2023

Don't worry about it, I'll re-release Pachi 12.70 with this file added. That should make your issue go away.
This is bound to affect other automated build systems as well ...

@lemonsqueeze
Copy link
Collaborator

lemonsqueeze commented Feb 11, 2023

Try now, as long as https://github.com/pasky/pachi/archive/pachi-12.60.tar.gz gets downloaded again it should work.

Btw, I took a look at Homebrew pachi.rb :
Parts of it look outdated. The "patterns" section downloads a huge pattern file which was used by old versions of Pachi, but isn't used by recent versions anymore (replaced by patterns_mm.spat, patterns_mm.prob which are really small).

Also looks like it's doing a nodcnn build ( inreplace "Makefile", "DCNN=1", "DCNN=0").
This is really unfortunate, Pachi without dcnn loses a lot of value.
Looks like Homebrew already builds caffe, so getting a dcnn build should be easy (building caffe is usually the hard part).
I'm happy to help resolve issues with this if someone wants to try a more modern build.

There's also a comment about data files near the end :

At present, pachi cannot be pointed to external files, so make sure
to set the working directory to #{opt_pkgshare} if you want pachi
to take advantage of these additional files.

This has been fixed for a while, Pachi will look for its datafiles in DATADIR directory which can be set at build time (Makefile). On linux it defaults to /usr/share/pachi-go/ for example. Homebrew should take advantage of this.

@chenrui333
Copy link
Author

Try now, as long as https://github.com/pasky/pachi/archive/pachi-12.60.tar.gz gets downloaded again it should work.

Btw, I took a look at Homebrew pachi.rb : Parts of it look outdated. The "patterns" section downloads a huge pattern file which was used by old versions of Pachi, but isn't used by recent versions anymore (replaced by patterns_mm.spat, patterns_mm.prob which are really small).

I see, I can update the linked PR to remove that pattern file.

Also looks like it's doing a nodcnn build ( inreplace "Makefile", "DCNN=1", "DCNN=0"). This is really unfortunate, Pachi without dcnn loses a lot of value. Looks like Homebrew already builds caffe, so getting a dcnn build should be easy (building caffe is usually the hard part). I'm happy to help resolve issues with this if someone wants to try a more modern build.

We actually deprecated caffe recently due to some build issue, but happy to try out building dcnn in the homebrew side.

There's also a comment about data files near the end :

At present, pachi cannot be pointed to external files, so make sure
to set the working directory to #{opt_pkgshare} if you want pachi
to take advantage of these additional files.

This has been fixed for a while, Pachi will look for its datafiles in DATADIR directory which can be set at build time (Makefile). On linux it defaults to /usr/share/pachi-go/ for example. Homebrew should take advantage of this.

make sense, I will also remove it.

That is pretty awesome comment, do you mind filing a PR to improve the formula, it would be much appreciated

@lemonsqueeze
Copy link
Collaborator

That is pretty awesome comment, do you mind filing a PR to improve the formula, it would be much appreciated

Sure, where should i file it ? I'm not super familiar with Homebrew issue workflow.

I tried homebrew-core, but it only lets me open a "New issue for Reproducible Bug", and the template for that doesn't seem like a terribly good fit...

@chenrui333
Copy link
Author

chenrui333 commented Feb 12, 2023

you don't have to file a bug, you can just directly file a PR. There is a PR template on this too. Let me wrap up this 12.70 first.

@lemonsqueeze
Copy link
Collaborator

Ok, just filed PR 123060.
Looks like it doesn't want to build though because caffe is deprecated.
Maybe there's a way to get around it, but we can continue talking about it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants