Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Monday, 17 December 2018

Unable to compile VirtualBox Guest Additions on CentOS kernel version 3.10.0-957

The Guest Additions for VirtualBox fail to be built on the kernel released on November 12th 2018, version 3.10.0-957 for CentOS 7.

After upgrading the kernel from 3.10.0-862 the compilation of the Guest Additions' modules generates the following errors:

Building the graphics driver module.
Error building the module.  Build output follows.
make V=1 CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-957.1.3.el7.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 -j2 modules
make[1]: warning: -jN forced in submake: disabling jobserver mode.
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/*
...
/tmp/vbox.0/vbox_mode.c: In function ‘vbox_best_single_encoder’:
/tmp/vbox.0/vbox_mode.c:358:3: warning: passing argument 2 of ‘drm_encoder_find’ makes pointer from integer without a cast [enabled by default]
   return drm_encoder_find(connector->dev, enc_id);
   ^
In file included from /tmp/vbox.0/vbox_drv.h:89:0,
                 from /tmp/vbox.0/vbox_mode.c:35:
include/drm/drm_encoder.h:221:35: note: expected ‘struct drm_file *’ but argument is of type ‘int’
 static inline struct drm_encoder *drm_encoder_find(struct drm_device *dev,
                                   ^
/tmp/vbox.0/vbox_mode.c:358:3: error: too few arguments to function ‘drm_encoder_find’
   return drm_encoder_find(connector->dev, enc_id);
   ^
In file included from /tmp/vbox.0/vbox_drv.h:89:0,
                 from /tmp/vbox.0/vbox_mode.c:35:
include/drm/drm_encoder.h:221:35: note: declared here
 static inline struct drm_encoder *drm_encoder_find(struct drm_device *dev,
                                   ^
make[2]: *** [/tmp/vbox.0/vbox_mode.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_ttm_tt_create’:
/tmp/vbox.0/vbox_ttm.c:225:2: warning: passing argument 2 of ‘ttm_tt_init’ from incompatible pointer type [enabled by default]
  if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
  ^
In file included from include/drm/ttm/ttm_bo_driver.h:45:0,
                 from /tmp/vbox.0/vbox_drv.h:93,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_tt.h:161:5: note: expected ‘struct ttm_buffer_object *’ but argument is of type ‘struct ttm_bo_device *’
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c:225:2: error: too many arguments to function ‘ttm_tt_init’
  if (ttm_tt_init(tt, bdev, size, page_flags, dummy_read_page)) {
  ^
In file included from include/drm/ttm/ttm_bo_driver.h:45:0,
                 from /tmp/vbox.0/vbox_drv.h:93,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_tt.h:161:5: note: declared here
 int ttm_tt_init(struct ttm_tt *ttm, struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_ttm_tt_populate’:
/tmp/vbox.0/vbox_ttm.c:240:2: error: too few arguments to function ‘ttm_pool_populate’
  return ttm_pool_populate(ttm);
  ^
In file included from /tmp/vbox.0/vbox_ttm.c:32:0:
include/drm/ttm/ttm_page_alloc.h:50:5: note: declared here
 int ttm_pool_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx);
     ^
/tmp/vbox.0/vbox_ttm.c: At top level:
/tmp/vbox.0/vbox_ttm.c:257:2: warning: initialization from incompatible pointer type [enabled by default]
  .ttm_tt_create = vbox_ttm_tt_create,
  ^
/tmp/vbox.0/vbox_ttm.c:257:2: warning: (near initialization for ‘vbox_bo_driver.ttm_tt_create’) [enabled by default]
/tmp/vbox.0/vbox_ttm.c:259:2: warning: initialization from incompatible pointer type [enabled by default]
  .ttm_tt_populate = vbox_ttm_tt_populate,
  ^
/tmp/vbox.0/vbox_ttm.c:259:2: warning: (near initialization for ‘vbox_bo_driver.ttm_tt_populate’) [enabled by default]
/tmp/vbox.0/vbox_ttm.c:272:16: error: ‘ttm_bo_default_io_mem_pfn’ undeclared here (not in a function)
  .io_mem_pfn = ttm_bo_default_io_mem_pfn,
                ^
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_bo_create’:
/tmp/vbox.0/vbox_ttm.c:417:6: warning: passing argument 8 of ‘ttm_bo_init’ makes integer from pointer without a cast [enabled by default]
      NULL, vbox_bo_ttm_destroy);
      ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:544:5: note: expected ‘size_t’ but argument is of type ‘void *’
 int ttm_bo_init(struct ttm_bo_device *bdev, struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c:417:6: warning: passing argument 9 of ‘ttm_bo_init’ makes pointer from integer without a cast [enabled by default]
      NULL, vbox_bo_ttm_destroy);
      ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:544:5: note: expected ‘struct sg_table *’ but argument is of type ‘size_t’
 int ttm_bo_init(struct ttm_bo_device *bdev, struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c:417:6: error: too many arguments to function ‘ttm_bo_init’
      NULL, vbox_bo_ttm_destroy);
      ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:544:5: note: declared here
 int ttm_bo_init(struct ttm_bo_device *bdev, struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_bo_pin’:
/tmp/vbox.0/vbox_ttm.c:452:2: error: too many arguments to function ‘ttm_bo_validate’
  ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
  ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:344:5: note: declared here
 int ttm_bo_validate(struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_bo_unpin’:
/tmp/vbox.0/vbox_ttm.c:486:2: error: too many arguments to function ‘ttm_bo_validate’
  ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
  ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:344:5: note: declared here
 int ttm_bo_validate(struct ttm_buffer_object *bo,
     ^
/tmp/vbox.0/vbox_ttm.c: In function ‘vbox_bo_push_sysram’:
/tmp/vbox.0/vbox_ttm.c:525:2: error: too many arguments to function ‘ttm_bo_validate’
  ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
  ^
In file included from /tmp/vbox.0/vbox_drv.h:92:0,
                 from /tmp/vbox.0/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_api.h:344:5: note: declared here
 int ttm_bo_validate(struct ttm_buffer_object *bo,
     ^
make[2]: *** [/tmp/vbox.0/vbox_ttm.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxvideo] Error 2

I have also attempted to use the beta version 5.2.23, but the Windows device drivers for the VirtualBox devices would not load because of a problem with the drivers' signatures from Oracle.



The only solution I have found so far has been to go back to using kernel version 3.10.0-862.

Thursday, 18 June 2015

Back up my laptop task... even when it's off


I changed my backup software of choice from dejadup to Back In Time a couple of months ago, hoping I could have unattended back ups of two laptops, once a month, even if the laptops were turned off when the time came.

Back In Time uses cron to schedule a task at regular intervals. The problem is, if the laptop is turned off, or suspended when the task is supposed to activate, it never runs.

To work around this problem a second task could be scheduled so that it checks whether the scheduled back up took place, and starts it when it hasn't.

The first thing to check is whether Back In Time offers any way to check the last back up... yeap!

$ backintime --last-snapshot

Back In Time
Version: 1.0.34

Back In Time comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type `backintime --license' for details.

INFO: Mountpoint /tmp/backintime/.../mountpoint is already mounted
SnapshotID: 20150530-212330-282
INFO: Mountpoint /tmp/backintime/.../mountpoint still in use. Keep mounted


Also, we can check the crontab:

$ crontab -l
#Back In Time system entry, this will be edited by the gui:
0 0 1 * * /usr/bin/nice -n 19 /usr/bin/ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1

Now, we need to extract the last date backintime should have run from the crontab.

I can't find an easy way to do this yet...