elfutils issues when building systemtap rpm from snapshot on rawhide

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

elfutils issues when building systemtap rpm from snapshot on rawhide

William Cohen
When attempting to build a systemtap rpm with elfutils-0.116 and a
snapshot of the systemtap I ran across a problem on i386 rawhide. I did
not see this problem when building the elfutil-0.116-1.src.rpm nor was
it a problem on FC4. Below is the portion of the output listing the
error messages and the problem lines in line2addr.c from the attempted
rawhide build.

-Will

if gcc -DHAVE_CONFIG_H -D_GNU_SOURCE -I.
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests
-I..
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/libasm
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/libdw
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/libdwfl
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/libebl
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/libelf
-I/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/lib
-I..   -Wall -Werror -Wextra -std=gnu99 -Wformat=2 -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -MT addrscopes.o -MD -MP -MF
".deps/addrscopes.Tpo" -c -o addrscopes.o
/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests/addrscopes.c;
\
then mv -f ".deps/addrscopes.Tpo" ".deps/addrscopes.Po"; else rm -f
".deps/addrscopes.Tpo"; exit 1; fi
cc1: warnings being treated as errors
/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests/line2addr.c:
In function 'handle_module':
/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests/line2addr.c:77:
warning: too few arguments for format
/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests/line2addr.c:
In function 'main':
/home/wcohen/rh-rpms/BUILD/systemtap-0.4.2/build-elfutils/../elfutils-0.116/tests/line2addr.c:107:
warning: format '%a' expects type 'float *', but argument 3 has type
'char **'

  line 77:


                printf (":%d");

looks like it should be:

                printf (":%d", col);

line 107:

       switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
        {

In some versions %a spec allocates memory, but in the rawhide compiler
(C99) it is equivalent to %f and causes a mismatch.
Reply | Threaded
Open this post in threaded view
|

Re: elfutils issues when building systemtap rpm from snapshot on rawhide

Ulrich Drepper
William Cohen wrote:
> When attempting to build a systemtap rpm with elfutils-0.116 and a
> snapshot of the systemtap I ran across a problem on i386 rawhide.

You shouldn't see any of this since the Makefiles should make sure the
code is compiled with -Wno-format.  Apparently it doesn't for you which
means something is fishy with your make.  I run rawhide and have no problem.

The first printf problem is testament to that since otherwise this would
have been noticed.  I've checked in a patch for that.  The %a code is
correct and is the reason why -Wno-format is used.

Again, youhave to look for the problem on your side, use make's
debugging capabilities if needed.

--
? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ?
Reply | Threaded
Open this post in threaded view
|

Re: elfutils issues when building systemtap rpm from snapshot on rawhide

William Cohen
Ulrich Drepper wrote:

> William Cohen wrote:
>
>> When attempting to build a systemtap rpm with elfutils-0.116 and a
>> snapshot of the systemtap I ran across a problem on i386 rawhide.
>
>
> You shouldn't see any of this since the Makefiles should make sure the
> code is compiled with -Wno-format.  Apparently it doesn't for you which
> means something is fishy with your make.  I run rawhide and have no
> problem.

Uli, you have been able to build the a snapshot of the systemtap with
the elfutils-0.116 bundled on a rawhide machine? Maybe something is
different between our rawhide systems.

> The first printf problem is testament to that since otherwise this would
> have been noticed.  I've checked in a patch for that.  The %a code is
> correct and is the reason why -Wno-format is used.

Shouldn't the first printf problem been noticed before on an elfutil
rpmbuild? It was built straight from the test srpm.

It looks like the systemtap rpmbuild is passing in -Wall for the build
of elfutil, but the elfutil rpmbuild isn't.

When I manually removed "-Wall" from build-elfutils/tests/Makefile the
compiler succeeds building line2addr.o.

-Will


>
> Again, youhave to look for the problem on your side, use make's
> debugging capabilities if needed.
>

Reply | Threaded
Open this post in threaded view
|

Re: elfutils issues when building systemtap rpm from snapshot on rawhide

Ulrich Drepper
William Cohen wrote:
> Uli, you have been able to build the a snapshot of the systemtap with
> the elfutils-0.116 bundled on a rawhide machine? Maybe something is
> different between our rawhide systems.

No, I'm building elfutils itself.  If there is a difference then
Roland's repackagin might have problem.  In any case, look at the
Makefile, the

line2addr_no_Wformat = yes

line should take of adding the flag, disabling the warning.  If this
doesn't happen something is wrong on your system.


> Shouldn't the first printf problem been noticed before on an elfutil
> rpmbuild? It was built straight from the test srpm.

Not with -Wno-format.


> When I manually removed "-Wall" from build-elfutils/tests/Makefile the
> compiler succeeds building line2addr.o.

The solution is not to remove -Wall, the solution is to add -Wno-format.

--
? Ulrich Drepper ? Red Hat, Inc. ? 444 Castro St ? Mountain View, CA ?
Reply | Threaded
Open this post in threaded view
|

Re: elfutils issues when building systemtap rpm from snapshot on rawhide

Roland McGrath
In reply to this post by William Cohen
Those rpms are not for rawhide.  Rawhide has current elfutils itself, so
the bundled build does not make sense.  The problem is rawhide's default
rpm build cflags, which I've worked around in the rawhide elfutils spec file.
I didn't put the same workaround into the systemtap spec file because it's
only needed for rawhide.

# Remove -Wall from default flags.  The makefiles enable enough warnings
# themselves, and they use -Werror.  Appending -Wall defeats the cases where
# the makefiles disable some specific warnings for specific code.
RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-Wall/}