* [Buildroot] Status of valgrind on powerpc @ 2011-09-29 9:50 Thomas De Schampheleire 2011-09-29 10:15 ` Thomas Petazzoni 0 siblings, 1 reply; 10+ messages in thread From: Thomas De Schampheleire @ 2011-09-29 9:50 UTC (permalink / raw) To: buildroot [now sending correctly to the mailing list as well] Hi, I'm wondering what the status is of building valgrind for powerpc... Not so long ago, the powerpc package was not available for powerpc; Peter disabled it because a.out is missing. But recently, Thomas enabled powerpc building again, with commit http://git.buildroot.net/buildroot/commit/?id=afabcb63816806aa8c971000c486f4e108aeb117 (valgrind: bump to 3.6.1 and add support for ARMv7) Also recently, I see a patch from Baruch Siach (valgrind: workaround for segmentation fault on PowerPC) that hints that valgrind should at least build for powerpc. If I try this, I get: /repo/tdescham/reborn/buildroot-valgrind/output/host/usr/bin/powerpc-linux-gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../VEX/pub -DVGA_ppc32=1 -DVGO_linux=1 -DVGP_ppc32_linux=1 -I../coregrind -DVG_LIBDIR="\"/usr/lib/valgrind"\" -DVG_PLATFORM="\"ppc32-linux\"" -m32 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -Wno-long-long -pipe -Os -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-pointer-sign -fno-stack-protector -MT libcoregrind_ppc32_linux_a-readstabs.o -MD -MP -MF .deps/libcoregrind_ppc32_linux_a-readstabs.Tpo -c -o libcoregrind_ppc32_linux_a-readstabs.o `test -f 'm_debuginfo/readstabs.c' || echo './'`m_debuginfo/readstabs.c In file included from m_debuginfo/readstabs.c:53: /repo/tdescham/reborn/buildroot-valgrind/output/host/usr/powerpc-unknown-linux-uclibc/sysroot/usr/include/a.out.h:1:25: error: linux/a.out.h: No such file or directory m_debuginfo/readstabs.c: In function 'vgModuleLocal_read_debuginfo_stabs': m_debuginfo/readstabs.c:139: error: invalid application of 'sizeof' to incomplete type 'struct nlist' m_debuginfo/readstabs.c:139: warning: division by zero m_debuginfo/readstabs.c:142: error: invalid use of undefined type 'struct nlist' m_debuginfo/readstabs.c:142: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:148: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:148: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:148: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:149: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:150: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:151: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:163: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:214: error: invalid use of undefined type 'struct nlist' m_debuginfo/readstabs.c:214: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:215: error: invalid use of undefined type 'struct nlist' m_debuginfo/readstabs.c:215: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:232: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:243: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:268: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:293: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:303: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:339: error: dereferencing pointer to incomplete type m_debuginfo/readstabs.c:353: error: dereferencing pointer to incomplete type make[4]: *** [libcoregrind_ppc32_linux_a-readstabs.o] Error 1 make[4]: *** Waiting for unfinished jobs.... Hence my question: is it supposed to work now? If yes, what am I missing? (This is buildroot-2011.05 with the latest valgrind changes). I will try buildroot-2011.08 to see if it works better. Thanks, Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-09-29 9:50 [Buildroot] Status of valgrind on powerpc Thomas De Schampheleire @ 2011-09-29 10:15 ` Thomas Petazzoni 2011-09-30 9:39 ` Thomas De Schampheleire 2011-09-30 19:41 ` Thomas Petazzoni 0 siblings, 2 replies; 10+ messages in thread From: Thomas Petazzoni @ 2011-09-29 10:15 UTC (permalink / raw) To: buildroot Le Thu, 29 Sep 2011 11:50:14 +0200, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > Hence my question: is it supposed to work now? If yes, what am I > missing? (This is buildroot-2011.05 with the latest valgrind changes). > I will try buildroot-2011.08 to see if it works better. I think I did the compile test with a CodeSourcery glibc based toolchain for PowerPC. Maybe I have missed build problems with uClibc. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-09-29 10:15 ` Thomas Petazzoni @ 2011-09-30 9:39 ` Thomas De Schampheleire 2011-09-30 19:41 ` Thomas Petazzoni 1 sibling, 0 replies; 10+ messages in thread From: Thomas De Schampheleire @ 2011-09-30 9:39 UTC (permalink / raw) To: buildroot Hi Thomas, On Thu, Sep 29, 2011 at 12:15 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Le Thu, 29 Sep 2011 11:50:14 +0200, > Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > >> Hence my question: is it supposed to work now? If yes, what am I >> missing? (This is buildroot-2011.05 with the latest valgrind changes). >> I will try buildroot-2011.08 to see if it works better. > > I think I did the compile test with a CodeSourcery glibc based > toolchain for PowerPC. Maybe I have missed build problems with uClibc. Ok, thanks. I am currently building a crosstool-ng eglibc toolchain, and will try enabling valgrind on top of that. ~Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-09-29 10:15 ` Thomas Petazzoni 2011-09-30 9:39 ` Thomas De Schampheleire @ 2011-09-30 19:41 ` Thomas Petazzoni 2011-09-30 21:12 ` Thomas De Schampheleire 1 sibling, 1 reply; 10+ messages in thread From: Thomas Petazzoni @ 2011-09-30 19:41 UTC (permalink / raw) To: buildroot Le Thu, 29 Sep 2011 12:15:49 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit : > I think I did the compile test with a CodeSourcery glibc based > toolchain for PowerPC. Maybe I have missed build problems with uClibc. I confirm that it builds fine with the freescale-4.4 PowerPC toolchain of CodeSourcery. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-09-30 19:41 ` Thomas Petazzoni @ 2011-09-30 21:12 ` Thomas De Schampheleire 2011-10-01 9:39 ` Thomas Petazzoni 0 siblings, 1 reply; 10+ messages in thread From: Thomas De Schampheleire @ 2011-09-30 21:12 UTC (permalink / raw) To: buildroot On Fri, Sep 30, 2011 at 9:41 PM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Le Thu, 29 Sep 2011 12:15:49 +0200, > Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit : > >> I think I did the compile test with a CodeSourcery glibc based >> toolchain for PowerPC. Maybe I have missed build problems with uClibc. > > I confirm that it builds fine with the freescale-4.4 PowerPC toolchain > of CodeSourcery. An eglibc toolchain built with crosstool-ng, also works (both compilation as running on target). To run properly, though, valgrind needs an unstripped ld.so I worked around this by adding ld.so as an exception to the strip command in target-finalize (but am hoping for inclusion of Sven Neumann's 'exclude-from-strip' patch) Best regards, Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-09-30 21:12 ` Thomas De Schampheleire @ 2011-10-01 9:39 ` Thomas Petazzoni 2011-10-03 18:21 ` Thomas De Schampheleire 0 siblings, 1 reply; 10+ messages in thread From: Thomas Petazzoni @ 2011-10-01 9:39 UTC (permalink / raw) To: buildroot Le Fri, 30 Sep 2011 23:12:52 +0200, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > An eglibc toolchain built with crosstool-ng, also works (both > compilation as running on target). Ok. It would be good to identify whether Valgrind can be built with uClibc with additional configuration options, or if glibc/eglibc is really needed. In the former case, additional documentation in the Config.in help would be good. In the latter case, some additional "depends on" to hide valgrind when uClibc is used would be nice. > To run properly, though, valgrind needs an unstripped ld.so > I worked around this by adding ld.so as an exception to the strip > command in target-finalize (but am hoping for inclusion of Sven > Neumann's 'exclude-from-strip' patch) Ok. Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-10-01 9:39 ` Thomas Petazzoni @ 2011-10-03 18:21 ` Thomas De Schampheleire 2011-11-03 9:27 ` Thomas De Schampheleire 0 siblings, 1 reply; 10+ messages in thread From: Thomas De Schampheleire @ 2011-10-03 18:21 UTC (permalink / raw) To: buildroot Hi Thomas, On Sat, Oct 1, 2011 at 11:39 AM, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote: > Le Fri, 30 Sep 2011 23:12:52 +0200, > Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : > >> An eglibc toolchain built with crosstool-ng, also works (both >> compilation as running on target). > > Ok. It would be good to identify whether Valgrind can be built with > uClibc with additional configuration options, or if glibc/eglibc is > really needed. In the former case, additional documentation in the > Config.in help would be good. In the latter case, some additional > "depends on" to hide valgrind when uClibc is used would be nice. Agreed. I will try to look at this when I have some time. Best regards, Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-10-03 18:21 ` Thomas De Schampheleire @ 2011-11-03 9:27 ` Thomas De Schampheleire 2011-11-07 22:22 ` Peter Korsgaard 0 siblings, 1 reply; 10+ messages in thread From: Thomas De Schampheleire @ 2011-11-03 9:27 UTC (permalink / raw) To: buildroot Hi, On Mon, Oct 3, 2011 at 8:21 PM, Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote: > Hi Thomas, > > On Sat, Oct 1, 2011 at 11:39 AM, Thomas Petazzoni > <thomas.petazzoni@free-electrons.com> wrote: >> Le Fri, 30 Sep 2011 23:12:52 +0200, >> Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit : >> >>> An eglibc toolchain built with crosstool-ng, also works (both >>> compilation as running on target). >> >> Ok. It would be good to identify whether Valgrind can be built with >> uClibc with additional configuration options, or if glibc/eglibc is >> really needed. In the former case, additional documentation in the >> Config.in help would be good. In the latter case, some additional >> "depends on" to hide valgrind when uClibc is used would be nice. > > Agreed. I will try to look at this when I have some time. I did some further investigation on this. Valgrind includes <a.out.h> which is provided by the C library. With eglibc, the provided a.out.h has its own definitions, not depending on linux. With uClibc, the provided a.out.h includes <linux/a.out.h>, which is supposed to come from the kernel headers. But, that a.out.h file is not always present in the headers. The include/linux/Kbuild file has the following lines: ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ $(srctree)/include/asm-$(SRCARCH)/a.out.h),) header-y += a.out.h endif which say that a.out.h is only included in the headers if there is an arch/<arch>/include/asm/a.out.h or include/asm-<arch>/a.out.h file. For powerpc, there is no such file, only for x86, m68k, arm and alpha. Possible solutions? 1. Modify uClibc so that it does not depend on the linux a.out.h file, but rather provides its own definitions as eglibc does. 2. Modify the kernel so that powerpc also provides a.out.h 3. Modify buildroot to state that valgrind can not be build with uClibc. Option 1 would be the best realistic overall solution, but requires a uClibc developer to look into this (I don't have time for this, unfortunately). Option 3 would be the best alternative. I added the uClibc mailing list to this thread. If anyone is interested in making valgrind usable with uClibc, please step forward. Thanks, Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-11-03 9:27 ` Thomas De Schampheleire @ 2011-11-07 22:22 ` Peter Korsgaard 2011-11-08 8:33 ` Thomas De Schampheleire 0 siblings, 1 reply; 10+ messages in thread From: Peter Korsgaard @ 2011-11-07 22:22 UTC (permalink / raw) To: buildroot >>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes: Hi, Thomas> Possible solutions? Thomas> 1. Modify uClibc so that it does not depend on the linux a.out.h file, Thomas> but rather provides its own definitions as eglibc does. Thomas> 2. Modify the kernel so that powerpc also provides a.out.h I looked into this a few years ago, and option 2 is not an option as the aout stuff is old and shouldn't be used: https://lkml.org/lkml/2008/6/15/126 Thomas> 3. Modify buildroot to state that valgrind can not be build with uClibc. 4. Fix valgrind to not include a.out.h It's not really used for much - Have you seen this thread? http://old.nabble.com/How-to-disable-the-a.out-support-of-valgrind-td29226733.html -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] Status of valgrind on powerpc 2011-11-07 22:22 ` Peter Korsgaard @ 2011-11-08 8:33 ` Thomas De Schampheleire 0 siblings, 0 replies; 10+ messages in thread From: Thomas De Schampheleire @ 2011-11-08 8:33 UTC (permalink / raw) To: buildroot Hi Peter, On Mon, Nov 7, 2011 at 11:22 PM, Peter Korsgaard <jacmet@uclibc.org> wrote: >>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes: > > Hi, > > ?Thomas> Possible solutions? > ?Thomas> 1. Modify uClibc so that it does not depend on the linux a.out.h file, > ?Thomas> but rather provides its own definitions as eglibc does. > ?Thomas> 2. Modify the kernel so that powerpc also provides a.out.h > > I looked into this a few years ago, and option 2 is not an option as the > aout stuff is old and shouldn't be used: > > https://lkml.org/lkml/2008/6/15/126 > > ?Thomas> 3. Modify buildroot to state that valgrind can not be build with uClibc. > > 4. Fix valgrind to not include a.out.h > > It's not really used for much - Have you seen this thread? > > http://old.nabble.com/How-to-disable-the-a.out-support-of-valgrind-td29226733.html I hadn't seen it no, but it looks indeed a good alternative solution. I'll add it to my list, but I don't think I can look into this soon. So, if anyone has some free time, feel free to take this over. Best regards, Thomas ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-11-08 8:33 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-09-29 9:50 [Buildroot] Status of valgrind on powerpc Thomas De Schampheleire 2011-09-29 10:15 ` Thomas Petazzoni 2011-09-30 9:39 ` Thomas De Schampheleire 2011-09-30 19:41 ` Thomas Petazzoni 2011-09-30 21:12 ` Thomas De Schampheleire 2011-10-01 9:39 ` Thomas Petazzoni 2011-10-03 18:21 ` Thomas De Schampheleire 2011-11-03 9:27 ` Thomas De Schampheleire 2011-11-07 22:22 ` Peter Korsgaard 2011-11-08 8:33 ` Thomas De Schampheleire
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox