NetBSD Problem Report #56098

From www@netbsd.org  Thu Apr  8 07:01:45 2021
Return-Path: <www@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))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id F35951A923E
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  8 Apr 2021 07:01:44 +0000 (UTC)
Message-Id: <20210408070143.99C691A9242@mollari.NetBSD.org>
Date: Thu,  8 Apr 2021 07:01:43 +0000 (UTC)
From: dan@alt.md
Reply-To: dan@alt.md
To: gnats-bugs@NetBSD.org
Subject: fig2dev build fails on MacOS due to missing "endian.h"
X-Send-Pr-Version: www-1.0

>Number:         56098
>Category:       pkg
>Synopsis:       fig2dev build fails on MacOS due to missing "endian.h"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 08 07:05:00 +0000 2021
>Closed-Date:    Sun Apr 11 08:23:43 +0000 2021
>Last-Modified:  Sun Apr 11 08:23:43 +0000 2021
>Originator:     Dan Cîrna&#539;
>Release:        current
>Organization:
TNF
>Environment:
Darwin Dans-MBP-4 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
>Description:
--- genemf.o ---
In file included from genemf.c:85:
./genemf.h:33:10: fatal error: 'endian.h' file not found
#include <endian.h>
         ^~~~~~~~~~
1 error generated.
*** [genemf.o] Error code 1

bmake[3]: stopped in /opt/pkg/src/print/fig2dev/work/fig2dev-3.2.8/fig2dev/dev
1 error
>How-To-Repeat:
make -C print/fig2dev
>Fix:
$NetBSD$

--- fig2dev/dev/genemf.h.orig   2020-12-17 21:13:53.000000000 +0000
+++ fig2dev/dev/genemf.h
@@ -30,7 +30,11 @@
 #include "config.h"
 #endif

+#ifdef __APPLE__
+#include <machine/endian.h>
+#else
 #include <endian.h>
+#endif

 typedef unsigned char  uchar;
 typedef unsigned short TCHAR;

>Release-Note:

>Audit-Trail:
From: Niclas Rosenvik <nros@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56098: fig2dev build fails on MacOS due to missing
 "endian.h"
Date: Thu, 8 Apr 2021 20:54:49 +0200

 On Thu,  8 Apr 2021 07:05:00 +0000 (UTC)
 dan@alt.md wrote:


 > >Fix:
 > $NetBSD$
 > 
 > --- fig2dev/dev/genemf.h.orig   2020-12-17 21:13:53.000000000 +0000
 > +++ fig2dev/dev/genemf.h
 > @@ -30,7 +30,11 @@
 >  #include "config.h"
 >  #endif
 > 
 > +#ifdef __APPLE__
 > +#include <machine/endian.h>
 > +#else
 >  #include <endian.h>
 > +#endif
 > 
 >  typedef unsigned char  uchar;
 >  typedef unsigned short TCHAR;

 Upstream has removed the inclusion of endian.h.
 https://sourceforge.net/p/mcj/fig2dev/ci/3897c8034f2eecfa99c645f2b8efa400505a9e27/

 I have tried to compile with endian.h removed on Linux and NetBSD
 without a problem. I will commit a patch with that change if that fix
 works for you.

From: =?utf-8?Q?Dan_C=C3=AErna=C8=9B?= <dan@alt.md>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/56098: fig2dev build fails on MacOS due to missing "endian.h"
Date: Fri, 09 Apr 2021 13:57:45 +0000

 > Pe 08.04.2021, la 21:00, Niclas Rosenvik <nros@NetBSD.org> a scris:
 >
 > I have tried to compile with endian.h removed on Linux and NetBSD
 > without a problem. I will commit a patch with that change if that fix
 > works for you.
 >
 That=E2=80=99s even better, thank you. Build succeeds on macOS without endi=
 an.h

 Best,
 Dan

From: "Niclas Rosenvik" <nros@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/56098 CVS commit: pkgsrc/print/fig2dev
Date: Sun, 11 Apr 2021 08:09:13 +0000

 Module Name:	pkgsrc
 Committed By:	nros
 Date:		Sun Apr 11 08:09:12 UTC 2021

 Modified Files:
 	pkgsrc/print/fig2dev: distinfo
 Added Files:
 	pkgsrc/print/fig2dev/patches: patch-fig2dev_dev_genemf.h

 Log Message:
 Fix broken fig2dev build on macosx due to endian.h

 Fix broken build on macosx due to inclusion of unneeded endian.h .
 Fix taken from upstream.
 Closes PR pkg/56098


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/print/fig2dev/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/print/fig2dev/patches/patch-fig2dev_dev_genemf.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: nros@NetBSD.org
State-Changed-When: Sun, 11 Apr 2021 08:23:43 +0000
State-Changed-Why:
Fixed

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.