What are the steps to recompile syslogd on FreeBSD?

384 Views Asked by At

I am attempting to make a small change to syslogd on a FreeBSD system. I would like to change the value of MAXLINE in syslogd.c to 4096 and then recompile. I've referenced the steps in this post:

http://bsdpants.blogspot.com/2010/08/truncated-syslog-messages.html .

However, as I'm not that familiar with pulling down, editing, and recompiling source, I'm stuck trying to recompile.

Steps I've taken so far:

  • #svn checkout svn://svn0.us-east.FreeBSD.org/base/head /usr/src
  • Edited value of MAXLINE in /usr/src/usr.sbin/syslogd/syslogd.c
  • #make obj && make depend && make && make install

When I try the 3rd step (make obj && make depend && make && make install) it gives me the following error:

make: "/usr/src/usr.sbin/syslogd/Makefile" line 4: Could not find src.opts.mk
make: "/usr/src/usr.sbin/syslogd/Makefile" line 17: Malformed conditional (${MK_INET6_SUPPORT} != "no")
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/src/usr.sbin/syslogd

Am I missing a step in this process? Any help would be greatly appreciated. Please let me know if I can provide additional information.

Thanks!

2

There are 2 best solutions below

4
On

That's weird. Can you try "svn up", and then retry the build ("cd /usr/src/usr.sbin/syslogd && make clean all install")? Perhaps you just checked out at an unfortunate moment, when the tree was broken.

0
On

Are you by any chance trying to do it on an old FreeBSD system (8.X or 7.X)? The system make(1) on such system might be too old to handle Makefiles from the CURRENT (which you get when checking out "head"). If this is the case you will either have to upgrade, or work on sources which match your system version (svn checkout of /base/stable/8 or /base/release/X.Y.Z or whatever).

Another possibly relevant point can be found in the entry for 20140505 from http://svn.freebsd.org/base/head/UPDATING :

/etc/src.conf now affects only builds of the FreeBSD src tree. In the
past, it affected all builds that used the bsd.*.mk files. The old
behavior was a bug, but people may have relied upon it. To get this
behavior back, you can .include /etc/src.conf from /etc/make.conf
(which is still global and isn't changed). This also changes the
behavior of incremental builds inside the tree of individual
directories. Set MAKESYSPATH to ".../share/mk" to do that.
Although this has survived make universe and some upgrade scenarios,
other upgrade scenarios may have broken. At least one form of
temporary breakage was fixed with MAKESYSPATH settings for buildworld
as well... In cases where MAKESYSPATH isn't working with this
setting, you'll need to set it to the full path to your tree.