NetBSD Problem Report #59764

From leot@netbsd.org  Sun Nov 16 10:06:50 2025
Return-Path: <leot@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 391FE1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 16 Nov 2025 10:06:50 +0000 (UTC)
Message-Id: <20251116100649.C7C40855FC@mail.netbsd.org>
Date: Sun, 16 Nov 2025 10:06:49 +0000 (UTC)
From: leot@NetBSD.org
Reply-To: leot@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: security/gcr builds fails due implicit declaration of function 'timegm' on NetBSD/amd64 11.99.3 (maybe gcc14 related)
X-Send-Pr-Version: 3.95

>Number:         59764
>Category:       pkg
>Synopsis:       security/gcr builds fails due implicit declaration of function 'timegm' on NetBSD/amd64 11.99.3 (maybe gcc14 related)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 16 10:10:00 +0000 2025
>Originator:     Leonardo Taccari
>Release:        NetBSD 11.99.3
>Organization:
The NetBSD Foundation
>Environment:
System: NetBSD boh 11.99.3 NetBSD 11.99.3 (GENERIC) #0: Tue Oct 14 19:59:20 CEST 2025 leot@abacus:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	When building security/gcr on NetBSD/amd64 11.99.3 with base gcc 14.3.0
	the build fails with:

	../gck/gck-slot.c:610:48: error: implicit declaration of function 'timegm'; did you mean 'time'? [-Wimplicit-function-declaration]
	  610 |                         token_info->utc_time = timegm (&tm);
	      |                                                ^~~~~~
	      |                                                time
>How-To-Repeat:
	$ cd pkgsrc/security/gcr
	$ make
>Fix:
	Adding `CFLAGS+= -Wno-implicit-function-declaration` (or CFLAGS.NetBSD)
	workaround that but I'm not sure if that's the right solution.
	(According a grep I believe that devel/libsmi does that and it was the
	only example that I was able to find)

	gck-slot.c includes <time.h> but there are some #ifdef for timegm(3)
	that I believe do not expose it by default.

	Is there any better solution instead of passing
	`-Wno-implicit-function-declaration`?

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.