Troubleshoot about compiling

Hello everyone.
Many years ago, on BeOS, I built Gnu/Anubis ( with successful.
On Haiku i get many errors at the make command.
First of all in terminal i do:

cp /boot/common/share/libtool/config/config.*

and then:

configure --build='i586-pc-haiku'

All went ok.

But at the end of “make” i get these errors:

In file included from /boot/develop/anubis-4.1/src/anubisdb.c:21:
/boot/develop/anubis-4.1/src/headers.h:88: sys/fcntl.h: No such file or directory
make[3]: *** [anubisdb.o] Error 1
make[3]: Leaving directory `/boot/develop/anubis-4.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/boot/develop/anubis-4.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/boot/develop/anubis-4.1'
make: *** [all] Error 2

Any suggestion? I need some developer tools?

From Tracker (upper right corner) select File Search. Type in fcntl.h. If it is not found, that is trouble. You might just need to remove the sys from the include. E.G.
#include sys/fcntl.h becomes
#include fcntl.h

Keep us updated on progress.

  • AndrewZ

The sys/fcntl.h is not a POSIX one. We do have fcntl.h header and all sys/*.h specified by OpenGroup, but not the Linux ones.
Just skip it on Haiku:

#include <sys/fcntl.h>
#endif /* HAVE_SYS_FCNTL_H */

And all will compile fine.
The testsuite compile failed, though.
So, I guess this software must be ported and patched, indeed.

Here what I’ve done quickly to build it (except testsuite) with gcc4:

cd anubis-4.1.1
$ cp /boot/common/share/libtool/config/config.* build/.
$ libtoolize --force --copy --install
$ configure --prefix=/boot/common
$ make

As stated, it failed in testsuite, but the anubis lib and binary build:

$ src/anubis --version
anubis (GNU Anubis 4.1.1)
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 The Anubis Team.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

$ src/anubis --help
Usage: anubis [OPTION]... 
SMTP message submission daemon.

  -b, --bind=[HOST:]PORT      Specify the TCP port on which GNU Anubis listens
                              for connections; the default HOST is INADDR_ANY,
                              and default PORT is 24 (private mail system)
  -r, --remote-mta=[HOST:]PORT
                              Specify a remote SMTP host name or IP address;
                              the default is 25
  -l, --local-mta=FILE        Execute a local SMTP server, which works on
                              standard input and output (inetd-type program);
                              this option excludes the `--remote-mta' option
  -m, --mode=MODE             Select operation mode; MODE is one of
                              "transparent", "auth" or "mda"
  -f, --foreground            Foreground mode
  --from=EMAIL                Specify sender address (implies MDA mode)
  -i, --stdio                 Use the SMTP protocol (OMP/Tunnel) as described
                              in RFC 821 on standard input and output

  Output options

  -s, --silent                Work silently
  -v, --verbose               Work noisily
  -D, --debug                 Debug mode

  Miscellaneous options

  --altrc=FILE                Specify alternate system configuration file
  --norc                      Ignore system configuration file
  -c, --check-config=DEBUG-LEVEL
                              Run the configuration file syntax checker
  --show-config-options       Print a list of configuration options used to
                              build GNU Anubis
  --relax-perm-check          Do not check user configuration file permissions
  --pid-file=FILE             Store the PID of the running daemon in FILE

  Other options

  -h, --help                  Give this help list
  --usage                     Give a short usage message
  --version                   Print program version

Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.

Report bugs to .

You may find more help to port the right-way this software to Haiku here:

I’ve tried again with your suggestions but i get another kind of error:

/boot/develop/anubis-4.1.1/src/xdatabase.c: In function `xexamine':
/boot/develop/anubis-4.1.1/src/xdatabase.c:209: `O_RDONLY' undeclared (first use in this function)
/boot/develop/anubis-4.1.1/src/xdatabase.c:209: (Each undeclared identifier is reported only once
/boot/develop/anubis-4.1.1/src/xdatabase.c:209: for each function it appears in.)
make[3]: *** [xdatabase.o] Error 1
make[3]: Leaving directory `/boot/develop/anubis-4.1.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/boot/develop/anubis-4.1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/boot/develop/anubis-4.1.1'
make: *** [all] Error 2

Maybe I’m not good with compiling! :slight_smile:

phoudoin, can you put online your anubis build? I need anubis for some things in the administration of my lan.

Thank you very much.