Bug 400164 - helgrind test encounters mips x-compiler warnings and assembler error
Summary: helgrind test encounters mips x-compiler warnings and assembler error
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: helgrind (show other bugs)
Version: 3.14 SVN
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-22 18:33 UTC by Randy MacLeod
Modified: 2023-11-08 23:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch: Make local functions static to avoid assembler error (5.44 KB, patch)
2018-10-22 18:33 UTC, Randy MacLeod
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy MacLeod 2018-10-22 18:33:31 UTC
Created attachment 115832 [details]
Patch: Make local functions static to avoid assembler error

SUMMARY

When building valgrind for Yocto-2.6 and using the musl libc rather than glibc,
a file in helgrind encounters an assembler error when building for qemumips/qemumips64.

STEPS TO REPRODUCE

On any desktop Linux system such as Ubuntu-18.04,
0. sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \
 build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
 xz-utils debianutils iputils-ping libsdl1.2-dev xterm
1. git clone git://git.pokylinux.org/poky.git
2. cd poky.git
3. git checkout bc98a1e89dcd7b3f59f99e4382439d9028ba4db2
4. mkdir ../proj; cd ../proj
5. . ../poky.git/oe-init-build-env vg-bug
6. MACHINE=qemumips TCLIBC=musl bitbake valgrind

OBSERVED RESULT

the valgrind build fails an error:

several warnings:
 ../../../valgrind-3.14.0/helgrind/tests/annotate_hbefore.c:360:6: warning: no previous prototype for 'do_signal' [-Wmissing-prototypes]
    |  void do_signal ( UWord* w )
    |       ^~~~~~~~~
    

error:
    
    /tmp/cce22iiw.s: Assembler messages:
    /tmp/cce22iiw.s:446: Error: symbol `exit_0' is already defined
    /tmp/cce22iiw.s:448: Error: symbol `exit' is already defined
    /tmp/cce22iiw.s:915: Error: symbol `exit_0' is already defined
    /tmp/cce22iiw.s:917: Error: symbol `exit' is already defined


EXPECTED RESULT

valgrind builds without error.


SOFTWARE VERSIONS
(available in About System)
KDE Plasma Version: N/A
KDE Frameworks Version: N/A 
Qt Version: N/A

ADDITIONAL INFORMATION

Patch attached.
Comment 1 Petar Jovanovic 2019-03-25 18:56:36 UTC
I hope this is fixed with

https://sourceware.org/git/?p=valgrind.git;a=commit;h=d6da48fe5ac2e94fe28184ff334cd6b2283ef9a6

Randy, can you confirm?
Comment 2 Randy MacLeod 2023-11-08 23:13:01 UTC
Yes, that works Petar. I'm in the middle of updating the Yocto valgrind recipe to 3.22.0 so I'm finally dropping our local patch!
Thanks.