GNU bug report logs - #11797
trunk does not build on NetBSD

Previous Next

Package: emacs;

Reported by: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>

Date: Wed, 27 Jun 2012 16:15:01 UTC

Severity: important

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11797 in the body.
You can then email your comments to 11797 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Wed, 27 Jun 2012 16:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Herbert J. Skuhra" <h.skuhra <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 27 Jun 2012 16:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: trunk does not build on NetBSD
Date: Wed, 27 Jun 2012 11:44:18 +0200
[Message part 1 (text/plain, inline)]
Hi,

I get the following error when I run 'gmake bootstrap' on NetBSD-current:

sysdep.c:2528:16: error: 'CTL_KERN' undeclared (first use in this function)
sysdep.c:2528:16: note: each undeclared identifier is reported only
once for each function it appears in
sysdep.c:2528:26: error: 'KERN_PROC' undeclared (first use in this function)
sysdep.c:2528:37: error: 'KERN_PROC_PROC' undeclared (first use in
this function)
sysdep.c:2537:3: warning: implicit declaration of function 'sysctl'
sysdep.c:2548:18: error: invalid application of 'sizeof' to incomplete
type 'struct kinfo_proc'
sysdep.c:2548:7: warning: division by zero
sysdep.c:2554:7: error: invalid use of undefined type 'struct kinfo_proc'
sysdep.c:2554:25: error: dereferencing pointer to incomplete type
sysdep.c:2554:25: error: request for member 'ki_pid' in something not
a structure or union
sysdep.c:2554:7: error: invalid use of undefined type 'struct kinfo_proc'
sysdep.c:2554:25: error: dereferencing pointer to incomplete type
sysdep.c:2554:25: error: request for member 'ki_pid' in something not
a structure or union
sysdep.c:2554:25: warning: comparison between pointer and integer
sysdep.c:2554:7: error: invalid use of undefined type 'struct kinfo_proc'
sysdep.c:2554:25: error: dereferencing pointer to incomplete type
sysdep.c:2554:25: error: request for member 'ki_pid' in something not
a structure or union
sysdep.c:2554:25: warning: comparison between pointer and integer
sysdep.c:2554:7: error: invalid use of undefined type 'struct kinfo_proc'
sysdep.c:2554:25: error: dereferencing pointer to incomplete type
sysdep.c:2554:25: error: request for member 'ki_pid' in something not
a structure or union
sysdep.c:2554:7: error: incompatible type for argument 1 of 'make_float'
lisp.h:2744:20: note: expected 'double' but argument is of type 'int *'
sysdep.c:2554:7: error: invalid use of undefined type 'struct kinfo_proc'
sysdep.c:2554:25: error: dereferencing pointer to incomplete type
sysdep.c:2554:25: error: request for member 'ki_pid' in something not
a structure or union
sysdep.c:2554:25: warning: pointer/integer type mismatch in
conditional expression
sysdep.c:2554:7: warning: passing argument 1 of 'Fcons' makes integer
from pointer without a cast
lisp.h:2687:1: note: expected 'Lisp_Object' but argument is of type 'int *'
gmake[2]: *** [sysdep.o] Error 1
gmake[2]: Leaving directory `/home/herbert/source/emacs/trunk/src'
gmake[1]: *** [src] Error 2
gmake[1]: Leaving directory `/home/herbert/source/emacs/trunk'
gmake: *** [bootstrap] Error 2

% uname -rms
NetBSD 6.99.8 amd64
% bzr revno
108764
% ./autogen.sh
% CPPFLAGS='-I/usr/pkg/include' LDFLAGS='-L/usr/pkg/lib' ./configure
--prefix=/usr/local/emacs --with-x-toolkit=gtk3
% gmake bootstrap

Notes:

