Re: Virtualbox kernel module on 11-CURRENT

2016-06-20 Thread Julian Elischer

On 8/06/2016 5:13 AM, Kevin Oberman wrote:

On Tue, Jun 7, 2016 at 1:04 AM, Guido Falsi  wrote:


On 06/07/16 02:23, Rafael Rodrigues Nakano wrote:

Hello,

I tried installing virtualbox from packages, building it from sources,
trying the GENERIC kernel but everytime I can't start the kernel module
'vboxdrv', it says:
"KLD vboxdrv.ko: depends on kernel - not available or version mismatch.
linker_load_file: Unsupported file type"


The virtualbox module needs to be in full sync with the kernel. Most
probably the sources being used by the cluster for building packages on
head are a little different from yours, so the kernel module is not in
sync.

You will need to build the kernel module yourself to actually match your
kernel sources.

It's not really a problem or a bug, it's how it works. On head there is
no warranty about the KBI. This cannot happen on releases and stable
because the KBI is not going to change there.

--
Guido Falsi 


I don't think this is true. While shareable libraries have fixed ABIs, I
believe the KBI can change even in STABLE branches.  If a security fix
requires it, it might even change in a RELEASE. I my be wrong about this,
but I recall having to re-build the VB kmod port even withing a minor
version (i.e. STABLE).


We try hard NOT to change the KBI within a single stable branch.
we do things like add spare fields before we make a new stable branch 
to help with this.



In any case, I do strongly recommend the use of PORTS_MODULES in
/etc/src.conf to assure that the kernel modules always get re-built when
the kernel is re-built. so that the sources, the kernel, and the module are
in sync. The PORTS_MODULES are re-installed as a part of the "make
installkernel", so things are almost safe, but beware of "make
reinstallkernel" as it does not do the right thing. (See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201779)
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"



___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Fwd: Virtualbox kernel module on 11-CURRENT

2016-06-08 Thread Rafael Rodrigues Nakano
Thanks for the replies,

Is there a specific option which needs to be enabled in the kernel config
file to make softwares like virtualbox run properly? I installed a new
kernel before building and installing virtualbox-ose (and -kmod), which I
enabled very few things (only hardware that I have and options/stuff I use
everyday)
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Virtualbox kernel module on 11-CURRENT

2016-06-08 Thread Guido Falsi
On 06/07/16 23:13, Kevin Oberman wrote:
> On Tue, Jun 7, 2016 at 1:04 AM, Guido Falsi  > wrote:
> 
> On 06/07/16 02:23, Rafael Rodrigues Nakano wrote:
> > Hello,
> >
> > I tried installing virtualbox from packages, building it from sources,
> > trying the GENERIC kernel but everytime I can't start the kernel
> module
> > 'vboxdrv', it says:
> > "KLD vboxdrv.ko: depends on kernel - not available or version
> mismatch.
> > linker_load_file: Unsupported file type"
> >
> 
> The virtualbox module needs to be in full sync with the kernel. Most
> probably the sources being used by the cluster for building packages on
> head are a little different from yours, so the kernel module is not
> in sync.
> 
> You will need to build the kernel module yourself to actually match your
> kernel sources.
> 
> It's not really a problem or a bug, it's how it works. On head there is
> no warranty about the KBI. This cannot happen on releases and stable
> because the KBI is not going to change there.
> 
> --
> Guido Falsi mailto:m...@madpilot.net>>
> 
> 
> I don't think this is true. While shareable libraries have fixed ABIs, I
> believe the KBI can change even in STABLE branches.  If a security fix
> requires it, it might even change in a RELEASE. I my be wrong about
> this, but I recall having to re-build the VB kmod port even withing a
> minor version (i.e. STABLE).

I'm unable to find a final statement about KBI stability, but freezing
it is an essential step in the new major release schedule:

https://www.freebsd.org/releases/11.0R/schedule.html

(KBI freeze begins  24 June 2016)

If the promise has not been maintained in the past it's a sad event and
a mistake, but the promise is still valid in it's intent.

BTW at present the cluster building packages for 10.x is running on
10.1, so the kernel modules built by it are built on 10.1 and will work
on 10.3. This would be impossible without KBI being frozen.

Mistakes do happen unluckily.

> 
> In any case, I do strongly recommend the use of PORTS_MODULES in
> /etc/src.conf to assure that the kernel modules always get re-built when
> the kernel is re-built. so that the sources, the kernel, and the module
> are in sync. The PORTS_MODULES are re-installed as a part of the "make
> installkernel", so things are almost safe, but beware of "make
> reinstallkernel" as it does not do the right thing. (See
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201779)

Yes leveraging PORTS_MODULES is a good solution, although I don't like
mixing the system build process with the port one so I prefer manually
doing the modules part.

