Hi, I have a package that when building with osc gives a warning about uninitialized variables being used but rpmbuild doesn't. Is there a way to receive these warnings using make? Regards Dave P
On Tue, 11 Aug 2009 10:58:14 +0200, you wrote:
Hi, I have a package that when building with osc gives a warning about uninitialized variables being used but rpmbuild doesn't. Is there a way to receive these warnings using make?
If you only want the warnings, make sure optimization is turned on (-O2 or higher) and -Wall is passed to the compiler.
Philipp
On 08/12/2009 01:23 AM, Philipp Thomas wrote:
On Tue, 11 Aug 2009 10:58:14 +0200, you wrote:
Hi, I have a package that when building with osc gives a warning about uninitialized variables being used but rpmbuild doesn't. Is there a way to receive these warnings using make?
If you only want the warnings, make sure optimization is turned on (-O2 or higher) and -Wall is passed to the compiler.
Philipp
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
On Wed, Aug 12, 2009 at 11:05:43AM +0200, Dave Plater wrote:
On 08/12/2009 01:23 AM, Philipp Thomas wrote:
On Tue, 11 Aug 2009 10:58:14 +0200, you wrote:
Hi, I have a package that when building with osc gives a warning about uninitialized variables being used but rpmbuild doesn't. Is there a way to receive these warnings using make?
If you only want the warnings, make sure optimization is turned on (-O2 or higher) and -Wall is passed to the compiler.
Philipp
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't.
The compiler logfile is not post-processed diuring rpmbuild, you will probably need to look for "... is used uninitialized" in the logfile.
Ciao, Marcus
On 08/12/2009 11:08 AM, Marcus Meissner wrote:
On Wed, Aug 12, 2009 at 11:05:43AM +0200, Dave Plater wrote:
On 08/12/2009 01:23 AM, Philipp Thomas wrote:
On Tue, 11 Aug 2009 10:58:14 +0200, you wrote:
Hi, I have a package that when building with osc gives a warning about uninitialized variables being used but rpmbuild doesn't. Is there a way to receive these warnings using make?
If you only want the warnings, make sure optimization is turned on (-O2 or higher) and -Wall is passed to the compiler.
Philipp
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't.
The compiler logfile is not post-processed diuring rpmbuild, you will probably need to look for "... is used uninitialized" in the logfile.
Ciao, Marcus
I've tried that, there's "may be used uninitialized" but no "is used uninitialized" messages. Regards Dave P
On 8/12/2009 at 11:05, Dave Plater dave.plater@yahoo.co.uk wrote:
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
Are you refering to the initial checking of the result after the build was successful? Yes, there are many more checks run afterwards, called brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
On 8/12/2009 at 11:05, Dave Plater dave.plater@yahoo.co.uk wrote:
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
Are you refering to the initial checking of the result after the build was successful? Yes, there are many more checks run afterwards, called brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file. Regards Dave P
Dave Plater napsal(a):
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
Are you refering to the initial checking of the result after the
build was successful? Yes, there are many more checks run afterwards, called
brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file.
Do you refer to the actual compiler warnings or the error summary printed by the build script? Also, if you have an older gcc version in your system, it might simply miss some cases. Or simply paste here the exact messages you are getting with osc and missing with rpmbuild.
Michal
On 08/12/2009 02:28 PM, Michal Marek wrote:
Dave Plater napsal(a):
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
Are you refering to the initial checking of the result after the
build was successful? Yes, there are many more checks run afterwards, called
brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file.
Do you refer to the actual compiler warnings or the error summary printed by the build script? Also, if you have an older gcc version in your system, it might simply miss some cases. Or simply paste here the exact messages you are getting with osc and missing with rpmbuild.
Michal
I am referring to the following message which doesn't appear either with rpmbuild or when compiling locally with -O2 -Wall and -Werror=uninitialized doesn't stop at all :- extern/bullet2/src/LinearMath/btAlignedObjectArray.h: In member function 'virtual void btOptimizedBvh::build(btStridingMeshInterface*, bool, const btVector3&, const btVector3&)::No deTriangleCallback::internalProcessTriangleIndex(btVector3*, int, int)': extern/bullet2/src/LinearMath/btAlignedObjectArray.h:224: warning: 'node.btOptimizedBvhNode::m_padding[4u]' is used uninitialized in this function extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp:56: note: 'node.btOptimizedBvhNode::m_padding[4u]' was declared here extern/bullet2/src/LinearMath/btAlignedObjectArray.h:224: warning: 'node.btOptimizedBvhNode::m_padding[3u]' is used uninitialized in this function extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp:56: note: 'node.btOptimizedBvhNode::m_padding[3u]' was declared here extern/bullet2/src/LinearMath/btAlignedObjectArray.h:224: warning: 'node.btOptimizedBvhNode::m_padding[2u]' is used uninitialized in this function extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp:56: note: 'node.btOptimizedBvhNode::m_padding[2u]' was declared here extern/bullet2/src/LinearMath/btAlignedObjectArray.h:224: warning: 'node.btOptimizedBvhNode::m_padding[1u]' is used uninitialized in this function extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp:56: note: 'node.btOptimizedBvhNode::m_padding[1u]' was declared here extern/bullet2/src/LinearMath/btAlignedObjectArray.h:224: warning: 'node.btOptimizedBvhNode::m_padding[0u]' is used uninitialized in this function extern/bullet2/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp:56: note: 'node.btOptimizedBvhNode::m_padding[0u]' was declared here
Regards Dave P
Dave Plater napsal(a):
I am referring to the following message which doesn't appear either with rpmbuild or when compiling locally with -O2 -Wall and -Werror=uninitialized doesn't stop at all :- extern/bullet2/src/LinearMath/btAlignedObjectArray.h: In member function ...
And the gcc version in your live system is the same as in the build root?
Michal
On 08/12/2009 03:32 PM, Michal Marek wrote:
Dave Plater napsal(a):
I am referring to the following message which doesn't appear either with rpmbuild or when compiling locally with -O2 -Wall and -Werror=uninitialized doesn't stop at all :- extern/bullet2/src/LinearMath/btAlignedObjectArray.h: In member function ...
And the gcc version in your live system is the same as in the build root?
Michal
I should imagine so I am running factory and gcc44 and building factory with osc although I get the same messages for 11.1 Regards Dave P
Am Mittwoch, 12. August 2009 13:51:29 schrieb Dave Plater:
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
On 8/12/2009 at 11:05, Dave Plater dave.plater@yahoo.co.uk wrote:
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
Are you refering to the initial checking of the result after the build was successful? Yes, there are many more checks run afterwards, called brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file.
rpmlint and brp checks are invoked by the build script.
Yes, it works with plain rpmlint at build time, but that does not make the package better at runtime ;)
bye adrian
Am Mittwoch, 12. August 2009 13:51:29 schrieb Dave Plater:
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
On 8/12/2009 at 11:05, Dave Plater dave.plater@yahoo.co.uk wrote:
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
Are you refering to the initial checking of the result after the build was successful? Yes, there are many more checks run afterwards, called brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file.
osc build is setting the compiler flags according to the project config (check via osc meta prjconf openSUSE:Factory).
This are currently these flags:
Optflags: i586 -fomit-frame-pointer -fmessage-length=0 Optflags: i686 -march=i686 -mtune=generic -fomit-frame-pointer -fmessage- length=0 Optflags: x86_64 -fmessage-length=0 Optflags: ppc -fmessage-length=0 Optflags: ppc64 -fmessage-length=0 Optflags: ia64 -fmessage-length=0 Optflags: s390 -fmessage-length=0 Optflags: s390x -fmessage-length=0
Optflags: * -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables - fasynchronous-unwind-tables
On 08/13/2009 05:02 AM, Adrian Schröter wrote:
Am Mittwoch, 12. August 2009 13:51:29 schrieb Dave Plater:
On 08/12/2009 11:09 AM, Dominique Leuenberger wrote:
On 8/12/2009 at 11:05, Dave Plater dave.plater@yahoo.co.uk wrote:
I've used -O2 -Wall -Wextra and I still can't get the uninitialized variables to come up locally. Rpmbuild uses those switches by default, it's still only osc which throws the "is used uninitialized" warning. There must be something that osc does that plain rpmbuild doesn't. Regards Dave P
Are you refering to the initial checking of the result after the build was successful? Yes, there are many more checks run afterwards, called brp-checks and rpmlint. Most of them are heuristic analysis of the built rpms and the compiler output. (especially the 'initialized variables' are just collected from the compiler log and raised as warnings so they are not just missed in the huge build logs.
Dominique
When I use rpmbuild to build the package, I don't get any "is used uninitialized" errors in the log but with osc build the errors are in the log. This is using the same package and spec file.
osc build is setting the compiler flags according to the project config (check via osc meta prjconf openSUSE:Factory).
This are currently these flags:
Optflags: i586 -fomit-frame-pointer -fmessage-length=0 Optflags: i686 -march=i686 -mtune=generic -fomit-frame-pointer -fmessage- length=0 Optflags: x86_64 -fmessage-length=0 Optflags: ppc -fmessage-length=0 Optflags: ppc64 -fmessage-length=0 Optflags: ia64 -fmessage-length=0 Optflags: s390 -fmessage-length=0 Optflags: s390x -fmessage-length=0
Optflags: * -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables - fasynchronous-unwind-tables
Well I must admit I feel like an idiot, I was setting C flags in cmake and not the CXX flags (at least I'll never make the same mistake). I can now get the exact same messages to display in kdevelop3 as I receive from osc, without the summary of course. Thanks very much for your patience with me. Regards Dave P
Am Donnerstag, 13. August 2009 09:15:21 schrieb Dave Plater: ...
Well I must admit I feel like an idiot,
A typical feeling for each software developer ;)
bye adrian
buildservice@lists.opensuse.org