[LU-5310] build error in Centos 7 Created: 09/Jul/14 Updated: 10/Jul/14 Resolved: 10/Jul/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.7.0 |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Bob Glossman (Inactive) | Assignee: | Bob Glossman (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 14837 | ||||||||||||
| Description |
|
server build now breaks in Centos 7/el7. client-only build still works OK. CC [M] /home/bogl/lustre-release/lustre/mdd/mdd_dir.o
/home/bogl/lustre-release/lustre/mdd/mdd_dir.c: In function ‘mdd_migrate_create’:
/home/bogl/lustre-release/lustre/mdd/mdd_dir.c:3396:26: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
memset(mgr_ea, 0, sizeof(mgr_ea));
^
cc1: all warnings being treated as errors
make[6]: *** [/home/bogl/lustre-release/lustre/mdd/mdd_dir.o] Error 1
make[5]: *** [/home/bogl/lustre-release/lustre/mdd] Error 2
make[4]: *** [/home/bogl/lustre-release/lustre] Error 2
make[3]: *** [_module_/home/bogl/lustre-release] Error 2
make[3]: Leaving directory `/home/bogl/rb/BUILD/kernel-3.10.0_123.4.2.l0708'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/bogl/lustre-release'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bogl/lustre-release'
make: *** [all] Error 2
I believe this is due to the recent landing in master of commit de2d5808bd2987f76d2486272e1a9c192ba277d4; It appears the gcc v4.8.2 in el7 is a bit pickier about some things than earlier gcc versions. |
| Comments |
| Comment by Bob Glossman (Inactive) [ 09/Jul/14 ] |
|
fwiw, changing the offending source line to: memset(mgr_ea, 0, sizeof(*mgr_ea)); fixes the build. |
| Comment by Brian Murrell (Inactive) [ 09/Jul/14 ] |
Isn't it always? |
| Comment by James A Simmons [ 09/Jul/14 ] |
|
At least it is a nice simple patch. |
| Comment by Bob Glossman (Inactive) [ 09/Jul/14 ] |
| Comment by Bob Glossman (Inactive) [ 09/Jul/14 ] |
|
I think the 1 line correction I commented on above & pushed as a patch is functionally correct as well as repairing the build, but I will appreciate good reviews on it to make sure I didn't mess up. |
| Comment by Bob Glossman (Inactive) [ 10/Jul/14 ] |
|
Have verified the build failure isn't specific to el7. It will happen with any gcc v4.8.x. I've seen it now with both v4.8.2 and v4.8.3. The fix is good for all cases so far. |
| Comment by Jodi Levi (Inactive) [ 10/Jul/14 ] |
|
Patch landed to Master. |