linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Build failures since 5.4-rc3
@ 2019-10-15 19:09 Larry Finger
  2019-10-15 19:32 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2019-10-15 19:09 UTC (permalink / raw)
  To: Joe Perches, LKML

Joe,

Since commit 294f69e662d1("compiler_attributes.h: Add 'fallthrough' pseudo 
keyword for switch/case use"), builds of VirtualBox are failing with the 
following errors:

  1954s] In file included from 
/usr/src/linux-5.4.0-rc3-1.g2309d7d/include/linux/compiler_types.h:59,
[ 1954s]                  from <command-line>:
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/SUPDrvGip.c: 
In function 'supdrvTscDeltaThread':
[ 1954s] 
/usr/src/linux-5.4.0-rc3-1.g2309d7d/include/linux/compiler_attributes.h:200:41: 
error: expected ')' before '__attribute__'
[ 1954s]   200 | # define fallthrough 
__attribute__((__fallthrough__))
[ 1954s]       |                                         ^~~~~~~~~~~~~
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/iprt/cdefs.h:1169:44: 
note: in expansion of macro 'fallthrough'
[ 1954s]  1169 | # define FALL_THROUGH      __attribute__ ((fallthrough))
[ 1954s]       |                                            ^~~~~~~~~~~
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/iprt/cdefs.h:1176:33: 
note: in expansion of macro 'FALL_THROUGH'
[ 1954s]  1176 | #define RT_FALL_THRU()          FALL_THROUGH
[ 1954s]       |                                 ^~~~~~~~~~~~
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/SUPDrvGip.c:4192:17: 
note: in expansion of macro 'RT_FALL_THRU'
[ 1954s]  4192 |                 RT_FALL_THRU();
[ 1954s]       |                 ^~~~~~~~~~~~
[ 1954s] In file included from 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/VBox/cdefs.h:32,
[ 1954s]                  from 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/SUPDrvInternal.h:37,
[ 1954s]                  from 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/SUPDrvGip.c:33:
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/iprt/cdefs.h:1169:56: 
error: expected identifier or '(' before ')' token
[ 1954s]  1169 | # define FALL_THROUGH      __attribute__ ((fallthrough))
[ 1954s]       |                                                        ^
[ 1954s] 
/home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/iprt/cdefs.h:1176:33: 
note: in expansion of macro 'FALL_THROUGH'
[ 1954s]  1176 | #define RT_FALL_THRU()          FALL_THROUGH
[ 1954s]       |                                 ^~~~~~~~~~~~

I think the internal macros in the Oracle code are correct - at least they 
worked before the patch in question was applied.

I would appreciate any suggestions.

Thanks,

Larry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build failures since 5.4-rc3
  2019-10-15 19:09 Build failures since 5.4-rc3 Larry Finger
@ 2019-10-15 19:32 ` Joe Perches
  2019-10-15 20:27   ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2019-10-15 19:32 UTC (permalink / raw)
  To: Larry Finger, LKML

On Tue, 2019-10-15 at 14:09 -0500, Larry Finger wrote:
> Joe,

Hey Larry.

> Since commit 294f69e662d1("compiler_attributes.h: Add 'fallthrough' pseudo 
> keyword for switch/case use"), builds of VirtualBox are failing with the 
> following errors:
> 
>   1954s] In file included from 
> /usr/src/linux-5.4.0-rc3-1.g2309d7d/include/linux/compiler_types.h:59,
> [ 1954s]                  from <command-line>:
> [ 1954s] 
> /home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/SUPDrvGip.c: 
> In function 'supdrvTscDeltaThread':
> [ 1954s] 
> /usr/src/linux-5.4.0-rc3-1.g2309d7d/include/linux/compiler_attributes.h:200:41: 
> error: expected ')' before '__attribute__'
> [ 1954s]   200 | # define fallthrough 
> __attribute__((__fallthrough__))
> [ 1954s]       |                                         ^~~~~~~~~~~~~
> [ 1954s] 
> /home/abuild/rpmbuild/BUILD/VirtualBox-6.0.12/modules_build_dir/default/vboxdrv/include/iprt/cdefs.h:1169:44: 
> note: in expansion of macro 'fallthrough'
> [ 1954s]  1169 | # define FALL_THROUGH      __attribute__ ((fallthrough))

Looks like this should be:

#define FALL_THROUGH __attribute__((__fallthrough__))

and there appear to be many of these #defines that
use __attribute__((foo)) where foo does not use the
double underscored prefix and suffix form

I also downloaded and trivially attempted to build vbox
without success, but I don't find this #define anywhere
in the sources.  Clues?

$ git clone git://github.com/mirror/vbox.git
$ cd vbox

$ git grep FALL_THROUGH
$ 

$ ./configure
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: 
  ** kmk (variable KBUILDDIR) not found!
Check /home/joe/vbox/configure.log for details


$ cat configure.log
# Log file generated by
#
#   './configure '
#

***** Checking environment *****
Determined build machine: linux.amd64, target machine: linux.amd64


***** Checking kBuild *****
** kmk (variable KBUILDDIR) not found!

$


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Build failures since 5.4-rc3
  2019-10-15 19:32 ` Joe Perches
@ 2019-10-15 20:27   ` Larry Finger
  0 siblings, 0 replies; 3+ messages in thread
From: Larry Finger @ 2019-10-15 20:27 UTC (permalink / raw)
  To: Joe Perches, LKML

On 10/15/19 2:32 PM, Joe Perches wrote:
> 
> Hey Larry.
> 
> 
> Looks like this should be:
> 
> #define FALL_THROUGH __attribute__((__fallthrough__))
> 
> and there appear to be many of these #defines that
> use __attribute__((foo)) where foo does not use the
> double underscored prefix and suffix form
> 
> I also downloaded and trivially attempted to build vbox
> without success, but I don't find this #define anywhere
> in the sources.  Clues?
> 
> $ git clone git://github.com/mirror/vbox.git
> $ cd vbox
> 
> $ git grep FALL_THROUGH
> $
> 
> $ ./configure
> Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
> Checking for kBuild:
>    ** kmk (variable KBUILDDIR) not found!
> Check /home/joe/vbox/configure.log for details
> 
> 
> $ cat configure.log
> # Log file generated by
> #
> #   './configure '
> #
> 
> ***** Checking environment *****
> Determined build machine: linux.amd64, target machine: linux.amd64
> 
> 
> ***** Checking kBuild *****
> ** kmk (variable KBUILDDIR) not found!
> 
> $

I am the maintainer of VirtualBox for openSUSE, and it is their version that has 
the problem.

The original code had the following macro definitions:

# define RT_FALL_THROUGH()      __attribute__((fallthrough))
#define RT_FALL_THRU()          RT_FALL_THROUGH()

The code uses both forms interchangeably. That failed - I think the () fooled 
the compiler.

I replaced those with

#define FALL_THROUGH          __attribute__((__fallthrough__))
#define RT_FALL_THRU()          FALL_THROUGH
#define RT_FALL_THROUGH()       FALL_THROUGH

My initial try was without the underscores around fallthrough, which caused a 
conflict with the one in your changes. Putting them back resulted in code that 
builds fine. Thanks for the help.

Larry


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-15 20:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 19:09 Build failures since 5.4-rc3 Larry Finger
2019-10-15 19:32 ` Joe Perches
2019-10-15 20:27   ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).