Re: vbox cannot find headers, although they are installed

2018-01-09 Thread Curt
On 2018-01-07, Harry Putnam  wrote:
>
> Building the main Guest Additions module ...fail!
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
> Doing non-kernel setup of the Guest Additions ...done.
>

You have performed

 apt-get install build-essential module-assistant

and

 m-a prepare

as suggested by virtualboxes.org?

-- 
"Ruling a large nation is like cooking a small fish" - Lao Tzu




Re: vbox cannot find headers, although they are installed

2018-01-08 Thread Mike Kupfer
Harry Putnam wrote:

> root # bash ./VBoxLinuxAdditions.run 
> Verifying archive integrity... All good.
> Uncompressing VirtualBox 5.0.40 Guest Additions for Linux

5.0.40 is pretty old, and Googling for "virtualbox linux 4.14 guest"
shows a couple reports about the Guest Additions not building with a
4.14 kernel.  Try the latest 5.2.x GA.

mike



Re: vbox cannot find headers, although they are installed

2018-01-08 Thread Harry Putnam
Eike Lantzsch  writes:

> On Saturday, January 6, 2018 8:36:38 PM -03 Harry Putnam wrote:
>> Having a problem getting the vbox guest additions on a `testing'
>> install to allow for larger monitor resolution.
>> 
>> When I attempt to install the additions the ouput says it cannot find
>> the headers for the running kernel.
>> 
>> I have checked, rechecked and reinstalled the headers but still get
>> the message that they cannot be found and the kernel module build then
>> fails.
>> 
>> (Note: All debian systems mentioned below are running as guests on an
>> `openindiana' (a solaris offshoot) host)
>> 
>> (Full output of attempted guest additions install are at the end)
>> 
>> But briefly . . . .
>> 


Harry wrote:

>> >From the host with the failure:
>>   uname -r 4.14.0-2-amd64

Eike responded:

> This is not Stretch? Stretch is still with 4.9.0-5-amd64.

I overlooked your comment above in my previous response

Sorry I wasn't clear... but I did indicate in OP that the problem is
on a `testing' host:

Harry wrote in OP... first lines

,
|   Having a problem getting the vbox guest additions on a `testing'
|   ^^^  
|   install to allow for larger monitor resolution.
`

I went on to say that I am running two `stretch' hosts that did not
display this problem... even though all hosts have the proper header
files installed.




Re: vbox cannot find headers, although they are installed

2018-01-08 Thread Harry Putnam
Eike Lantzsch  writes:

Harry wrote:
>> What am I missing?
>
Eike Replied:
> Did you by any chance install a kernel higher than 4.14.0-2 to check it out, 
> then went back to 4.14.0-2 or installed 4.14.0 and then went back to 4.9.0?
> In that case VBox is most probably still looking for the headers of the 
> higher 
> kernel version and cannot find them. I ran into that problem before.
> In that case you will have to deinstall VBox completely and install it again. 
> You can retain the virtual installations and later incorporate them into VBox 
> again.

No, I've only ever installed kernels when an upgrade included a new
one... that is what happened in this case to get to 4.14*.


Is it possible that Debian just doesn't know where to look for the
header files?

Seems unlikely since two `stretch' systems, following a full-upgrade
had no such problems even though new kernels were installed as part of
that upgrade.

I see notations regarding more than one error in the full log output I
posted in this thread... but am not savvy enough to know what they
mean.

Early on:

,
| grep: /lib/modules/4.14.0-2-amd64/build/include/linux/version.h: No such file 
or directory
| make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.14.0-2-amd64/build 
SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
| make -C /usr/src/linux-headers-4.14.0-2-amd64 
KBUILD_SRC=/usr/src/linux-headers-4.14.0-2-common \
| -f /usr/src/linux-headers-4.14.0-2-common/Makefile modules
| test -e include/generated/autoconf.h -a -e include/config/auto.conf || (  
\
| echo >&2; \
| echo >&2 "  ERROR: Kernel configuration is invalid."; \
| echo >&2 " include/generated/autoconf.h or include/config/auto.conf 
are missing.";\
| echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix 
it.";\
| echo >&2 ;\
| /bin/false)
|
| [...]
`


