Bug 276190 - www/lagrange: Fails to build on 15-CURRENT
Summary: www/lagrange: Fails to build on 15-CURRENT
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on: 274414
Blocks:
  Show dependency treegraph
 
Reported: 2024-01-07 22:51 UTC by Alastair Hogge
Modified: 2024-07-28 12:31 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (lcook)
vvd: merge-quarterly+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alastair Hogge 2024-01-07 22:51:35 UTC
Hello, current Port (1.16.5), and 1.17.x updates fail to build on FreeBSD:

> FAILED: lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o
> /usr/bin/cc -DiIsLibraryBuild -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/include -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/.build/lib/the_Foundation -I/usr/local/include -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  > -DNDEBUG -std=gnu11 -Wall -Wpedantic -Werror -Wno-deprecated-declarations -Wno-format-pedantic -Wno-format -msse4.1 -MD -MT lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -MF lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o.d -o lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -c /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c
> In file included from /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c:41:
> /usr/local/include/unistr.h:203:39: error: [[]] attributes are a C2x extension [-Werror,-Wc2x-extensions]
>   203 |                    const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
>       |                                       ^
> /usr/local/include/unistring/cdefs.h:44:37: note: expanded from macro '_GL_ATTRIBUTE_MAYBE_UNUSED'
>    44 | # define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
>       |                                     ^
> /usr/local/include/unistring/cdefs.h:105:37: note: expanded from macro '_UC_ATTRIBUTE_MAYBE_UNUSED'
>   105 | # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
>       |                                     ^
> In file included from /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c:41:
> /usr/local/include/unistr.h:270:13: error: [[]] attributes are a C2x extension [-Werror,-Wc2x-extensions]
>   270 |             _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
>       |             ^
> /usr/local/include/unistring/cdefs.h:44:37: note: expanded from macro '_GL_ATTRIBUTE_MAYBE_UNUSED'
>    44 | # define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
>       |                                     ^
> /usr/local/include/unistring/cdefs.h:105:37: note: expanded from macro '_UC_ATTRIBUTE_MAYBE_UNUSED'
>   105 | # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
>       |                                     ^
> 2 errors generated.
> ninja: build stopped: subcommand failed.
> *** Error code 1
Comment 1 Alastair Hogge 2024-01-07 22:51:54 UTC
Logs:
https://portsfallout.com/port/29942/
Comment 2 Mina Galić freebsd_triage 2024-01-08 08:07:46 UTC
the culprits here are -std=gnu11 and -Wpedantic
if the compiler is to be pedantic about the standard, then it has to error out on things that aren't a standard (yet)

try removing the -Wpedantic and see where that leads us to
Comment 3 Alastair Hogge 2024-01-14 00:09:31 UTC
(In reply to Mina Galić from comment #2)
 
Ah awesome, thanks, I will have a look and report back.
Comment 4 Alastair Hogge 2024-01-15 02:06:35 UTC
I patched ${WRKSRC}/lib/the_Foundation/CMakeLists.txt to remove the -Wpedantic, the error remains the same:

> [ 75% 92/122] /usr/bin/cc -DiIsLibraryBuild -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/include -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/.build/lib/the_Foundation -I/usr/local/include -O2 -pipe  -Wc2x-extensions -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -Wc2x-extensions -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -std=gnu11 -Wall -Werror -Wno-deprecated-declarations -Wno-format-pedantic -Wno-format -msse4.1 -MD -MT lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -MF lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o.d -o lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -c /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c
> FAILED: lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o
> /usr/bin/cc -DiIsLibraryBuild -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/include -I/tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/.build/lib/the_Foundation -I/usr/local/include -O2 -pipe  -Wc2x-extensions -fstack-protector-strong -fno-strict-aliasing -O2 -pipe  -Wc2x-extensions -fstack-protector-strong -fno-strict-aliasing  -DNDEBUG -std=gnu11 -Wall -Werror -Wno-deprecated-declarations -Wno-format-pedantic -Wno-format -msse4.1 -MD -MT lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -MF lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o.d -o lib/the_Foundation/CMakeFiles/the_Foundation.dir/src/punycode.c.o -c /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c
> In file included from /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c:41:
> /usr/local/include/unistr.h:203:39: error: [[]] attributes are a C2x extension [-Werror,-Wc2x-extensions]
>   203 |                    const uint32_t *s, _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
>       |                                       ^
> /usr/local/include/unistring/cdefs.h:44:37: note: expanded from macro '_GL_ATTRIBUTE_MAYBE_UNUSED'
>    44 | # define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
>       |                                     ^
> /usr/local/include/unistring/cdefs.h:105:37: note: expanded from macro '_UC_ATTRIBUTE_MAYBE_UNUSED'
>   105 | # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
>       |                                     ^
> In file included from /tmp/lagrange/net/fafnir/git/worktrees/lagrange-20240107/www/lagrange/work/lagrange-1.17.5/lib/the_Foundation/src/punycode.c:41:
> /usr/local/include/unistr.h:270:13: error: [[]] attributes are a C2x extension [-Werror,-Wc2x-extensions]
>   270 |             _GL_ATTRIBUTE_MAYBE_UNUSED size_t n)
>       |             ^
> /usr/local/include/unistring/cdefs.h:44:37: note: expanded from macro '_GL_ATTRIBUTE_MAYBE_UNUSED'
>    44 | # define _GL_ATTRIBUTE_MAYBE_UNUSED _UC_ATTRIBUTE_MAYBE_UNUSED
>       |                                     ^
> /usr/local/include/unistring/cdefs.h:105:37: note: expanded from macro '_UC_ATTRIBUTE_MAYBE_UNUSED'
>   105 | # define _UC_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
>       |                                     ^
> 2 errors generated.
> ninja: build stopped: subcommand failed.
> *** Error code 1
>
> Stop.
> make[1]: stopped in /net/fafnir/git/worktrees/lagrange-20240107/www/lagrange
> *** Error code 1
>
> Stop.
> make: stopped in /net/fafnir/git/worktrees/lagrange-20240107/www/lagrange
Comment 5 Sean Farley freebsd_committer freebsd_triage 2024-01-19 03:07:14 UTC
I cheated a little by downgrading errors to warnings with this in the port Makefile:

    CMAKE_ARGS+=   -DTFDN_ENABLE_WARN_ERROR=OFF

