Date: Sat, 21 Aug 2004 01:27:02 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Andre Oppermann <andre@FreeBSD.org> Cc: "P.D. Seniura" <pdseniura@techie.com> Subject: Re: problem in building modules-with-world re: cvs commit:src/sys/netinet ip_fw_pfil.c Message-ID: <20040820222702.GC73483@ip.net.ua> In-Reply-To: <41267079.47F2ADA4@freebsd.org> References: <20040820192058.3BE26790032@ws1-14.us4.outblaze.com> <41265A04.25A48B17@freebsd.org> <20040820204236.GA73564@ip.net.ua> <41267079.47F2ADA4@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--2/5bycvrmDh4d1IB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 20, 2004 at 11:43:21PM +0200, Andre Oppermann wrote: > Ruslan Ermilov wrote: > > > > > I have just cvsupped -current and the GENERIC kernel compiles jus= t fine. > > > > > > > > > > Looking at the error message in your log output one might conclud= e that you > > > > > are missing "option INET" in your kernel config? > > > > > > > > MODULES_WITH_WORLD > > > > > > > > Please read the subject line. ;) > > > > > > Ok, there seems to be a problem with setting up the environment when = doing > > > this. Why do you build modules with WORLD instead of doing it with t= he > > > kernel? This sounds quite dangerous to me when kernel/modules go out= of > > > sync. > > > > > > Ruslan, do you have any idea what is going wrong? > > > > > Yes. You removed far too much in your conversion. ;) >=20 > Yes and no. The goal was to get a ipfw module that can have IPDIVERT > (requires kernel to have it too) and IPFIREWALL_FORWARD (kernel doesn't > matter, just won't work if kernel doesn't have it) in it. When building > the modules together with the kernel it works because the opt_* files > are around. This doesn't seem to be the case when building it with > world. Isn't there some #define when it is compiled with world? >=20 No, there is not. When modules are built outside of the kernel, you never know which kernel it will be linked with at run time. Since you don't know if a kernel will have IPDIVERT support or not, you cannot deliberately compile a module with -DIPDIVERT in CFLAGS. (When compiling with a kernel, it's not a problem -- you get the necessary information from opt_ipdivert.h.) I'd say, put the another commented out line to modules/ipfw/Makefile: #CFLAGS+=3D -DIPDIVERT The existing ones are here for the MODULES_WITH_WORLD and standalone build cases, decoupled from the kernel build. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --2/5bycvrmDh4d1IB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (FreeBSD) iD8DBQFBJnq2qRfpzJluFF4RAr0vAJ4jmdz7h+Urli2nZocdvAVabCptugCfddVc Xz21rZEp/7BMV1VH4emeNng= =cNrI -----END PGP SIGNATURE----- --2/5bycvrmDh4d1IB--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820222702.GC73483>