and then at the end:

,
| [...]
| 
| /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:313:47: error: implicit 
declaration of function ‘set_pages_x’; did you mean ‘get_page’? 
[-Werror=implicit-function-declaration]
|  # define MY_SET_PAGES_EXEC(pPages, cPages)set_pages_x(pPages, cPages)
|^
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:444:13: note: in expansion of 
macro ‘MY_SET_PAGES_EXEC’
|  MY_SET_PAGES_EXEC(&paPages[iPage], 1);
|  ^
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c: In function 
‘VBoxGuest_RTMemContFree’:
| /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:314:47: error: implicit 
declaration of function ‘set_pages_nx’; did you mean ‘set_page_node’? 
[-Werror=implicit-function-declaration]
|  # define MY_SET_PAGES_NOEXEC(pPages, cPages)  set_pages_nx(pPages, cPages)
|^
| /tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.c:492:13: note: in expansion of 
macro ‘MY_SET_PAGES_NOEXEC’
|  MY_SET_PAGES_NOEXEC(&paPages[iPage], 1);
|  ^~~
| cc1: some warnings being treated as errors
| /usr/src/linux-headers-4.14.0-2-common/scripts/Makefile.build:319: recipe for 
target '/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o' failed
| make[4]: *** [/tmp/vbox.0/r0drv/linux/alloc-r0drv-linux.o] Error 1
| /usr/src/linux-headers-4.14.0-2-common/Makefile:1522: recipe for target 
'_module_/tmp/vbox.0' failed
| make[3]: *** [_module_/tmp/vbox.0] Error 2
| Makefile:146: recipe for target 'sub-make' failed
| make[2]: *** [sub-make] Error 2
| Makefile:8: recipe for target 'all' failed
| make[1]: *** [all] Error 2
| /tmp/vbox.0/Makefile.include.footer:79: recipe for target 'vboxguest' failed
| make: *** [vboxguest] Error 2
| Creating user for the Guest Additions.
| Creating udev rule for the Guest Additions kernel module.
`

Any help on what those indicate needs doing?



Re: vbox cannot find headers, although they are installed

2018-01-07 Thread Eike Lantzsch
On Saturday, January 6, 2018 8:36:38 PM -03 Harry Putnam wrote:
> Having a problem getting the vbox guest additions on a `testing'
> install to allow for larger monitor resolution.
> 
> When I attempt to install the additions the ouput says it cannot find
> the headers for the running kernel.
> 
> I have checked, rechecked and reinstalled the headers but still get
> the message that they cannot be found and the kernel module build then
> fails.
> 
> (Note: All debian systems mentioned below are running as guests on an
> `openindiana' (a solaris offshoot) host)
> 
> (Full output of attempted guest additions install are at the end)
> 
> But briefly . . . .
> 
> >From the host with the failure:
>   uname -r 4.14.0-2-amd64
This is not Stretch? Stretch is still with 4.9.0-5-amd64.
> 
>   aptitude search headers |grep ^i
> 
>   i  linux-headers-4.14.0-2-amd64 - Header files for Linux 4.14.0-2-amd64
>   i A linux-headers-4.14.0-2-common - Common header files for Linux 4.14.0-2
> 
> ,
> 
> | On two other debian systems (both running stretch, not `testing')
> | everything works as expected and the kernel module build succeeds...
> | monitor settings then act accordingly.
> | 
> | From 2 stretch hosts:
> | Of course, it is a different kernel and headers (4.9.0-5-amd64) on the
> | `stretch' systems and with like named header files.
> | 
> |   i A linux-headers-4.9.0-5-common
> |   i A linux-headers-4.9.0-5-amd64
> | 
> | With those in place on the stretch systems the guest additions build
> | just like they should.
> 
> `
> 
> What am I missing?

Did you by any chance install a kernel higher than 4.14.0-2 to check it out, 
then went back to 4.14.0-2 or installed 4.14.0 and then went back to 4.9.0?
In that case VBox is most probably still looking for the headers of the higher 
kernel version and cannot find them. I ran into that problem before.
In that case you will have to deinstall VBox completely and install it again. 
You can retain the virtual installations and later incorporate them into VBox 
again.
Cheers
Eike

> 
> =
> 
> Terminal output from attempting install of guest additions
> =
> 
> [Did not post the full log referred to in the output below... it is
> very long... but I can post it if necessary]
> 
> root # bash ./VBoxLinuxAdditions.run
> Verifying archive integrity... All good.
> Uncompressing VirtualBox 5.0.40 Guest Additions for Linux
> VirtualBox Guest Additions installer
> Removing installed version 5.0.40 of VirtualBox Guest Additions...
> Removing existing VirtualBox non-DKMS kernel modules ...done.
> update-initramfs: Generating /boot/initrd.img-4.14.0-2-amd64
> Copying additional installer modules ...
> Installing additional modules ...
> Removing existing VirtualBox non-DKMS kernel modules ...done.
> Building the VirtualBox Guest Additions kernel modules
> The headers for the current running kernel were not found. If the following
> module compilation fails then this could be the reason.
> 
> Building the main Guest Additions module ...fail!
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
> Doing non-kernel setup of the Guest Additions ...done.



Re: vbox cannot find headers, although they are installed

2018-01-07 Thread Harry Putnam
"x9p"  writes:

> On Sat, January 6, 2018 11:36 pm, Harry Putnam wrote:
> ...
>> (Look at /var/log/vboxadd-install.log to find out what went wrong)
> ...
>
> the line above can explain a lot.

Looked at that for some length before posting... it didn't explain
dodo to me... didn't understand what I was reading,  maybe it will to you:

grep: /lib/modules/4.14.0-2-amd64/build/include/linux/version.h: No such file 
or directory
make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/4.14.0-2-amd64/build 
SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
make -C /usr/src/linux-headers-4.14.0-2-amd64 
KBUILD_SRC=/usr/src/linux-headers-4.14.0-2-common \
-f /usr/src/linux-headers-4.14.0-2-common/Makefile modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
\
echo >&2;   \
echo >&2 "  ERROR: Kernel configuration is invalid.";   \
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are 
missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix 
it.";  \
echo >&2 ;  \
/bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f /usr/src/linux-headers-4.14.0-2-common/scripts/Makefile.build 
obj=/tmp/vbox.0
   gcc-7 -Wp,-MD,/tmp/vbox.0/.VBoxGuest-linux.o.d  -nostdinc -isystem 
/usr/lib/gcc/x86_64-linux-gnu/7/include 
-I/usr/src/linux-headers-4.14.0-2-common/arch/x86/include 
-I./arch/x86/include/generated  
-I/usr/src/linux-headers-4.14.0-2-common/include -I./include 
-I/usr/src/linux-headers-4.14.0-2-common/arch/x86/include/uapi 
-I./arch/x86/include/generated/uapi 
-I/usr/src/linux-headers-4.14.0-2-common/include/uapi 
-I./include/generated/uapi -include 
/usr/src/linux-headers-4.14.0-2-common/include/linux/kconfig.h  -I/tmp/vbox.0 
-I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -fshort-wchar 
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE 
-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 
-falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 
-mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time 
-DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 
-DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 
-DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 
-DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare 
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks 
-Wno-frame-address -Wno-format-truncation -Wno-format-overflow 
-Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 
-DCC_HAVE_ASM_GOTO -Wframe-larger-than=2048 -fstack-protector-strong 
-Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer 
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -pg -mfentry 
-DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign 
-fno-strict-overflow -fconserve-stack -Werror=implicit-int 
-Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types 
-Werror=designated-init -Wno-declaration-after-statement -include 
/tmp/vbox.0/include/VBox/VBoxGuestMangling.h -fno-pie  
-I/lib/modules/4.14.0-2-amd64/build/include  -I/tmp/vbox.0/  
-I/tmp/vbox.0/include  -I/tmp/vbox.0/r0drv/linux  -I/tmp/vbox.0/vboxguest/  
-I/tmp/vbox.0/vboxguest/include  -I/tmp/vbox.0/vboxguest/r0drv/linux 
-D__KERNEL__ -DMODULE -DVBOX -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_GUEST 
-DIN_GUEST_R0 -DIN_MODULE -DRT_WITH_VBOX -DVBGL_VBOXGUEST -DVBOX_WITH_HGCM 
-DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  
-DKBUILD_BASENAME='"VBoxGuest_linux"'  -DKBUILD_MODNAME='"vboxguest"' -c -o 
/tmp/vbox.0/.tmp_VBoxGuest-linux.o /tmp/vbox.0/VBoxGuest-linux.c
  if [ "-pg" = "-pg" ]; then if [ /tmp/vbox.0/VBoxGuest-linux.o != 
"scripts/mod/empty.o" ]; then ./scripts/recordmcount  
"/tmp/vbox.0/VBoxGuest-linux.o"; fi; fi;
   gcc-7 -Wp,-MD,/tmp/vbox.0/.VBoxGuest.o.d  -nostdinc -isystem 
/usr/lib/gcc/x86_64-linux-gnu/7/include 
-I/usr/src/linux-headers-4.14.0-2-common/arch/x86/include 
-I./arch/x86/include/generated  
-I/usr/src/linux-headers-4.14.0-2-common/include -I./include 
-I/usr/src/linux-headers-4.14.0-2-common/arch/x86/include/uapi 
-I./arch/x86/include/generated/uapi 
-I/usr/src/linux-headers-4.14.0-2-common/include/uapi 
-I./include/generated/uapi -include 
/usr/src/linux-headers-4.14.0-2-common/include/linux/kconfig.h  -I/tmp/vbox.0 
-I/tmp/vbox.0 -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs 
-fno-strict-aliasing -fno-common -fshort-wchar 
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE 
-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 
-falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 
-mskip-rax-setup -mtune=gener

Re: vbox cannot find headers, although they are installed

2018-01-07 Thread x9p

On Sat, January 6, 2018 11:36 pm, Harry Putnam wrote:
...
> (Look at /var/log/vboxadd-install.log to find out what went wrong)
...

the line above can explain a lot.

cheers.

--
x9p | PGP : 0x03B50AF5EA4C8D80 / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 
E7EE

"I don't know where I'm going from here, but I promise it won't be boring." - 
David Bowie




vbox cannot find headers, although they are installed

2018-01-06 Thread Harry Putnam
Having a problem getting the vbox guest additions on a `testing'
install to allow for larger monitor resolution.

When I attempt to install the additions the ouput says it cannot find
the headers for the running kernel.

I have checked, rechecked and reinstalled the headers but still get
the message that they cannot be found and the kernel module build then
fails.

(Note: All debian systems mentioned below are running as guests on an
`openindiana' (a solaris offshoot) host)

(Full output of attempted guest additions install are at the end)

But briefly . . . . 
>From the host with the failure:

  uname -r 4.14.0-2-amd64

  aptitude search headers |grep ^i

  i  linux-headers-4.14.0-2-amd64 - Header files for Linux 4.14.0-2-amd64
  i A linux-headers-4.14.0-2-common - Common header files for Linux 4.14.0-2

,
| On two other debian systems (both running stretch, not `testing') everything 
works as
| expected and the kernel module build succeeds... monitor settings then
| act accordingly.
| 
| From 2 stretch hosts:
| Of course, it is a different kernel and headers (4.9.0-5-amd64) on the
| `stretch' systems and with like named header files.
| 
|   i A linux-headers-4.9.0-5-common
|   i A linux-headers-4.9.0-5-amd64
| 
| With those in place on the stretch systems the guest additions build
| just like they should.
`

What am I missing?

=

Terminal output from attempting install of guest additions
=

[Did not post the full log referred to in the output below... it is
very long... but I can post it if necessary]

root # bash ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.40 Guest Additions for Linux
VirtualBox Guest Additions installer
Removing installed version 5.0.40 of VirtualBox Guest Additions...
Removing existing VirtualBox non-DKMS kernel modules ...done.
update-initramfs: Generating /boot/initrd.img-4.14.0-2-amd64
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.