Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 651408 - games-board/gmchess-0.29.6-r2 : cchess.cpp:693:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
Summary: games-board/gmchess-0.29.6-r2 : cchess.cpp:693:18: error: ISO C++ forbids com...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 700696
Blocks:
  Show dependency tree
 
Reported: 2018-03-25 08:44 UTC by Toralf Förster
Modified: 2021-02-13 13:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.08 KB, text/plain)
2018-03-25 08:44 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,193.94 KB, text/plain)
2018-03-25 08:44 UTC, Toralf Förster
Details
environment (environment,109.64 KB, text/plain)
2018-03-25 08:44 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,19.19 KB, application/x-bzip)
2018-03-25 08:45 UTC, Toralf Förster
Details
games-board:gmchess-0.29.6-r2:20180325-052620.log (games-board:gmchess-0.29.6-r2:20180325-052620.log,21.59 KB, text/plain)
2018-03-25 08:45 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,12.09 KB, application/x-bzip)
2018-03-25 08:45 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,32.47 KB, application/x-bzip)
2018-03-25 08:45 UTC, Toralf Förster
Details
gmchess-0.29.6-pointer-to-int.patch (gmchess-0.29.6-pointer-to-int.patch,287 bytes, patch)
2018-11-08 11:56 UTC, Samuel Bauer
Details | Diff
gmchess-0.29.6-pointer-to-int.patch (gmchess-0.29.6-pointer-to-int.patch,286 bytes, patch)
2019-11-19 11:24 UTC, Samuel Bauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2018-03-25 08:44:50 UTC
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../..     -O2 -pipe -march=native -std=c++11 -c -o convert_pgn-cchess.o `test -f 'cchess.cpp' || echo './'`cchess.cpp
cchess.cpp: In function ‘void FenMirror(char*, const char*)’:
cchess.cpp:693:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   while(lpSrc != '\0' && lpDst < lpDstLimit) {

                  ^~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0-developer_20180319-191208

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-7.3.0 *

Available Python interpreters, in order of preference:
  [1]   python3.5
  [2]   python3.6 (fallback)
  [3]   python2.7 (fallback)
  [4]   pypy3 (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.7.0 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv games-board/gmchess
[ebuild  N    ] games-board/gmchess-0.29.6-r2
Comment 1 Toralf Förster gentoo-dev 2018-03-25 08:44:53 UTC
Created attachment 525334 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2018-03-25 08:44:56 UTC
Created attachment 525336 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2018-03-25 08:44:59 UTC
Created attachment 525338 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2018-03-25 08:45:02 UTC
Created attachment 525340 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2018-03-25 08:45:05 UTC
Created attachment 525342 [details]
games-board:gmchess-0.29.6-r2:20180325-052620.log
Comment 6 Toralf Förster gentoo-dev 2018-03-25 08:45:08 UTC
Created attachment 525344 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2018-03-25 08:45:11 UTC
Created attachment 525346 [details]
temp.tbz2
Comment 8 Sleepy Mario 2018-06-23 13:29:21 UTC
The same exact error on my machine, on amd64 with gcc-7.3.0-r3
Comment 9 Samuel Bauer 2018-11-08 11:56:13 UTC
Created attachment 554510 [details, diff]
gmchess-0.29.6-pointer-to-int.patch

Thanks to gcc-7, some "typos" are detected.  This copy loop end condition was a bit odd.
This patch fixes the issue.
Comment 10 Samuel Bauer 2019-11-19 11:24:17 UTC
Created attachment 596764 [details, diff]
gmchess-0.29.6-pointer-to-int.patch

Previous patch was wrong
Comment 11 Larry the Git Cow gentoo-dev 2021-02-13 13:24:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7f141b7174e0fb1730d994e12f804da50c68103

commit e7f141b7174e0fb1730d994e12f804da50c68103
Author:     Sergey Torokhov <torokhov-s-a@yandex.ru>
AuthorDate: 2021-02-09 19:40:51 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2021-02-13 13:23:47 +0000

    games-board/gmchess: fix build error and segfaults
    
    The applied patch fixes build error issue and
    some additional issues that cause segmentation fault on run
    (for more detailes see the second issue description
    in the list below).
    
    Thanks to Samuel Bauer for proposed patch.
    
    Closes: https://bugs.gentoo.org/651408
    Closes: https://bugs.gentoo.org/700696
    
    Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
    Closes: https://github.com/gentoo/gentoo/pull/19390
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 .../files/gmchess-0.29.6_fix_build_segfault.patch  | 102 +++++++++++++++++++++
 games-board/gmchess/gmchess-0.29.6-r3.ebuild       |  59 ++++++++++++
 2 files changed, 161 insertions(+)