Date: Wed, 23 Jun 2010 18:15:09 -0700 From: Ted Faber <faber@isi.edu> To: Ryan Stone <rysto32@gmail.com> Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, Andriy Gapon <avg@icyb.net.ua>, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: [HEADS UP] Kernel modules don't work properly in FreeBSD 8.1-RC1 (solved) Message-ID: <20100624011509.GI31578@zod.isi.edu> In-Reply-To: <20100623154531.GB31578@zod.isi.edu> References: <201006230238.06831.hselasky@c2i.net> <4C21AE18.4050400@icyb.net.ua> <201006230852.26536.hselasky@c2i.net> <4C21B170.2030903@icyb.net.ua> <4C21B383.2000602@icyb.net.ua> <AANLkTilZfLDUKzMe-B9kqWCnr1trjvPUoLrqFaVbK78R@mail.gmail.com> <20100623154531.GB31578@zod.isi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
--dp9QYJgVRVEW2bsm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 23, 2010 at 08:45:31AM -0700, Ted Faber wrote: > On Wed, Jun 23, 2010 at 11:03:45AM -0400, Ryan Stone wrote: > > I have to admit that I'm more than a little surprised that this > > problem does not affect modules that in src, but maybe that's because > > I don't know all that much about FreeBSD's build infrastructure. Are > > the src modules being linked with a linker script that is not being > > used for out-of-src modules? Are the people affected by this not > > using the base compiler to build ports?(I see that this affects PC-BSD > > as well, and I'd be a little surprised to learn that it wasn't using > > the base compiler). >=20 > I had the problem on i386, base compiler. It also affects the sample > module in /usr/share/examples/kld/cdev/ which also uses the base > compiler, if you want a case w/o the ports infrastructure. Just so it gets into Google: Andriy Gapon went a few rounds of debugging with me and it turns out that the problem was that the binutils port had installed a loader in /usr/local/bin/ld that was incompatible with the module system. (/usr/local/bin/ preceeds /usr/bin in my path so I can use the lpr commands from cupsd, though it's evidently a bit of a dangerous idea.) Basically if the linker you're using to compile isn't /usr/bin/ld you may have problems building kernel modules. The easiest way to detect this is to get the -v output (version number) from the linker in use and compare it against /usr/bin/ld . I was able to do that by adding LDFLAGS +=3D -v to the Makefile in question. Thanks Andriy! --=20 Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.= asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#= SIG --dp9QYJgVRVEW2bsm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkwisZ0ACgkQaUz3f+Zf+Xs5SQCgxZaxZsOwnaWgUBtmXj2qcclK vnQAoKEzudwhmeqM4zGw8DQc58il68xd =ht3Z -----END PGP SIGNATURE----- --dp9QYJgVRVEW2bsm--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100624011509.GI31578>