-- 
Guido Falsi 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Virtualbox kernel module on 11-CURRENT

2016-06-07 Thread Kevin Oberman
On Tue, Jun 7, 2016 at 1:04 AM, Guido Falsi  wrote:

> On 06/07/16 02:23, Rafael Rodrigues Nakano wrote:
> > Hello,
> >
> > I tried installing virtualbox from packages, building it from sources,
> > trying the GENERIC kernel but everytime I can't start the kernel module
> > 'vboxdrv', it says:
> > "KLD vboxdrv.ko: depends on kernel - not available or version mismatch.
> > linker_load_file: Unsupported file type"
> >
>
> The virtualbox module needs to be in full sync with the kernel. Most
> probably the sources being used by the cluster for building packages on
> head are a little different from yours, so the kernel module is not in
> sync.
>
> You will need to build the kernel module yourself to actually match your
> kernel sources.
>
> It's not really a problem or a bug, it's how it works. On head there is
> no warranty about the KBI. This cannot happen on releases and stable
> because the KBI is not going to change there.
>
> --
> Guido Falsi 
>

I don't think this is true. While shareable libraries have fixed ABIs, I
believe the KBI can change even in STABLE branches.  If a security fix
requires it, it might even change in a RELEASE. I my be wrong about this,
but I recall having to re-build the VB kmod port even withing a minor
version (i.e. STABLE).

In any case, I do strongly recommend the use of PORTS_MODULES in
/etc/src.conf to assure that the kernel modules always get re-built when
the kernel is re-built. so that the sources, the kernel, and the module are
in sync. The PORTS_MODULES are re-installed as a part of the "make
installkernel", so things are almost safe, but beware of "make
reinstallkernel" as it does not do the right thing. (See
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201779)
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkober...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Virtualbox kernel module on 11-CURRENT

2016-06-07 Thread Ngie Cooper

> On Jun 7, 2016, at 01:04, Guido Falsi  wrote:
> 
>> On 06/07/16 02:23, Rafael Rodrigues Nakano wrote:
>> Hello,
>> 
>> I tried installing virtualbox from packages, building it from sources,
>> trying the GENERIC kernel but everytime I can't start the kernel module
>> 'vboxdrv', it says:
>> "KLD vboxdrv.ko: depends on kernel - not available or version mismatch.
>> linker_load_file: Unsupported file type"
> 
> The virtualbox module needs to be in full sync with the kernel. Most
> probably the sources being used by the cluster for building packages on
> head are a little different from yours, so the kernel module is not in sync.
> 
> You will need to build the kernel module yourself to actually match your
> kernel sources.
> 
> It's not really a problem or a bug, it's how it works. On head there is
> no warranty about the KBI. This cannot happen on releases and stable
> because the KBI is not going to change there.

Look for "PORTS_MODULES" (case sensitive) in "man 5 src.conf". I think that was 
the variable name for building ports during buildkernel and installing via 
installkernel. It's been a while though and it's harder to search for it on my 
smartphone..

Cheers,
-Ngie

> -- 
> Guido Falsi 
> ___
> freebsd-current@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: Virtualbox kernel module on 11-CURRENT

2016-06-07 Thread Guido Falsi
On 06/07/16 02:23, Rafael Rodrigues Nakano wrote:
> Hello,
> 
> I tried installing virtualbox from packages, building it from sources,
> trying the GENERIC kernel but everytime I can't start the kernel module
> 'vboxdrv', it says:
> "KLD vboxdrv.ko: depends on kernel - not available or version mismatch.
> linker_load_file: Unsupported file type"
> 

The virtualbox module needs to be in full sync with the kernel. Most
probably the sources being used by the cluster for building packages on
head are a little different from yours, so the kernel module is not in sync.

You will need to build the kernel module yourself to actually match your
kernel sources.

It's not really a problem or a bug, it's how it works. On head there is
no warranty about the KBI. This cannot happen on releases and stable
because the KBI is not going to change there.

-- 
Guido Falsi 
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Virtualbox kernel module on 11-CURRENT

2016-06-06 Thread Rafael Rodrigues Nakano
Hello,

I tried installing virtualbox from packages, building it from sources,
trying the GENERIC kernel but everytime I can't start the kernel module
'vboxdrv', it says:
"KLD vboxdrv.ko: depends on kernel - not available or version mismatch.
linker_load_file: Unsupported file type"

I'm using a custom kernel which I only turned off options for wireless and
old drives, but the module is not working even with GENERIC.

My sources in /usr/src are up-to-date and I tried building
virtualbox-ose-kmod from ports (maybe it could use my sources) but no
success. Is this a known problem?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"