Bug 216642 - games/xlogical: fails to build with clang 4.0
Summary: games/xlogical: fails to build with clang 4.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dmitry Marakasov
Keywords: needs-patch
Depends on:
Blocks: 216008
  Show dependency treegraph
Reported: 2017-01-31 00:04 UTC by Jan Beich
Modified: 2017-03-03 15:46 UTC (History)
1 user (show)

See Also:
amdmi3: maintainer-feedback-


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 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 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 2017-03-03 09:41:52 UTC
Maintainer timeout
Comment 3 commit-hook freebsd_committer 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

  - Use upstream versioning scheme
  - Remove dead MASTER_SITE
  - Add mirror
  - 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)

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 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