[LU-6534] Build issue with gcc 4.9.2, v2_7_52, in sendfile_copy Created: 28/Apr/15  Updated: 28/Mar/17  Resolved: 12/May/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Colin Ian King Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch
Environment:

Ubuntu Vivid 15.04


Attachments: Text File 0001-Fix-build-issue-missing-mode-on-an-open-with-O_CREAT.patch    
Issue Links:
Duplicate
Related
Epic/Theme: test
Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by Peter Jones [ 28/Apr/15 ]

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

Comment by Gerrit Updater [ 28/Apr/15 ]

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

Comment by Gerrit Updater [ 12/May/15 ]

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

Comment by Peter Jones [ 12/May/15 ]

Landed for 2.8

Generated at Sat Feb 10 02:01:02 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.