[HEADS UP] Kernel modules don't work properly in FreeBSD 8.1-RC1 (solved)

Ted Faber faber at isi.edu
Thu Jun 24 01:15:14 UTC 2010

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).
> 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 += -v to the Makefile in question.

Thanks Andriy!

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20100624/b6d3e4a5/attachment-0001.pgp

More information about the freebsd-current mailing list