Bug 216642

Summary: games/xlogical: fails to build with clang 4.0
Product: Ports & Packages Reporter: Jan Beich <jbeich>
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: aaron
Priority: --- Keywords: needs-patch
Version: LatestFlags: amdmi3: maintainer-feedback-
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216075
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216074
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216072
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215861
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216046
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216051
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216052
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216056
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216058
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216159
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216176
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216194
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216197
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216198
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216199
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216200
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216203
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216206
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216211
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216213
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216214
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216215
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216216
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216217
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216218
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216221
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216222
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216227
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216228
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216233
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216234
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216235
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216253
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216354
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216355
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216356
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216357
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216358
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216076
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216615
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216617
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216618
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216619
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216620
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216621
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216622
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216623
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216624
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216626
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216627
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216629
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216630
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216631
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216632
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216633
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216634
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216635
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216636
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216637
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216638
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216639
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216640
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216641
Bug Depends on:    
Bug Blocks: 216008    

Description Jan Beich freebsd_committer freebsd_triage 2017-01-31 00:04:18 UTC
sdl_audio.cpp:61:26: error: ordered comparison between pointer and zero ('char *' and 'int')
        for( end=aPath+len; end >= 0; end-=1 )
                            ~~~ ^  ~
sdl_audio.cpp:65:24: error: ordered comparison between pointer and zero ('char *' and 'int')
        for( start=end; start >= 0; start-=1 )
                        ~~~~~ ^  ~

build log: http://package18.nyi.freebsd.org/data/headamd64PR216008-default/2017-01-29_16h09m05s/logs/errors/xlogical-1.0p8_10.log
regressed by: https://github.com/llvm-mirror/clang/commit/4b6ad14285f3
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2017-02-01 15:02:18 UTC
This also fails to run:

*** exception caught ***

Error: Mix_LoadWAV: Error reading from datastream
 File: sdl_audio.cpp
 Line: 293

It dies on /usr/local/share/xlogical/sound/finish_spinner.wav. The file is probably broken because mlaying it with mplayer results with noise parts.
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2017-03-03 09:41:52 UTC
Maintainer timeout
Comment 3 commit-hook freebsd_committer freebsd_triage 2017-03-03 10:43:50 UTC
A commit references this bug:

Author: amdmi3
Date: Fri Mar  3 10:42:49 UTC 2017
New revision: 435341
URL: https://svnweb.freebsd.org/changeset/ports/435341

Log:
  - Use upstream versioning scheme
  - Remove dead MASTER_SITE
  - Add mirror
  - Fix LICENSE
  - Add LICENSE_FILE
  - Move highscores to /var/games and fix highscore handling (setgid games)
  - Don't install useless docfiles
  - Install .desktop file
  - Fix build with clang 4.0
  - Unbreak data files which were corrupted by unrestricted USES=dos2unix

  PR:		216642
  Reported by:	jbeich
  Approved by:	maintainer timeout (aaron@baugher.biz, 1 month)

Changes:
  head/games/xlogical/Makefile
  head/games/xlogical/files/patch-Makefile.am
  head/games/xlogical/files/patch-images_Makefile.am
  head/games/xlogical/files/patch-music_Makefile.am
  head/games/xlogical/files/patch-sdl__audio.cpp
  head/games/xlogical/files/patch-sound_Makefile.am
  head/games/xlogical/pkg-descr
  head/games/xlogical/pkg-plist
Comment 4 Aaron Baugher 2017-03-03 15:12:22 UTC
Sorry, I'm still new at this maintainer thing.  It builds fine on my 11.0 system, but it looks like I just have clang 3.8.0.  Would I need to install lang/clang-devel to be using 4.0?  Thank you.
Comment 5 Jan Beich freebsd_committer freebsd_triage 2017-03-03 15:46:56 UTC
To test Clang 4.0 you have to either install 12.0-CURRENT (maybe in a jail + kernel) or switch from 2017Q1 to /head packages then do the following.

$ pkg install llvm40
$ make clean all CC=clang40 CXX=clang++40 CPP=clang-cpp40