Bug 5123 - Samba 3.0.26a from netbsd pkgsrc system doesn't compile on Netbsd 1.6.2
Summary: Samba 3.0.26a from netbsd pkgsrc system doesn't compile on Netbsd 1.6.2
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.26a
Hardware: All NetBSD
: P3 normal
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
Depends on:
Reported: 2007-12-05 15:55 UTC by John Frear (dead mail address)
Modified: 2021-01-04 20:06 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description John Frear (dead mail address) 2007-12-05 15:55:51 UTC
Below is text I have submitted into the netbsd pkgsrc bug system:

I'm not able to compile Samba 3.0.26a from the net/samba directory in pkgsrc.  My main Makefile has cvs version 1.177.

The output of the pkgsrc make command was:

Compiling smbd/trans2.c
In file included from /usr/include/termios.h:305,
                 from lib/replace/system/terminal.h:33,
                 from include/includes.h:115,
                 from /usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c:27:
/usr/include/sys/ttydefaults.h:61: warning: `CTRL' redefined
/usr/pkgsrc/net/samba/work/.buildlink/include/readline/chardefs.h:64: warning: this is the location of the previous definition
/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c: In function `set_ea':
/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c:368: `ENODATA' undeclared (first use in this function)
/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c:368: (Each undeclared identifier is reported only once
/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c:368: for each function it appears in.)
The following command failed:
cc -I. -I/usr/pkgsrc/net/samba/work/samba-3.0.26a/source  -O2 -I/usr/pkg/include -D_SAMBA_BUILD_=3 -I/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/popt -I/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/iniparser/src -Iinclude -I./include  -I. -I. -I./lib/replace -I./lib/talloc -I./tdb/include -I./libaddns -I./librpc -DHAVE_CONFIG_H  -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include    -I/usr/pkgsrc/net/samba/work/samba-3.0.26a/source/lib -D_SAMBA_BUILD_=3 -fPIC -DPIC -c /usr/pkgsrc/net/samba/work/samba-3.0.26a/source/smbd/trans2.c -o smbd/trans2.o
*** Error code 1

I looked into this problem and have resolved it on my own system.  The problem is due to samba's includes/include.h file declaring:

#ifndef ENOATTR

I also found a discussion at the following website useful:


I created a patch for the pkgsrc system and it has resolved the problem for me.  The contents of my patch are:

--- include/includes.h.orig	Mon Aug 20 08:04:51 2007
+++ include/includes.h	Wed Dec  5 14:27:33 2007
@@ -225,6 +225,10 @@
 #include <sys/attributes.h>
+#if !defined(ENOATTR) && !defined(ENODATA)
 #ifndef ENOATTR

I looked in netbsd's cvsweb at /usr/include/sys/errno.h and the most current version at this time (rev 1.9) doesn't define either ENOATTR or ENODATA, so I believe this compile issue may affect all netbsd systems.  Anyhow, I hope my choice of mapping the error to EAGAIN was the right way to go.

Thanks for providing a great system everyone!
Comment 1 Björn Jacke 2021-01-04 20:06:10 UTC
the compile issue was fixed in the meantime