pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/54358: archivers/hpack fail to build on macosx



>Number:         54358
>Category:       pkg
>Synopsis:       archivers/hpack fail to build on macosx
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 08 11:00:00 +0000 2019
>Originator:     Clement Bouvier
>Release:        current
>Organization:
>Environment:
macOS Mojave 10.14.5
>Description:
archivers/hpack fail to build on macosx with duplicate symbol "___sputc"

 and several warnings
"implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration]"

>How-To-Repeat:
Build archivers/hpack on "recent" macos
>Fix:
The project uses "inline functions" but with a semantic different of c99 inline, also it uses implicit function declaration (write, open in units.h, malloc, free in stdlib.h).
if CFLAGS=-fgnu89-inline, the project is built.
if CFLAGS=-std=gnu89 then that suppresses  warnings about implicit function declarations.
Warning are also present on netbsd, so I prefer to define a non system-specific CFLAGS (although the project is built without any CFLAGS option added.).

I don't know if we can use USE_LANGUAGES= c89 (or "gnu89")
but the option does not work in my case.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/hpack/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- Makefile	2 Jan 2018 05:37:22 -0000	1.40
+++ Makefile	8 Jul 2019 10:55:00 -0000
@@ -17,6 +17,7 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+CFLAGS+= -std=gnu89
 .if ${OPSYS} == "Linux"
 HPACK_CFLAGS=	-DLINUX
 .else




Home | Main Index | Thread Index | Old Index