Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext2fs: patch ext2fs.h for glibc 2.30 compatibility #68

Merged
merged 1 commit into from
Oct 18, 2019
Merged

Conversation

xginn8
Copy link
Contributor

@xginn8 xginn8 commented Oct 16, 2019

Change-type: patch
Signed-off-by: Matthew McGinn matthew@balena.io

@xginn8 xginn8 requested review from zvin and thundron October 16, 2019 10:23
@zvin
Copy link
Contributor

zvin commented Oct 16, 2019

What error were you getting?
Why is this added inside #if !defined(__aarch64__)?

@xginn8
Copy link
Contributor Author

xginn8 commented Oct 16, 2019

What error were you getting?
Why is this added inside #if !defined(__aarch64__)?

Arch Linux users were reporting that etcher builds failed (error below). Upon closer investigation, the error reported occurred when compiling this library. Some logs available here: https://aur.archlinux.org/packages/balena-etcher/#comment-711525. I was able to track this down to glibc upgrading from 2.29 to 2.30, and other projects reported similar errors: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/292. I can't vouch for other architectures, but this patch fixes the issue on Arch Linux x86_64.

In file included from ../src/node_ext2fs.cc:5:
../src/ext2fs.h: At global scope:
../src/ext2fs.h:20:18: error: conflicting declaration ‘typedef uint64_t __u64’
   20 | typedef uint64_t __u64;
      |                  ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
                 from /usr/include/asm/types.h:5,
                 from /usr/include/linux/types.h:5,
                 from /usr/include/linux/stat.h:5,
                 from /usr/include/bits/statx.h:30,
                 from /usr/include/sys/stat.h:446,
                 from /home/matthew/.cache/node-gyp/iojs-3.1.9/deps/uv/include/uv-unix.h:26,
                 from /home/matthew/.cache/node-gyp/iojs-3.1.9/deps/uv/include/uv.h:62,
                 from ../node_modules/nan/nan.h:52,
                 from ../src/node_ext2fs.cc:2:
/usr/include/asm-generic/int-ll64.h:31:42: note: previous declaration as ‘typedef long long unsigned int __u64’
   31 | __extension__ typedef unsigned long long __u64;
      |      

Copy link

@thundron thundron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zvin
Copy link
Contributor

zvin commented Oct 17, 2019

This breaks the build for me (Ubuntu 19.04):

In file included from ../src/node_ext2fs.cc:5:
../src/ext2fs.h: At global scope:
../src/ext2fs.h:23:18: error: conflicting declaration ‘typedef uint64_t __u64’
 typedef uint64_t __u64;
                  ^~~~~
In file included from /usr/include/asm-generic/types.h:7,
                 from /usr/include/x86_64-linux-gnu/asm/types.h:5,
                 from /usr/include/linux/types.h:5,
                 from ../src/ext2fs.h:21,
                 from ../src/node_ext2fs.cc:5:
/usr/include/asm-generic/int-ll64.h:31:42: note: previous declaration as ‘typedef long long unsigned int __u64’
 __extension__ typedef unsigned long long __u64;

The ci fails to build with the same error.

@xginn8
Copy link
Contributor Author

xginn8 commented Oct 17, 2019

@zvin thanks for the feedback, I will try to clean this up.

Change-type: patch
Signed-off-by: Matthew McGinn <matthew@balena.io>
@xginn8
Copy link
Contributor Author

xginn8 commented Oct 17, 2019

@balena-ci retest

@zvin
Copy link
Contributor

zvin commented Oct 17, 2019

Looks good now.
I'd like to check if it still builds on arm64 before merging.

@xginn8
Copy link
Contributor Author

xginn8 commented Oct 17, 2019

I've confirmed rebuilding this on an RPi3 armv7l, fwiw. Once you're comfortable with it, I will merge.

@xginn8
Copy link
Contributor Author

xginn8 commented Oct 17, 2019

@balena-ci retest

@zvin
Copy link
Contributor

zvin commented Oct 18, 2019

Just checked, it builds on aarch64 \o/

@xginn8 xginn8 merged commit 3bc4eec into master Oct 18, 2019
@xginn8 xginn8 deleted the glibc-2.30 branch October 18, 2019 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants