VirtualBox

Opened 5 years ago

Closed 5 years ago

#18917 closed defect (fixed)

VBox 6.0.10 GAs fail to compile on Red Hat/CentOS/OL 7.7; also Red Hat 8.1 Beta => fixed in SVN/6.0.x/5.2.x

Reported by: paulson Owned by: paulson
Component: guest additions Version: VirtualBox 6.0.12
Keywords: Cc:
Guest type: Linux Host type: all

Description

As discussed in the forums:

Guest Additions 6.0.10 will not compile in RHEL 7.7 https://forums.virtualbox.org/viewtopic.php?f=3&t=94218&start=15

The VirtualBox Guest Additions require further updates to accommodate the latest kernel changes specific to Red Hat 7.7 and 8.1 Beta.

Change History (4)

comment:1 by paulson, 5 years ago

Status: newaccepted

comment:2 by paulson, 5 years ago

The Guest Additions build failures as seen on OL 7.7:

=== Building 'vboxvideo' module ===
make[1]: Entering directory `/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo'
make V= CONFIG_MODULE_SIG= -C /lib/modules/3.10.0-1062.1.1.el7.x86_64/build M=/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo SRCROOT=/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo -j1 modules
make[2]: Entering directory `/usr/src/kernels/3.10.0-1062.1.1.el7.x86_64'
  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/hgsmi_base.o
In file included from g/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/hgsmi_base.c:27:0g:
g/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:187:31:g error: field ‘mem_global_ref’ has incomplete type
   struct drm_global_reference mem_global_ref;
                               ^
g/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:188:28:g error: field ‘bo_global_ref’ has incomplete type
   struct ttm_bo_global_ref bo_global_ref;
                            ^
make[3]: *** [/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/hgsmi_base.o] Error 1
make[2]: *** [_module_/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo] Error 2
make[2]: Leaving directory `/usr/src/kernels/3.10.0-1062.1.1.el7.x86_64'
make[1]: *** [vboxvideo] Error 2
make[1]: Leaving directory `/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo'
make: *** [vboxvideo] Error 1

  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_main.o
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_main.c:605:13: error: static declaration of ‘ttm_bo_put’ follows non-static declaration
 static void ttm_bo_put(struct ttm_buffer_object *bo)
             ^
In file included from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:108:0,
                 from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_main.c:31:
include/drm/ttm/ttm_bo_api.h:387:6: note: previous declaration of ‘ttm_bo_put’ was here
 void ttm_bo_put(struct ttm_buffer_object *bo);
      ^
make[3]: *** [/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_main.o] Error 1
make[2]: *** [_module_/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo] Error 2

  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.o
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.c: In function ‘vbox_set_edid’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.c:542:2: error: implicit declaration of function ‘drm_mode_connector_update_edid_property’ [-Werror=implicit-function-declaration]
  drm_mode_connector_update_edid_property(connector, (struct edid *)edid);
  ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.c: In function ‘vbox_connector_init’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.c:717:2: error: implicit declaration of function ‘drm_mode_connector_attach_encoder’ [-Werror=implicit-function-declaration]
  drm_mode_connector_attach_encoder(connector, encoder);
  ^
cc1: some warnings being treated as errors
make[3]: *** [/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.o] Error 1
make[2]: *** [_module_/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo] Error 2

  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.o
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:46:44:warning: ‘struct drm_global_reference’ declared inside parameter list [enabled by default]
 static int vbox_ttm_mem_global_init(struct drm_global_reference *ref)
                                            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:46:44:warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: In function ‘vbox_ttm_mem_global_init’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:48:32:error: dereferencing pointer to incomplete type
  return ttm_mem_global_init(ref->object);
                                ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: At top level:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:51:48:warning: ‘struct drm_global_reference’ declared inside parameter list [enabled by default]
 static void vbox_ttm_mem_global_release(struct drm_global_reference *ref)
                                                ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: In function ‘vbox_ttm_mem_global_release’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:53:28:error: dereferencing pointer to incomplete type
  ttm_mem_global_release(ref->object);
                            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: In function ‘vbox_ttm_global_init’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:65:25:error: ‘struct <anonymous>’ has no member named ‘mem_global_ref’
  global_ref = &vbox->ttm.mem_global_ref;
                         ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:66:12:error: dereferencing pointer to incomplete type
  global_ref->global_type = DRM_GLOBAL_TTM_MEM;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:66:28:error: ‘DRM_GLOBAL_TTM_MEM’ undeclared (first use in this function)
  global_ref->global_type = DRM_GLOBAL_TTM_MEM;
                            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:66:28:note: each undeclared identifier is reported only once for each function it appears in
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:67:12:error: dereferencing pointer to incomplete type
  global_ref->size = sizeof(struct ttm_mem_global);
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:68:12:error: dereferencing pointer to incomplete type
  global_ref->init = &vbox_ttm_mem_global_init;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:69:12:error: dereferencing pointer to incomplete type
  global_ref->release = &vbox_ttm_mem_global_release;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:70:2:error: implicit declaration of function ‘drm_global_item_ref’ [-Werror=implicit-function-declaration]
  ret = drm_global_item_ref(global_ref);
  ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:76:11:error: ‘struct <anonymous>’ has no member named ‘bo_global_ref’
  vbox->ttm.bo_global_ref.mem_glob = vbox->ttm.mem_global_ref.object;
           ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:76:46:error: ‘struct <anonymous>’ has no member named ‘mem_global_ref’
  vbox->ttm.bo_global_ref.mem_glob = vbox->ttm.mem_global_ref.object;
                                              ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:78:25:error: ‘struct <anonymous>’ has no member named ‘bo_global_ref’
  global_ref = &vbox->ttm.bo_global_ref.ref;
                         ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:79:12:error: dereferencing pointer to incomplete type
  global_ref->global_type = DRM_GLOBAL_TTM_BO;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:79:28:error: ‘DRM_GLOBAL_TTM_BO’ undeclared (first use in this function)
  global_ref->global_type = DRM_GLOBAL_TTM_BO;
                            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:80:12:error: dereferencing pointer to incomplete type
  global_ref->size = sizeof(struct ttm_bo_global);
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:81:12:error: dereferencing pointer to incomplete type
  global_ref->init = &ttm_bo_global_init;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:81:22:error: ‘ttm_bo_global_init’ undeclared (first use in this function)
  global_ref->init = &ttm_bo_global_init;
                      ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:82:12:error: dereferencing pointer to incomplete type
  global_ref->release = &ttm_bo_global_release;
            ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:82:25:error: ‘ttm_bo_global_release’ undeclared (first use in this function)
  global_ref->release = &ttm_bo_global_release;
                         ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:88:3:error: implicit declaration of function ‘drm_global_item_unref’ [-Werror=implicit-function-declaration]
   drm_global_item_unref(&vbox->ttm.mem_global_ref);
   ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:88:35:error: ‘struct <anonymous>’ has no member named ‘mem_global_ref’
   drm_global_item_unref(&vbox->ttm.mem_global_ref);
                                   ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: In function ‘vbox_ttm_global_release’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:1:34:error: ‘struct <anonymous>’ has no member named ‘bo_global_ref’
  drm_global_item_unref(&vbox->ttm.bo_global_ref.ref);
                                  ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:102:34:error: ‘struct <anonymous>’ has no member named ‘mem_global_ref’
  drm_global_item_unref(&vbox->ttm.mem_global_ref);
                                  ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c: In function ‘vbox_mm_init’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:303:15:error: ‘struct <anonymous>’ has no member named ‘bo_global_ref’
      vbox->ttm.bo_global_ref.ref.object,
               ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:310:6:warning: passing argument 3 of ‘ttm_bo_device_init’ from incompatible pointer type [enabled by default]
      DRM_FILE_PAGE_OFFSET, true);
      ^
