Bug 271789

Summary: graphics/tippecanoe: Update to 2.26.1
Product: Ports & Packages Reporter: Darcy Buskermolen <darcy>
Component: Individual Port(s)Assignee: Matthew Seaman <matthew>
Status: Closed FIXED    
Severity: Affects Many People CC: darcy, matthew
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
V2.26.1
darcy: maintainer-approval+
BUILD_DEPENDS bash darcy: maintainer-approval+

Description Darcy Buskermolen 2023-06-02 16:16:14 UTC
Created attachment 242559 [details]
V2.26.1

Maintainer Update to Version 2.26.1
Comment 1 Matthew Seaman freebsd_committer freebsd_triage 2023-06-03 16:30:00 UTC
I'm getting a build failure:
```
[...]
===== env: DEVELOPER_MODE=yes STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building for tippecanoe-2.6.3
gmake[1]: Entering directory '/wrkdirs/usr/ports/graphics/tippecanoe/work/tippecanoe-2.6.3'
c++ -MMD  -I/usr/local/include -I. -g -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow -O3 -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -std=c++11 -c -o geojson.o geojson.cpp
gmake[1]: /bin/bash: No such file or directory
gmake[1]: *** [Makefile:74: geojson.o] Error 127
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/tippecanoe/work/tippecanoe-2.6.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/tippecanoe
=>> Cleaning up wrkdir
===>  Cleaning for tippecanoe-2.6.3
build of graphics/tippecanoe | tippecanoe-2.6.3 ended at Sat Jun  3 17:27:59 BST 2023
build time: 00:00:15
!!! build failure encountered !!!

```

Looks like it needs bash as a BUILD_DEPENDS.
Comment 2 Darcy Buskermolen 2023-06-03 16:57:09 UTC
Created attachment 242580 [details]
BUILD_DEPENDS bash

add BUILD_DEPENDS= bash:shells/bash
Comment 3 Matthew Seaman freebsd_committer freebsd_triage 2023-06-03 19:09:34 UTC
OK, so the latest patches build fine on amd64, but unfortunately they fail on i386:
```
c++ -MMD  -I/usr/local/include -I. -g -Wall -Wshadow -Wsign-compare -Wextra -Wunreachable-code -Wuninitialized -Wshadow -O3 -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -std=c++17 -c -o dirtiles.o dirtiles.cpp
In file included from main.cpp:48:
In file included from ./pmtiles_file.hpp:4:
./pmtiles/pmtiles.hpp:524:46: error: non-constant-expression cannot be narrowed from type 'uint64_t' (aka 'unsigned long long') to 'std::basic_string<char>::size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
        std::string dir_s{pmtiles_map + dir_offset, dir_len};
                                                    ^~~~~~~
./pmtiles/pmtiles.hpp:524:46: note: insert an explicit cast to silence this issue
        std::string dir_s{pmtiles_map + dir_offset, dir_len};
                                                    ^~~~~~~
                                                    static_cast<size_type>( )
1 error generated.
```
Comment 4 Darcy Buskermolen 2023-06-03 20:17:58 UTC
I do not have a suitable i386 environment to test against, but it seems like this may be a clang-specific issue. The following  CXXFLAGS=-Wno-narrowing will probably help, can you test with it?  if that dosn;t work, then well jsut mark the port as it won't build on i386.
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-06-05 08:48:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1d61daa912396e4f5d31d130fe9600540ba6644b

commit 1d61daa912396e4f5d31d130fe9600540ba6644b
Author:     Darcy Buskermolen <darcy@dbitech.ca>
AuthorDate: 2023-06-03 16:54:06 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-06-05 08:47:22 +0000

    graphics/tippecanoe: Update to tippecanoe 2.26.1

    Maintainer update to Version 2.26.1
    Add bash to BUILD_DEPENDS

    Suppress clang16 build failure on i386: non-constant-expression cannot
    be narrowed from type 'uint64_t'

    Changes:        https://github.com/felt/tippecanoe/releases/tag/2.26.1
    PR:             271789

 graphics/tippecanoe/Makefile                    | 11 +++++++++--
 graphics/tippecanoe/distinfo                    |  6 +++---
 graphics/tippecanoe/files/patch-Makefile (gone) | 11 -----------
 graphics/tippecanoe/files/patch-main.cpp (gone) | 11 -----------
 4 files changed, 12 insertions(+), 27 deletions(-)
Comment 6 Matthew Seaman freebsd_committer freebsd_triage 2023-06-05 08:52:07 UTC
Committed, thanks!

I added CXXFLAGS+=-Wno-narrowing on i386 -- presumably the same thing will
need to be done for any other 32-bit architectures, but I have no access to
any of those for testing.