Bug 1384413 - error building docker: error: expected declaration specifiers or '...' before 'sizeof'
Summary: error building docker: error: expected declaration specifiers or '...' before...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: btrfs-progs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Josef Bacik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 09:03 UTC by Antonio Murdaca
Modified: 2016-10-13 17:54 UTC (History)
7 users (show)

Fixed In Version: btrfs-progs-4.8.1-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-13 17:54:26 UTC
Type: Bug


Attachments (Terms of Use)

Description Antonio Murdaca 2016-10-13 09:03:05 UTC
Description of problem:

error building docker


Version-Release number of selected component (if applicable):

btrfs-progs-devel-4.8.1-1.fc26.x86_64


How reproducible:

always


Steps to Reproduce:
1. dnf builddep docker
2. rpmbuild -ba docker.spec
3.

Actual results:

Building: bundles/1.12.2/dynbinary-daemon/dockerd-1.12.2
++++ go build -o bundles/1.12.2/dynbinary-daemon/dockerd-1.12.2 -tags 'autogen sqlite_omit_load_extension selinux seccomp daemon journald' -installsuffix netgo -a -ldflags '
		
		
	' ./cmd/dockerd
# github.com/docker/docker/daemon/graphdriver/btrfs
In file included from _build/src/github.com/docker/docker/daemon/graphdriver/btrfs/btrfs.go:8:0:
/usr/include/btrfs/ioctl.h:42:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args) == 4096);
              ^~~~~~
/usr/include/btrfs/ioctl.h:69:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_qgroup_limit) == 40);
              ^~~~~~
/usr/include/btrfs/ioctl.h:79:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_qgroup_inherit) == 72);
              ^~~~~~
/usr/include/btrfs/ioctl.h:85:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_qgroup_limit_args) == 48);
              ^~~~~~
/usr/include/btrfs/ioctl.h:104:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args_v2) == 4096);
              ^~~~~~
/usr/include/btrfs/ioctl.h:153:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_scrub_args) == 1024);
              ^~~~~~
/usr/include/btrfs/ioctl.h:164:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_replace_start_params) == 2072);
              ^~~~~~
/usr/include/btrfs/ioctl.h:179:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_replace_status_params) == 48);
              ^~~~~~
/usr/include/btrfs/ioctl.h:200:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_replace_args) == 2600);
              ^~~~~~
/usr/include/btrfs/ioctl.h:210:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_dev_info_args) == 4096);
              ^~~~~~
/usr/include/btrfs/ioctl.h:222:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_fs_info_args) == 1024);
              ^~~~~~
/usr/include/btrfs/ioctl.h:229:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_feature_flags) == 24);
              ^~~~~~
/usr/include/btrfs/ioctl.h:307:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_balance_args) == 1024);
              ^~~~~~
/usr/include/btrfs/ioctl.h:315:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_ino_lookup_args) == 4096);
              ^~~~~~
/usr/include/btrfs/ioctl.h:383:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_search_args_v2) == 112);
              ^~~~~~
/usr/include/btrfs/ioctl.h:391:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_clone_range_args) == 32);
              ^~~~~~
/usr/include/btrfs/ioctl.h:421:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_same_args) == 24);
              ^~~~~~
/usr/include/btrfs/ioctl.h:453:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_defrag_range_args) == 48);
              ^~~~~~
/usr/include/btrfs/ioctl.h:466:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_space_args) == 16);
              ^~~~~~
/usr/include/btrfs/ioctl.h:483:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_ino_path_args) == 56);
              ^~~~~~
/usr/include/btrfs/ioctl.h:525:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_get_dev_stats) == 1032);
              ^~~~~~
/usr/include/btrfs/ioctl.h:535:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_quota_ctl_args) == 16);
              ^~~~~~
/usr/include/btrfs/ioctl.h:542:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_quota_rescan_args) == 64);
              ^~~~~~
/usr/include/btrfs/ioctl.h:554:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_qgroup_create_args) == 16);
              ^~~~~~
/usr/include/btrfs/ioctl.h:570:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(struct btrfs_ioctl_received_subvol_args) == 200);
              ^~~~~~
/usr/include/btrfs/ioctl.h:609:14: error: expected declaration specifiers or '...' before 'sizeof'
 BUILD_ASSERT(sizeof(__u64 *) == 8
              ^~~~~~
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.77JHeh (%build)
    Bad exit status from /var/tmp/rpm-tmp.77JHeh (%build)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/mockbuild/trace_decorator.py", line 88, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.5/site-packages/mockbuild/util.py", line 562, in do
    raise exception.Error("Command failed. See logs for output.\n # %s" % (command,), child.returncode)
mockbuild.exception.Error: Command failed. See logs for output.
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/docker.spec


Expected results:

build runs fine


Additional info:

this is not happening with btrfs-progs-4.7.3-1.fc26

Comment 1 Eric Sandeen 2016-10-13 14:32:16 UTC
Looks like the addition of the BUILD_ASSERT() macro...

commit 64b195d34feb8f7ad57344c994d62026714b1ba1
Author: David Sterba <dsterba>
Date:   Wed Oct 5 00:01:31 2016 +0200

    btrfs-progs: add build-time checks for size of ioctl structures

But those are wrapped in an #ifdef:

#ifdef DEBUG_BUILD_CHECKS
#define BUILD_ASSERT(x)         extern int __token_glue(compile_time_assert_,__LINE__,__COUNTER__)[1-2*!(x)] __attribute__((unused))
#else
#define BUILD_ASSERT(x)
#endif

and AFAICT nothing defines that in the supplied headers.  I don't understand why those aren't no-ops in the build.  Perhaps do some preprocessing?  Are there full build logs somewhere?

Comment 2 Antonio Murdaca 2016-10-13 15:22:24 UTC
(In reply to Eric Sandeen from comment #1)
> Looks like the addition of the BUILD_ASSERT() macro...
> 
> commit 64b195d34feb8f7ad57344c994d62026714b1ba1
> Author: David Sterba <dsterba>
> Date:   Wed Oct 5 00:01:31 2016 +0200
> 
>     btrfs-progs: add build-time checks for size of ioctl structures
> 
> But those are wrapped in an #ifdef:
> 
> #ifdef DEBUG_BUILD_CHECKS
> #define BUILD_ASSERT(x)         extern int
> __token_glue(compile_time_assert_,__LINE__,__COUNTER__)[1-2*!(x)]
> __attribute__((unused))
> #else
> #define BUILD_ASSERT(x)
> #endif
> 
> and AFAICT nothing defines that in the supplied headers.  I don't understand
> why those aren't no-ops in the build.  Perhaps do some preprocessing?  Are
> there full build logs somewhere?

I don't think so, btrfs code is called from Go here https://github.com/docker/docker/blob/master/daemon/graphdriver/btrfs/btrfs.go#L8

The only build logs I see are the ones in the first comment also.

Comment 3 Eric Sandeen 2016-10-13 17:54:26 UTC
Building updated package now, this was a mistake in the upstream update.  Patch sent upstream.


Note You need to log in before you can comment on or make changes to this bug.