[LU-1821] build errors with newer gcc Created: 04/Sep/12  Updated: 18/Apr/13  Resolved: 03/Oct/12

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.3.0, Lustre 2.4.0

Type: Bug Priority: Minor
Reporter: Peng Tao Assignee: Keith Mannthey (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Severity: 3
Rank (Obsolete): 4455

 Description   

newer gcc checks stricter about C99 VLA and set-but-unused variables.



 Comments   
Comment by Peng Tao [ 04/Sep/12 ]

VLA error:

drivers/incore/fs_incore.c:340:54: error: variably modified
‘incore_dir_template’ at file scope [-Werror]

$gcc --version
gcc (GCC) 4.6.3 20120306 (Red Hat 4.6.3-2)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Comment by Peng Tao [ 04/Sep/12 ]

patch submitted:
http://review.whamcloud.com/3856

Comment by Peng Tao [ 06/Sep/12 ]

Another error after rebasing my code...

make[3]: Entering directory `/home/bergwolf/src/linux-2.6'

WARNING: Symbol version dump /home/bergwolf/src/linux-2.6/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] /home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.o
cc1: warnings being treated as errors
/home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c: In function ‘osc_setup’:
/home/bergwolf/rpmbuild/BUILD/lustre-2.3.50/lustre/osc/osc_request.c:3581: error: ignoring return value of ‘PTR_ERR’, declared with attribute warn_unused_result

$gcc --version
gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

patch submitted to
http://review.whamcloud.com/3884

Comment by James A Simmons [ 06/Sep/12 ]

This is the same problem we seen on SLES11 SP2. Please take a look at http://review.whamcloud.com/#change,3734 for jira ticket LU-1691. This is really a duplicate of that ticket.

Comment by Peng Tao [ 06/Sep/12 ]

LU-1691 doesn't address the VLA error. Shall I abandon this ticket (and the two patches) and let Yang Sheng fold the VLA part into http://review.whamcloud.com/#change,3734 ?

Comment by James A Simmons [ 06/Sep/12 ]

Look at the LU-1691 patch and your two patches I would suggest the easiest path is to fold your changes into one patch and make it dependent on the patch from LU-1691 since they over lap. You are right your patch adds even more fixes that are needed beyond SLES11 SP2 support.

Comment by Peng Tao [ 06/Sep/12 ]

I agree. I'll just abandon http://review.whamcloud.com/#change,3884 and reduce http://review.whamcloud.com/#change,3856 to just fix VLA error. There is no need to depend on patch from LU-1691 because VLA fix is independent. Thanks.

Comment by Peter Jones [ 03/Oct/12 ]

Landed for 2.3

Comment by James A Simmons [ 08/Oct/12 ]

Found another problem. Could we reopen and keep this ticket around? We will continue to have gcc build errors from time to time.

Comment by Peter Jones [ 08/Oct/12 ]

James

It makes it much easier to track which fix is in which release if we have one ticket per issue rather than reused tickets (and I bet it takes less time to open a new ticket than to find the existing one to reuse ). My preference would be for us to look into ways that we can catch introducing these problems before they land. Perhaps we can discuss ideas on how we could accomplish this on the next CDWG call?

Peter

Comment by James A Simmons [ 08/Oct/12 ]

Okay. Its under LU-2111

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