Bug 284484 - lang/nhc98: Fails to build with GCC 14: error: implicit declaration of function 'sbrk' [-Wimplicit-function-declaration]
Summary: lang/nhc98: Fails to build with GCC 14: error: implicit declaration of functi...
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: freebsd-haskell (Nobody)
URL: https://pkg-status.freebsd.org/gohan0...
Keywords:
Depends on:
Blocks: 281091
  Show dependency treegraph
 
Reported: 2025-01-31 14:30 UTC by Lorenzo Salvadore
Modified: 2025-02-07 13:02 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2025-01-31 14:30:02 UTC
The port fails to build with GCC 14, which is about to become GCC_DEFAULT version. This link can help: https://gcc.gnu.org/gcc-14/porting_to.html

gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/mutator.o mutator.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/mutlib.o mutlib.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/main.o main.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/haskellInit.o haskellInit.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/dump.o dump.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/inscount.o inscount.c
gcc14 -c     -I/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/include -DVERSION="\"1.22\""   -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc14 -fno-strict-aliasing  -o /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/collector.o collector.c
collector.c: In function 'initGc':
collector.c:56:43: error: implicit declaration of function 'sbrk' [-Wimplicit-function-declaration]
   56 |       ((NodePtr)-1)== (hpStart = (NodePtr)sbrk((int)totalSize * sizeof(Node)))
      |                                           ^~~~
gmake[2]: *** [Makefile:41: /wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/targets/ix86-FreeBSD/obj/runtime/Kernel/collector.o] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/src/runtime/Kernel'
gmake[1]: *** [Makefile:31: ofiles] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/nhc98/work/nhc98-1.22/src/runtime'
gmake: *** [Makefile:238: targets/ix86-FreeBSD/runtime] Error 2
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/nhc98
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2025-01-31 14:37:28 UTC
Feel free to mark BROKEN and deprecate. I don't think this software worth any labor to keep it in our tree.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-02-07 13:02:23 UTC
A commit in branch main references this bug:

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

commit d8f506c915165825ad810e94cca0be0b336f97cb
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2025-02-07 12:53:43 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2025-02-07 13:00:27 +0000

    lang/nhc98: Deprecate port

    - The port is for i386 only, which is not a tier 1 platform for any FreeBSD supported version.
    - Latest release is from 2010.
    - Does not build with GCC 14. Set USE_GCC=13 so that the port does not
      block GCC_DEFAULT update while waiting for expiration. [1]

    PR:             284484 [1]
    Approved by:    arrowd

 lang/nhc98/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2025-02-07 13:02:45 UTC
Fixed, thanks!