That is telling "the_Foundation" to not fail on the warnings coming from the libunistring port, I think.  :)
Comment 6 Alastair Hogge 2024-01-21 03:10:18 UTC
(In reply to Sean Farley from comment #5)

Thanks Sean, It would be nice to avoid attenuating the compiler's constraints, however, the solution is beyond me. Thanks for the tip anyways, I am testing an updated patch from bug #274414 at the moment, so far so good.
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-07-28 12:23:22 UTC
A commit in branch main references this bug:

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

commit b04495aa52fc2e75bfbeea6670de6c5c52c944db
Author:     Nathan Fisher <nfisher.sr@gmail.com>
AuthorDate: 2024-07-28 12:16:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-28 12:16:08 +0000

    www/lagrange: update 1.16.5 → 1.17.6

    Fix several crashes and memory leaks.
    Fix build on 15-CURRENT.

    Changelogs:
    https://github.com/skyjake/lagrange/releases/tag/v1.16.6
    https://github.com/skyjake/lagrange/releases/tag/v1.16.7
    https://github.com/skyjake/lagrange/releases/tag/v1.17.0
    https://github.com/skyjake/lagrange/releases/tag/v1.17.1
    https://github.com/skyjake/lagrange/releases/tag/v1.17.2
    https://github.com/skyjake/lagrange/releases/tag/v1.17.3
    https://github.com/skyjake/lagrange/releases/tag/v1.17.4
    https://github.com/skyjake/lagrange/releases/tag/v1.17.5
    https://github.com/skyjake/lagrange/releases/tag/v1.17.6

    PR:             274414 276190
    Approved by:    lcook (maintainer, timeout > 6 months)
    MFH:            2024Q3

 www/lagrange/Makefile                               |  6 +++---
 www/lagrange/distinfo                               |  6 +++---
 .../patch-lib_the__Foundation_src_tlsrequest.c      | 21 ---------------------
 3 files changed, 6 insertions(+), 27 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2024-07-28 12:29:33 UTC
A commit in branch 2024Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8674554e7b333a31b6c5549be46ed85cf431fbbe

commit 8674554e7b333a31b6c5549be46ed85cf431fbbe
Author:     Nathan Fisher <nfisher.sr@gmail.com>
AuthorDate: 2024-07-28 12:16:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-07-28 12:28:32 +0000

    www/lagrange: update 1.16.5 → 1.17.6

    Fix several crashes and memory leaks.
    Fix build on 15-CURRENT.

    Changelogs:
    https://github.com/skyjake/lagrange/releases/tag/v1.16.6
    https://github.com/skyjake/lagrange/releases/tag/v1.16.7
    https://github.com/skyjake/lagrange/releases/tag/v1.17.0
    https://github.com/skyjake/lagrange/releases/tag/v1.17.1
    https://github.com/skyjake/lagrange/releases/tag/v1.17.2
    https://github.com/skyjake/lagrange/releases/tag/v1.17.3
    https://github.com/skyjake/lagrange/releases/tag/v1.17.4
    https://github.com/skyjake/lagrange/releases/tag/v1.17.5
    https://github.com/skyjake/lagrange/releases/tag/v1.17.6

    PR:             274414 276190
    Approved by:    lcook (maintainer, timeout > 6 months)
    MFH:            2024Q3

    (cherry picked from commit b04495aa52fc2e75bfbeea6670de6c5c52c944db)

 www/lagrange/Makefile                               |  6 +++---
 www/lagrange/distinfo                               |  6 +++---
 .../patch-lib_the__Foundation_src_tlsrequest.c      | 21 ---------------------
 3 files changed, 6 insertions(+), 27 deletions(-)