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

GCC 11.3.0 build fails #16144

Closed
baloe opened this issue Aug 28, 2022 · 3 comments · Fixed by #16145
Closed

GCC 11.3.0 build fails #16144

baloe opened this issue Aug 28, 2022 · 3 comments · Fixed by #16145
Milestone

Comments

@baloe
Copy link

baloe commented Aug 28, 2022

I am unable to build GCC 11.3.0. Here is the output:

 * [x] $CFGS/m/M4/M4-1.4.19.eb (module: M4/1.4.19)
 * [x] $CFGS/b/Bison/Bison-3.8.2.eb (module: Bison/3.8.2)
 * [x] $CFGS/f/flex/flex-2.6.4.eb (module: flex/2.6.4)
 * [x] $CFGS/z/zlib/zlib-1.2.12.eb (module: zlib/1.2.12)
 * [x] $CFGS/b/binutils/binutils-2.38.eb (module: binutils/2.38)
 * [ ] $CFGS/g/GCCcore/GCCcore-11.3.0.eb (module: GCCcore/11.3.0)
 * [ ] $CFGS/z/zlib/zlib-1.2.12-GCCcore-11.3.0.eb (module: zlib/1.2.12-GCCcore-11.3.0)
 * [ ] $CFGS/h/help2man/help2man-1.49.2-GCCcore-11.3.0.eb (module: help2man/1.49.2-GCCcore-11.3.0)
 * [ ] $CFGS/m/M4/M4-1.4.19-GCCcore-11.3.0.eb (module: M4/1.4.19-GCCcore-11.3.0)
 * [ ] $CFGS/b/Bison/Bison-3.8.2-GCCcore-11.3.0.eb (module: Bison/3.8.2-GCCcore-11.3.0)
 * [ ] $CFGS/f/flex/flex-2.6.4-GCCcore-11.3.0.eb (module: flex/2.6.4-GCCcore-11.3.0)
 * [ ] $CFGS/b/binutils/binutils-2.38-GCCcore-11.3.0.eb (module: binutils/2.38-GCCcore-11.3.0)
 * [ ] $CFGS/g/GCC/GCC-11.3.0.eb (module: GCC/11.3.0)
== Temporary log file(s) /tmp/eb-_i1fwb91/easybuild-8mfue8mm.log* have been removed.
== Temporary directory /tmp/eb-_i1fwb91 has been removed.
== Temporary log file in case of crash /tmp/eb-0wa2hfrj/easybuild-xmv94zng.log
== found valid index for /tmp/bastian/eb_tmp/easybuild/easyconfigs, so using it...
== resolving dependencies ...
== found valid index for /tmp/bastian/eb_tmp/easybuild/easyconfigs, so using it...
== processing EasyBuild easyconfig /tmp/bastian/eb_tmp/easybuild/easyconfigs/g/GCCcore/GCCcore-11.3.0.eb
== building and installing GCCcore/11.3.0...
== fetching files...
== creating build dir, resetting environment...
== starting iteration #0 ...
== unpacking...
== ... (took 10 secs)
== patching...
== preparing...
== configuring...
== ... (took 4 secs)
== building...
== ... (took 22 mins 34 secs)
== FAILED: Installation ended unsuccessfully (build directory: /soft/modules/build/GCCcore/11.3.0/system-system): build failed (first 300 chars): cmd " make -j 4 " exited with exit code 2 and output:
make[1]: Entering directory '/soft/modules/build/GCCcore/11.3.0/system-system/gcc-11.3.0/stage1_obj'
mkdir -p -- ./fixincludes
mkdir -p -- ./libiberty
mkdir -p -- ./intl
mkdir -p -- ./gmp
Configuring in ./fixincludes
Configuring in ./libiberty
Co (took 22 mins 49 secs)
== Results of the build can be found in the log file(s) /tmp/eb-0wa2hfrj/easybuild-GCCcore-11.3.0-20220828.093216.smqCd.log
0:22:49  0 out of 8 easyconfigs done
ERROR: Build of /tmp/bastian/eb_tmp/easybuild/easyconfigs/g/GCCcore/GCCcore-11.3.0.eb failed (err: 'build failed (first 300 chars): cmd " make -j 4 " exited with exit code 2 and output:\nmake[1]: Entering directory \'/soft/modules/build/GCCcore/11.3.0/system-system/gcc-11.3.0/stage1_obj\'\nmkdir -p -- ./fixincludes\nmkdir -p -- ./libiberty\nmkdir -p -- ./intl\nmkdir -p -- ./gmp\nConfiguring in ./fixincludes\nConfiguring in ./libiberty\nCo')

And here is the mentioned log file, but I can't tell what's the issue, here:
/tmp/eb-0wa2hfrj/easybuild-GCCcore-11.3.0-20220828.093216.smqCd.log

@branfosj
Copy link
Member

The error is:

In file included from /usr/include/linux/fs.h:19,
                 from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:75:
/usr/include/linux/mount.h:95:6: error: multiple definition of enum fsconfig_command
   95 | enum fsconfig_command {
      |      ^~~~~~~~~~~~~~~~
In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:62:
/usr/include/sys/mount.h:189:6: note: previous definition here
  189 | enum fsconfig_command
      |      ^~~~~~~~~~~~~~~~
In file included from /usr/include/linux/fs.h:19,
                 from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:75:
/usr/include/linux/mount.h:129:8: error: redefinition of struct mount_attr
  129 | struct mount_attr {
      |        ^~~~~~~~~~
In file included from ../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:62:
/usr/include/sys/mount.h:161:8: note: previous definition of struct mount_attr
  161 | struct mount_attr
      |        ^~~~~~~~~~
make[4]: *** [Makefile:615: sanitizer_platform_limits_posix.lo] Error 1

A search on that error leads me to llvm/llvm-project@9cf1306 as the fix for libsanitzer when building on a system with glibc 2.36.

The GCC commit for that is https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2701442d0cf6292f6624443c15813d6d1a3562fe

I've created a PR for GCCcore-11.3.0.eb by doing the following:

@boegel
Copy link
Member

boegel commented Aug 29, 2022

@baloe Can you test whether the patch that's being added in #16145 works for you? A simple way to do this is running eb --from-pr 16145 --robot.
Even better would be if you could upload a test report as well, but that requires a bit of configuration first (see https://docs.easybuild.io/en/latest/Integration_with_GitHub.html#uploading-test-reports-upload-test-report)

@boegel boegel added this to the 4.x milestone Aug 29, 2022
@baloe
Copy link
Author

baloe commented Sep 11, 2022

@boegel I have finally found the time to test your patch and I can confirm that it works. Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants