Bug 225006 - graphics/libgltf: fails to build with clang 6.0 (blocks 113 ports)
Summary: graphics/libgltf: fails to build with clang 6.0 (blocks 113 ports)
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: Jung-uk Kim
URL:
Keywords: patch
Depends on:
Blocks: 224669
  Show dependency treegraph
 
Reported: 2018-01-08 17:04 UTC by Jan Beich
Modified: 2018-01-17 20:40 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (office)


Attachments
ugly fix (1.85 KB, patch)
2018-01-08 17:04 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2018-01-08 17:04:13 UTC
Created attachment 189528 [details]
ugly fix

FreeBSD -CURRENT plans to update base Clang to 6.0.0 soon. While testing this port failed to build.

Shaders.cpp:178:13: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned int') to 'GLint' (aka 'int') in initializer list [-Wc++11-narrowing]
            strlen("#version 130\n"),
            ^~~~~~~~~~~~~~~~~~~~~~~~
Shaders.cpp:178:13: note: insert an explicit cast to silence this issue
            strlen("#version 130\n"),
            ^~~~~~~~~~~~~~~~~~~~~~~~
            static_cast<GLint>(     )

To reproduce:
$ poudriere jail -cj clang6-amd64 -a amd64 -v projects/clang600-import -m svn+https
$ poudriere bulk -Ctj clang6-amd64 graphics/libgltf

http://package18.nyi.freebsd.org/data/headamd64PR224669-default/2018-01-02_08h32m49s/logs/errors/libgltf-0.0.2_10.log
http://package18.nyi.freebsd.org/data/headi386PR224669-default/2018-01-07_22h53m03s/logs/errors/libgltf-0.0.2_10.log
Comment 1 Jung-uk Kim freebsd_committer freebsd_triage 2018-01-17 18:21:52 UTC
I'll take it.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-01-17 20:39:41 UTC
A commit references this bug:

Author: jkim
Date: Wed Jan 17 20:38:41 UTC 2018
New revision: 459286
URL: https://svnweb.freebsd.org/changeset/ports/459286

Log:
  - Fix build with Clang 6.0. [1]
  - Fix license and prefer HTTPS for WWW.

  PR:		225006 [1]

Changes:
  head/graphics/libgltf/Makefile
  head/graphics/libgltf/files/
  head/graphics/libgltf/files/patch-src_Shaders.cpp
  head/graphics/libgltf/pkg-descr
Comment 3 Jung-uk Kim freebsd_committer freebsd_triage 2018-01-17 20:40:50 UTC
I committed my version, thanks!