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

[Bug]: archaic hostbuild-step of gnushogi 1.4.2 throws errors #21966

Open
robertkirkman opened this issue Oct 24, 2024 · 1 comment · May be fixed by #21967
Open

[Bug]: archaic hostbuild-step of gnushogi 1.4.2 throws errors #21966

robertkirkman opened this issue Oct 24, 2024 · 1 comment · May be fixed by #21967
Labels
bug report Something is not working properly untriaged

Comments

@robertkirkman
Copy link
Contributor

robertkirkman commented Oct 24, 2024

Problem description

  • gnushogi 1.4.2, which released on February 16, 2014, produces these errors during its build in termux-packages:
./pat2inc
make[1]: ./pat2inc: Text file busy
make[1]: *** [Makefile:224: pattern.inc] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/builder/.termux-build/gnushogi/host-build/gnushogi'
make: [Makefile:46: gnushogi_compile] Error 2 (ignored)
gcc -g -O2 -DHASHFILE=\"/usr/local/lib/gnushogi/gnushogi.hsh\" -fsigned-char -funroll-loops -Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic -I. -I.. -I/home/builder/.termux-build/gnushogi/src -o gnushogi globals.o init-common.o pattern-common.o attacks.o book.o commondsp.o cursesdsp.o dspwrappers.o eval.o genmove.o init.o pattern.o rawdsp.o search.o tcontrl.o util.o main.o  -lcurses -lm
/usr/bin/ld: cursesdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/cursesdsp.c:75: multiple definition of `DRAW'; globals.o:/home/builder/.termux-build/gnushogi/src/gnushogi/globals.c:200: first defined here
/usr/bin/ld: rawdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/rawdsp.c:50: multiple definition of `mycnt2'; cursesdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/cursesdsp.c:65: first defined here
/usr/bin/ld: rawdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/rawdsp.c:50: multiple definition of `mycnt1'; cursesdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/cursesdsp.c:65: first defined here
/usr/bin/ld: rawdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/rawdsp.c:51: multiple definition of `DRAW'; globals.o:/home/builder/.termux-build/gnushogi/src/gnushogi/globals.c:200: first defined here
/usr/bin/ld: rawdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/rawdsp.c:48: multiple definition of `MSCORE'; cursesdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/cursesdsp.c:74: first defined here
/usr/bin/ld: rawdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/rawdsp.c:47: multiple definition of `MV'; cursesdsp.o:/home/builder/.termux-build/gnushogi/src/gnushogi/cursesdsp.c:73: first defined here
collect2: error: ld returned 1 exit status
make[1]: Leaving directory '/home/builder/.termux-build/gnushogi/host-build/gnushogi'
make[1]: *** [Makefile:140: gnushogi] Error 1
make: [Makefile:55: bbk] Error 2 (ignored)
/bin/sh: 1: ./gnushogi: Exec format error
make[1]: *** [Makefile:234: gnushogi.bbk] Error 126
make[1]: Leaving directory '/home/builder/.termux-build/gnushogi/build/gnushogi'
make: [Makefile:55: bbk] Error 2 (ignored)
make[1]: warning:  Clock skew detected.  Your build may be incomplete.
make[1]: Leaving directory '/home/builder/.termux-build/gnushogi/build/gnushogi'
cd ./gnushogi && make install
make[1]: Warning: File 'pat2inc' has modification time 3599 s in the future
make[1]: Entering directory '/home/builder/.termux-build/gnushogi/build/gnushogi'
./pat2inc
/usr/bin/install: cannot stat 'gnushogi.bbk': No such file or directory
make[1]: *** [Makefile:252: install] Error 1
make[1]: Leaving directory '/home/builder/.termux-build/gnushogi/build/gnushogi'
make: [Makefile:72: gnushogi_install] Error 2 (ignored)

Sometimes, I have also seen this error:

cp: cannot stat '/home/builder/.termux-build/gnushogi/host-build/gnushogi/pat2inc': No such file or directory
  • However, I couldn't help but notice that, after February 2014, upstream development continued on the master branch for almost a year before the last commit in the upstream gnushogi repository on November 19, 2014 - including cross-compilation-focused changes.
  • I was unable to successfully cherry-pick the cross-compilation-focused commits without pulling all other commits in the whole master branch as dependencies, so I tested a snapshot tarball of gnushogi "1.5pre" dated to November 2014. For me, that causes all the errors listed above to disappear.
  • The upstream developer is active on GitHub in 2024. @ydirson, it has been more than 10 years since the last release of gnushogi. Will you make another release that includes improvements to cross-compilation support?

What steps will reproduce the bug?

  1. scripts/run-docker.sh ./build-package.sh gnushogi
  2. look for errors (return code may be 0, but under certain circumstances, the errors will interrupt the build. The errors are visible in the log under all circumstances.)

What is the expected behavior?

No visible errors when running scripts/run-docker.sh ./build-package.sh gnushogi

System information

N/A
@robertkirkman robertkirkman added bug report Something is not working properly untriaged labels Oct 24, 2024
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 24, 2024
related to termux#21966
validation that gnushogi upstream master branch fixes errors.
I understand that termux-packages does not accept packages of unreleased
versions,
so waiting for ydirson to officially release an update to gnushogi will
be required.
@robertkirkman
Copy link
Contributor Author

robertkirkman commented Oct 24, 2024

A couple of notes:

robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 25, 2024
Fixes termux#21966 by adding improved support for cross-compiling, preventing
errors from happening during the hostbuild step.
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 26, 2024
Fixes termux#21966 by adding improved support for cross-compiling, preventing
errors from happening during the hostbuild step.
Inspired by the version of gnushogi packaged by Fedora: https://src.fedoraproject.org/rpms/gnushogi/blob/rawhide/f/gnushogi.spec
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 27, 2024
Fixes termux#21966 by adding improved support for cross-compiling, preventing
errors from happening during the hostbuild step.
Inspired by the version of gnushogi packaged by Fedora: https://src.fedoraproject.org/rpms/gnushogi/blob/rawhide/f/gnushogi.spec
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 27, 2024
Fixes termux#21966 by adding improved support for cross-compiling, preventing
errors from happening during the hostbuild step.
Inspired by the version of gnushogi packaged by Fedora: https://src.fedoraproject.org/rpms/gnushogi/blob/rawhide/f/gnushogi.spec
robertkirkman added a commit to robertkirkman/termux-packages that referenced this issue Oct 27, 2024
Fixes termux#21966 by adding improved support for cross-compiling, preventing errors from happening during the hostbuild step.
Inspired by the version of gnushogi packaged by Fedora: https://src.fedoraproject.org/rpms/gnushogi/blob/rawhide/f/gnushogi.spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant