在FreeBSD上重新编译syslogd的步骤是什么?

时间:2014-11-21 23:40:31

标签: makefile freebsd syslog

我试图在FreeBSD系统上对syslogd进行一些小改动。我想将syslogd.c中MAXLINE的值更改为4096,然后重新编译。我已经引用了这篇文章中的步骤:

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

但是,由于我不熟悉下拉,编辑和重新编译源代码,我不得不尝试重新编译。

到目前为止我采取的步骤:

  • #svn checkout svn://svn0.us-east.FreeBSD.org/base/head / usr / src
  • /usr/src/usr.sbin/syslogd/syslogd.c中MAXLINE的编辑值
  • #make obj&&使依赖&&制造&& make install

当我尝试第3步(make obj&& make depend&& make&& make install)时,它会给我以下错误:

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

我在这个过程中错过了一步吗?任何帮助将不胜感激。如果我能提供更多信息,请告诉我。

谢谢!

2 个答案:

答案 0 :(得分:0)

这很奇怪。您可以尝试" svn up",然后重试构建(" cd /usr/src/usr.sbin/syslogd&& make clean all install")?也许你只是在树木被打破的不幸时刻检查过。

答案 1 :(得分:0)

您是否有机会尝试在旧的FreeBSD系统(8.X或7.X)上进行此操作?此类系统上的系统make(1)可能太旧而无法处理CURRENT中的Makefile(在签出时会得到#34; head")。如果是这种情况,您将需要升级或处理与您的系统版本匹配的源 (svn结帐/base/stable/8/base/release/X.Y.Z或其他)。

在条目中可以找到另一个可能相关的点 来自http://svn.freebsd.org/base/head/UPDATING的20140505:

/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.