1. I have to modify the configure script so that it checks for -lpng15
instead of -lpng
2. I have to revert 108471 (see my notes to bug #11398)

The attached patch fixes the build.

-- 
Herbert
[patch_src_sysdep_c.txt (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Thu, 28 Jun 2012 00:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 11797 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>
Cc: 11797 <at> debbugs.gnu.org
Subject: Re: bug#11797: trunk does not build on NetBSD
Date: Wed, 27 Jun 2012 20:05:24 -0400
"Herbert J. Skuhra" wrote:

> 1. I have to modify the configure script so that it checks for -lpng15
> instead of -lpng

Not the main part of your report of course, but really?
There's no "libpng" on NetBSD, only "libpng15"?
Isn't that a PITA for compiling a bunch of software, not just Emacs?
You aren't just missing the equivalent of a "libpng-devel" package that
provides the unversioned .so?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Thu, 28 Jun 2012 10:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 11797 <at> debbugs.gnu.org (full text, mbox):

From: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 11797 <at> debbugs.gnu.org
Subject: Re: bug#11797: trunk does not build on NetBSD
Date: Thu, 28 Jun 2012 12:18:14 +0200
On Thu, Jun 28, 2012 at 2:05 AM, Glenn Morris <rgm <at> gnu.org> wrote:
> "Herbert J. Skuhra" wrote:
>
>> 1. I have to modify the configure script so that it checks for -lpng15
>> instead of -lpng
>
> Not the main part of your report of course, but really?
> There's no "libpng" on NetBSD, only "libpng15"?

I've built png from pkgsrc and I have only:

/usr/pkg/lib/libpng15.la
/usr/pkg/lib/libpng15.a
/usr/pkg/lib/libpng15.so
/usr/pkg/lib/libpng15.so.15
/usr/pkg/lib/libpng15.so.15.11.0

> Isn't that a PITA for compiling a bunch of software, not just Emacs?

Yes, when the software does not use pkg-config or libpng-confg to
detect libpng.

> You aren't just missing the equivalent of a "libpng-devel" package that
> provides the unversioned .so?

pkgsrc has a workaround for software that does not use pkg-config or
libpng-config.

Excerpt from /usr/pkgsrc/graphics/png/buildlink3.mk:

# Some software directly tries to link against -lpng instead of
# using pkg-config or libpng-config to find the proper arguments
# instead of installing symlinks. Work around this with buildlink
# magic: packages outside pkgsrc will need to be converted to
# one of the proper methods or fail.
BUILDLINK_TRANSFORM+=   l:png:png15




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Thu, 28 Jun 2012 17:34:02 GMT) Full text and rfc822 format available.

Message #14 received at 11797 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>
Cc: 11797 <at> debbugs.gnu.org
Subject: Re: bug#11797: trunk does not build on NetBSD
Date: Thu, 28 Jun 2012 13:29:07 -0400
"Herbert J. Skuhra" wrote:

> Yes, when the software does not use pkg-config or libpng-confg to
> detect libpng.

So in other words a configure script has to use pkg-config for
absolutely every library? Yay...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Sat, 07 Jul 2012 02:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 11797 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 11797 <at> debbugs.gnu.org
Cc: "Herbert J. Skuhra" <h.skuhra <at> gmail.com>
Subject: Re: bug#11797: trunk does not build on NetBSD
Date: Fri, 06 Jul 2012 19:35:09 -0700
I have installed a fix for this in the trunk, as bzr 108929.
This is related to a similar patch I recently installed,
for OpenBSD, in trunk bzr 108891.  Should these be backported
to Emacs 24?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11797; Package emacs. (Sat, 07 Jul 2012 17:55:01 GMT) Full text and rfc822 format available.

Message #20 received at 11797 <at> debbugs.gnu.org (full text, mbox):

From: Han Boetes <hboetes <at> gmail.com>
To: 11797 <at> debbugs.gnu.org
Cc: Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Re: bug#11797: trunk does not build on NetBSD
Date: Sat, 07 Jul 2012 11:14:28 +0200
I noticed a similar problem on OpenBSD not building and offered Paul
Eggert an account on my machine so he could fix the issue. This is what
he changed. Since he used __OpenBSD__ I don't think it will work on
NetBSD but it's a sure step in the right direction.

Please consider reading:

http://www.openbsd.org/faq/ports/guide.html#PortsGeneric





~/nfs/Emacs/emacs% bzr diff -r-40.. src/sysdep.c
=== modified file 'src/sysdep.c'
--- src/sysdep.c        2012-07-05 18:35:48 +0000
+++ src/sysdep.c        2012-07-06 08:28:29 +0000
@@ -38,17 +38,17 @@
 #include "sysselect.h"
 #include "blockinput.h"

+#ifdef BSD_SYSTEM
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
+
 #ifdef __FreeBSD__
-#include <sys/sysctl.h>
 #include <sys/user.h>
 #include <sys/resource.h>
 #include <math.h>
 #endif

-#ifdef DARWIN_OS
-#include <sys/sysctl.h>
-#endif
-
 #ifdef WINDOWSNT
 #define read sys_read
 #define write sys_write
@@ -2520,7 +2520,7 @@
 Lisp_Object
 list_system_processes (void)
 {
-#ifdef DARWIN_OS
+#if defined DARWIN_OS || defined __OpenBSD__
   int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
 #else
   int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC};
@@ -2548,6 +2548,8 @@
     {
 #ifdef DARWIN_OS
       proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid),
proclist);
+#elif defined __OpenBSD__
+      proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist);
 #else
       proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist);
 #endif





Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Fri, 13 Jul 2012 01:34:02 GMT) Full text and rfc822 format available.

Notification sent to "Herbert J. Skuhra" <h.skuhra <at> gmail.com>:
bug acknowledged by developer. (Fri, 13 Jul 2012 01:34:02 GMT) Full text and rfc822 format available.

Message #25 received at 11797-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 11797-done <at> debbugs.gnu.org
Subject: fixed in trunk
Date: Thu, 12 Jul 2012 18:27:39 -0700
Since this is fixed in the trunk I am marking this
as 'done'.  If there's a desire to backport this to
Emacs 24 that can be opened as a separate bug report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 10 Aug 2012 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 274 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.