In file included from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:109:0,
                 from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_driver.h:587:5:note: expected ‘struct address_space *’ but argument is of type ‘struct ttm_bo_driver *’
 int ttm_bo_device_init(struct ttm_bo_device *bdev,
     ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:310:6:warning: passing argument 4 of ‘ttm_bo_device_init’ makes integer from pointer without a cast [enabled by default]
      DRM_FILE_PAGE_OFFSET, true);
      ^
In file included from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:109:0,
                 from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_driver.h:587:5:note: expected ‘uint64_t’ but argument is of type ‘struct address_space *’
 int ttm_bo_device_init(struct ttm_bo_device *bdev,
     ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:310:6:error: too many arguments to function ‘ttm_bo_device_init’
      DRM_FILE_PAGE_OFFSET, true);
      ^
In file included from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.h:109:0,
                 from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.c:31:
include/drm/ttm/ttm_bo_driver.h:587:5:note: declared here
 int ttm_bo_device_init(struct ttm_bo_device *bdev,
     ^
cc1: some warnings being treated as errors
make[3]: *** [/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_ttm.o] Error 1
make[2]: *** [_module_/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo] Error 2
make[2]: Leaving directory `/usr/src/kernels/3.10.0-1062.1.1.el7.x86_64'
make[1]: *** [vboxvideo] Error 2
make[1]: Leaving directory `/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo'
make: *** [vboxvideo] Error 1

comment:3 by paulson, 5 years ago

The additional errors from Red Hat 8.1 Beta are primarily as follows:

=== Building 'vboxguest' module ===
make[1]: Entering directory '/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest'
make V= CONFIG_MODULE_SIG= -C /lib/modules/4.18.0-107.el8.x86_64/build M=/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest SRCROOT=/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest -j4 modules
make[2]: Entering directory '/usr/src/kernels/4.18.0-107.el8.x86_64'
  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest/combined-os-specific.o
In file included from /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest/combined-os-specific.c:34:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest/r0drv/linux/memuserkernel-r0drv-linux.c: In function ‘VBoxGuest_RTR0MemUserIsValidAddr’:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest/r0drv/linux/memuserkernel-r0drv-linux.c:72:55: error: macro "access_ok" passed 3 arguments, but takes just 2
     bool fRc = access_ok(VERIFY_READ, (void *)R3Ptr, 1);
                                                       ^
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxguest/r0drv/linux/memuserkernel-r0drv-linux.c:72:16: error: ‘access_ok’ undeclared (first use in this function)
     bool fRc = access_ok(VERIFY_READ, (void *)R3Ptr, 1);
                ^~~~~~~~~

  CC [M]  /opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_mode.o
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.c: At top level:
/opt/VBoxGuestAdditions-6.0.97/src/vboxguest-6.0.97/vboxvideo/vbox_drv.c:307:6: error: ‘DRIVER_IRQ_SHARED’ undeclared here (not in a function); did you mean ‘TIMER_IRQSAFE’?
 #endif
      ^
      TIMER_IRQSAFE

comment:4 by paulson, 5 years ago

Resolution: fixed
Status: acceptedclosed
Summary: VBox 6.0.10 GAs fail to compile on Red Hat/CentOS/OL 7.7; also Red Hat 8.1 BetaVBox 6.0.10 GAs fail to compile on Red Hat/CentOS/OL 7.7; also Red Hat 8.1 Beta => fixed in SVN/6.0.x/5.2.x

This has been fixed in trunk and the fix has also been backported to VirtualBox 6.0.x (x > 12) and 5.2.x (x > 32). The fix is also available in any 6.0.x Testbuilds with a revision >= r133264 or any 5.2.x Testbuilds with a revision >= r133285.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette