Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-6534

Build issue with gcc 4.9.2, v2_7_52, in sendfile_copy

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • Lustre 2.7.0
    • Ubuntu Vivid 15.04
    • 3
    • 9223372036854775807

    Description

      Building with gcc 4.9.2 on Ubuntu 15.04 I get the following build error:

      libtool: link: gcc -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -o llapi_fid_test llapi_fid_test.o ../../lustre/utils/liblustreapi.a
      gcc -DHAVE_CONFIG_H -I. -I../.. -D_LARGEFILE64_SOURCE=1 -I/opt/lam/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS -include /home/king/lustre/no-deb-build/lustre-release/config.h -I/home/king/lustre/no-deb-build/lustre-release/libcfs/include -I/home/king/lustre/no-deb-build/lustre-release/lnet/include -I/home/king/lustre/no-deb-build/lustre-release/lustre/include -g -Wall -fPIC -D_GNU_SOURCE -g -O2 -Werror -MT sendfile_grouplock.o -MD -MP -MF .deps/sendfile_grouplock.Tpo -c -o sendfile_grouplock.o sendfile_grouplock.c
      In file included from /usr/include/fcntl.h:279:0,
      from sendfile_grouplock.c:60:
      In function ‘open’,
      inlined from ‘sendfile_copy’ at sendfile_grouplock.c:229:9:
      /usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
      __open_missing_mode ();
      ^
      Makefile:1195: recipe for target 'sendfile_grouplock.o' failed

      I'm guessing that the newer versions of gcc are more pedantic and catching this open + O_CREATE without mode flag issue.

      Attached is a patch to fix this build issue.

      Attachments

        Activity

          [LU-6534] Build issue with gcc 4.9.2, v2_7_52, in sendfile_copy
          pjones Peter Jones added a comment -

          Landed for 2.8

          pjones Peter Jones added a comment - Landed for 2.8

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14631/
          Subject: LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 96f566ea1c6fccac9d427f7dc8c25ed4c3893299

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/14631/ Subject: LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT Project: fs/lustre-release Branch: master Current Patch Set: Commit: 96f566ea1c6fccac9d427f7dc8c25ed4c3893299

          Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/14631
          Subject: LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: 90f66105f61838f218b38570677821e6a269a004

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: http://review.whamcloud.com/14631 Subject: LU-6534 tests: Fix build issue, missing mode on an open with O_CREAT Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 90f66105f61838f218b38570677821e6a269a004
          pjones Peter Jones added a comment -

          Hi Colin

          thanks for the contribution - we're getting a lot of interest in running Lustre clients on Ubuntu atm so this is most welcome

          Bob

          Can you please take care of this patch?

          Thanks

          Peter

          pjones Peter Jones added a comment - Hi Colin thanks for the contribution - we're getting a lot of interest in running Lustre clients on Ubuntu atm so this is most welcome Bob Can you please take care of this patch? Thanks Peter

          People

            bogl Bob Glossman (Inactive)
            colinianking Colin Ian King
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: