Error Building 2.4.0 Kernel

  • I'm trying to compile the 2.4.0 kernel and receiving "taking address of packed member of class or structure may result in an unaligned pointer value" errors.  The sequence of steps I followed is:

    The error I receive is:
    In file included from /root/pfSense_2.4/sys/cam/nvme/nvme_all.h:32:
    /usr/src/sys/dev/nvme/nvme.h:922:16: error: taking address of packed member 'cdw10' of class or structure 'nvme_command' may result in an
          unaligned pointer value [-Werror,-Waddress-of-packed-member]
            *(uint64_t *)&cmd->cdw10 = lba;

    I found some suggestions that clang 4.0 was the first version to flag this as an error, so I even tried installing and using clang 3.8 instead, but I still received the same error.  I also found suggestions that the flag -Wno-address-of-packed-member would suppress this error, but I'm not sufficiently well-versed in makefiles to know where to insert this.

    I have been able to sucessfully compile just the Realtek driver under this build environment, so maybe this is a moot point?  Will the stock kernel still load my compiled driver module if I just add if_re_load="YES" to /boot/loader.conf.local?

    Thanks in advance to anyone who may have advice, and I'm glad to provide any further information that may be useful.

  • So I'm still not clear on why I was unable to compile the kernel, but I wanted to follow up to say that it does appear that placing my compiled v1.94 Realtek if_re.ko driver in /boot/kernel/ and adding if_re_load="YES" to /boot/loader.conf.local was sufficient.  At least, I make this judgment based on the fact that if_re.ko is listed in the output from kldstat.

  • Banned

    I also found myself with this problem, which I was able to fix with this fix :
    But other problems have occurred. :-[
    I had not had this problem with the RC version, which it was in "FreeBSD 11.0", so I put a compilation environment under this version, and compilation to work.
    I therefore conclude that the development team forgot to add a "BRANCH RELENG_2_4_0" on this repository:

    The "Main repository for pfSense" is also unusable because it refers to a "BRANCH" that is missing:

    Can someone tell us about this omission ?

    Thank you !

Log in to reply