|
From: iprmaster <ipr...@gm...> - 2008-03-26 17:47:15
|
Hi everybody,
since I would like to use valgrind on a AIX machine and I have seen that the latest version (3.3.0)
supports it, I tried to build it by running the usual steps
CC=/home/vt/didomax/myRootDir/opt/freeware/bin/gcc ./configure
...
blah, blah
...
Primary build target: PPC64_AIX5
Secondary build target: PPC32_AIX5
Default supp files: xfree-3.supp xfree-4.supp aix5libc.supp
and
gmake
Unfortunately, an error occurred
if /home/vt/didomax/myRootDir/opt/freeware/bin/gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I.. -I../coregrind/ppc32 -I../coregrind/aix5 -I../coregrind/ppc32-aix5 -I../include -I../VEX/pub -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 -DVGO_aix5=1 -DVGP_ppc32_aix5=1 -DVG_LIBDIR="\"/home/vt/didomax/myRootDir/lib/valgrind"\" -maix32 -mcpu=powerpc -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fno-stack-protector -MT libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o -MD -MP -MF ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" -c -o libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o `test -f 'm_syswrap/syswrap-ppc32-aix5.c' || echo './'`m_syswrap/syswrap-ppc32-aix5.c; \
then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Po"; else rm -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"; exit 1; fi
m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before':
m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of 'sizeof' to incomplete type 'struct timespec'
m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after':
m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of 'sizeof' to incomplete type 'struct timespec'
m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before':
m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed declarations and code
m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed declarations and code
m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed declarations and code
gmake[3]: *** [libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o] Error 1
gmake[3]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0/coregrind'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0/coregrind'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0'
gmake: *** [all] Error 2
I have checked the code and indeed found such statements
PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct timespec) );
POST_MEM_WRITE( ARG3, sizeof(struct timespec) );
w/o any definition of timespec.
I have tried to understand the code and the only solution I have found is to change
timespec
into
vki_timespec
in the above (and similar) lines. As expected, the code compiles but valgrind does not run
(it gives a segmentation fault). What is then the solution?
Thanks,
Max
|
|
From: Ouyang J. <soy...@gm...> - 2008-03-27 02:40:06
|
Hi, I've built valgrind 3.3.0 on an AIX box with gcc. But I've not met your problem. Which version of gcc are you using? I used gcc download here: http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html Though I've built valgrind, but it does not work(core dump every time). If you can make it work, could you please let me know? On 3/27/08, iprmaster <ipr...@gm...> wrote: > > Hi everybody, > > since I would like to use valgrind on a AIX machine and I have seen that > the latest version (3.3.0) > supports it, I tried to build it by running the usual steps > > CC=/home/vt/didomax/myRootDir/opt/freeware/bin/gcc ./configure > ... > blah, blah > ... > Primary build target: PPC64_AIX5 > Secondary build target: PPC32_AIX5 > Default supp files: xfree-3.supp xfree-4.supp aix5libc.supp > > > and > > gmake > > Unfortunately, an error occurred > > if /home/vt/didomax/myRootDir/opt/freeware/bin/gcc -DHAVE_CONFIG_H -I. -I. > -I.. -I../coregrind -I.. -I../coregrind/ppc32 -I../coregrind/aix5 > -I../coregrind/ppc32-aix5 -I../include -I../VEX/pub > -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 -DVGO_aix5=1 -DVGP_ppc32_aix5=1 > -DVG_LIBDIR="\"/home/vt/didomax/myRootDir/lib/valgrind"\" -maix32 > -mcpu=powerpc -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith > -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing > -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement > -fno-stack-protector -MT libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o-MD -MP -MF ".deps/libcoregrind_ppc32_aix5_a- > syswrap-ppc32-aix5.Tpo" -c -o libcoregrind_ppc32_aix5_a- > syswrap-ppc32-aix5.o `test -f 'm_syswrap/syswrap-ppc32-aix5.c' || echo > './'`m_syswrap/syswrap-ppc32-aix5.c; \ > then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Po"; else rm -f > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"; exit 1; fi > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before': > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of 'sizeof' > to incomplete type 'struct timespec' > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after': > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of 'sizeof' > to incomplete type 'struct timespec' > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before': > m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed > declarations and code > m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed > declarations and code > m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed > declarations and code > gmake[3]: *** [libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o] Error 1 > gmake[3]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 > /coregrind' > gmake[2]: *** [all] Error 2 > gmake[2]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 > /coregrind' > gmake[1]: *** [all-recursive] Error 1 > gmake[1]: Leaving directory `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 > ' > gmake: *** [all] Error 2 > > I have checked the code and indeed found such statements > > PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct timespec) ); > > POST_MEM_WRITE( ARG3, sizeof(struct timespec) ); > > w/o any definition of timespec. > > I have tried to understand the code and the only solution I have found is > to change > > timespec > > into > > vki_timespec > > in the above (and similar) lines. As expected, the code compiles but > valgrind does not run > (it gives a segmentation fault). What is then the solution? > > Thanks, > Max > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: iprmaster <ipr...@gm...> - 2008-03-27 07:58:29
|
Hi Jian, I have downloaded the gcc version you pointed to, but no way to get valgrind build: m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before': m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of 'sizeof' to incomplete type 'struct timespec' m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after': m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of 'sizeof' to incomplete type 'struct timespec' m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before': If you still have the source directory, can you check if your compilation log shows at least a warning for these offending lines? I cannot figure out why our builds should be different! Have you defined somewhere else the timespec structure? Max On Thursday 27 March 2008, Ouyang Jian wrote: > Hi, > > I've built valgrind 3.3.0 on an AIX box with gcc. > But I've not met your problem. > Which version of gcc are you using? > I used gcc download here: > http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html > > Though I've built valgrind, but it does not work(core dump every time). > If you can make it work, could you please let me know? > > On 3/27/08, iprmaster <ipr...@gm...> wrote: > > Hi everybody, > > > > since I would like to use valgrind on a AIX machine and I have seen that > > the latest version (3.3.0) > > supports it, I tried to build it by running the usual steps > > > > CC=/home/vt/didomax/myRootDir/opt/freeware/bin/gcc ./configure > > ... > > blah, blah > > ... > > Primary build target: PPC64_AIX5 > > Secondary build target: PPC32_AIX5 > > Default supp files: xfree-3.supp xfree-4.supp aix5libc.supp > > > > > > and > > > > gmake > > > > Unfortunately, an error occurred > > > > if /home/vt/didomax/myRootDir/opt/freeware/bin/gcc -DHAVE_CONFIG_H -I. > > -I. -I.. -I../coregrind -I.. -I../coregrind/ppc32 -I../coregrind/aix5 > > -I../coregrind/ppc32-aix5 -I../include -I../VEX/pub > > -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 -DVGO_aix5=1 > > -DVGP_ppc32_aix5=1 > > -DVG_LIBDIR="\"/home/vt/didomax/myRootDir/lib/valgrind"\" -maix32 > > -mcpu=powerpc -O2 -g -Wmissing-prototypes -Wall -Wshadow -Wpointer-arith > > -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing > > -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement > > -fno-stack-protector -MT > > libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o-MD -MP -MF > > ".deps/libcoregrind_ppc32_aix5_a- syswrap-ppc32-aix5.Tpo" -c -o > > libcoregrind_ppc32_aix5_a- > > syswrap-ppc32-aix5.o `test -f 'm_syswrap/syswrap-ppc32-aix5.c' || echo > > './'`m_syswrap/syswrap-ppc32-aix5.c; \ > > then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Po"; else rm -f > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"; exit 1; fi > > m_syswrap/syswrap-ppc32-aix5.c: In function > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before': > > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of > > 'sizeof' to incomplete type 'struct timespec' > > m_syswrap/syswrap-ppc32-aix5.c: In function > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after': > > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of > > 'sizeof' to incomplete type 'struct timespec' > > m_syswrap/syswrap-ppc32-aix5.c: In function > > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before': > > m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed > > declarations and code > > m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed > > declarations and code > > m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed > > declarations and code > > gmake[3]: *** [libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o] Error 1 > > gmake[3]: Leaving directory > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind' > > gmake[2]: *** [all] Error 2 > > gmake[2]: Leaving directory > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind' > > gmake[1]: *** [all-recursive] Error 1 > > gmake[1]: Leaving directory > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 ' > > gmake: *** [all] Error 2 > > > > I have checked the code and indeed found such statements > > > > PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct timespec) ); > > > > POST_MEM_WRITE( ARG3, sizeof(struct timespec) ); > > > > w/o any definition of timespec. > > > > I have tried to understand the code and the only solution I have found > > is to change > > > > timespec > > > > into > > > > vki_timespec > > > > in the above (and similar) lines. As expected, the code compiles but > > valgrind does not run > > (it gives a segmentation fault). What is then the solution? > > > > Thanks, > > Max > > > > ------------------------------------------------------------------------ > >- Check out the new SourceForge.net Marketplace. > > It's the best place to buy or sell services for > > just about anything Open Source. > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp > >lace _______________________________________________ > > Valgrind-users mailing list > > Val...@li... > > https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Ouyang J. <soy...@gm...> - 2008-03-28 01:05:25
|
Hi, My compilation log looks like this: bash-3.00# gmake gmake all-am gmake[1]: Entering directory `/home/oyj/valgrind-3.3.0/coregrind' gmake -C ../VEX CC="gcc" AR="ar" pub/libvex_guest_offsets.h gmake[2]: Entering directory `/home/oyj/valgrind-3.3.0/VEX' gmake[2]: `pub/libvex_guest_offsets.h' is up to date. gmake[2]: Leaving directory `/home/oyj/valgrind-3.3.0/VEX' if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I.. -I../coregrind/ppc32 -I. pc32-aix5 -I../include -I../VEX/pub -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -maix32 -mcpu=powerpc -O -g -Wmissing- er-arith -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing -Wno-lon ation-after-statement -MT libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o -MD -MP 5_a-syswrap-ppc32-aix5.Tpo" -c -o libcoregrind_ppc32_aix5_a- syswrap-ppc32-aix5.o -aix5.c' || echo './'`m_syswrap/syswrap-ppc32-aix5.c; \ then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" ".deps/libcor -aix5.Po"; else rm -f ".deps/libcoregrind_ppc32_aix5_a- syswrap-ppc32-aix5.Tpo"; e m_syswrap/syswrap-ppc32-aix5.c: In function 'vgSysWrap_ppc32_aix5_sys_thread_sets m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed declarations a m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed declarations a m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed declarations a rm -f libcoregrind_ppc32_aix5.a Well, I guess it might be problem with your header file? Can you find definition of timespec in time.h? BTW: I think your change to make it pass compilation is OK. The segmentation fault might be caused by other problem. I tried the subversion version of valgrind, after remove '-O2' option, it does not core dump any more. But still does not work correctly. bash-3.00# valgrind --tool=memcheck ls ==331876== Memcheck, a memory error detector. ==331876== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. ==331876== Using LibVEX rev 1812, a library for dynamic binary translation. ==331876== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. ==331876== Using valgrind-3.4.0.SVN, a dynamic binary instrumentation framework. ==331876== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. ==331876== For more details, rerun with: -v ==331876== valgrind: FATAL: core/tool/LD_PRELOAD= preload failed. >--331876:0:initimg Diagnosing load failure >--331876:0:initimg loadquery returned 0 (0 = success) >--331876:0:initimg "2 /usr/local/lib/valgrind/ppc32-aix5/vgpreload_core.so" >--331876:0:initimg "6 13" >--331876:0:initimg Use /usr/sbin/execerror to make sense of above string(s) >--331876:0:initimg See also comments at the bottom of >--331876:0:initimg coregrind/m_initimg/initimg-aix5.c (in Valgrind sources) ==331876== ==331876== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==331876== malloc/free: in use at exit: 0 bytes in 0 blocks. ==331876== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==331876== For counts of detected errors, rerun with: -v ==331876== All heap blocks were freed -- no leaks are possible. Will you continue to work on this? On 3/27/08, iprmaster <ipr...@gm...> wrote: > > Hi Jian, > > I have downloaded the gcc version you pointed to, but no way to get > valgrind build: > > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before': > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of 'sizeof' > to incomplete type 'struct timespec' > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after': > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of 'sizeof' > to incomplete type 'struct timespec' > m_syswrap/syswrap-ppc32-aix5.c: In function > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before': > > > If you still have the source directory, can you check if your compilation > log shows at least a warning > for these offending lines? I cannot figure out why our builds should be > different! Have you defined > somewhere else the timespec structure? > > Max > > > > On Thursday 27 March 2008, Ouyang Jian wrote: > > Hi, > > > > I've built valgrind 3.3.0 on an AIX box with gcc. > > But I've not met your problem. > > Which version of gcc are you using? > > I used gcc download here: > > http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html > > > > Though I've built valgrind, but it does not work(core dump every time). > > If you can make it work, could you please let me know? > > > > On 3/27/08, iprmaster <ipr...@gm...> wrote: > > > Hi everybody, > > > > > > since I would like to use valgrind on a AIX machine and I have seen > that > > > the latest version (3.3.0) > > > supports it, I tried to build it by running the usual steps > > > > > > CC=/home/vt/didomax/myRootDir/opt/freeware/bin/gcc ./configure > > > ... > > > blah, blah > > > ... > > > Primary build target: PPC64_AIX5 > > > Secondary build target: PPC32_AIX5 > > > Default supp files: xfree-3.supp xfree-4.supp aix5libc.supp > > > > > > > > > and > > > > > > gmake > > > > > > Unfortunately, an error occurred > > > > > > if /home/vt/didomax/myRootDir/opt/freeware/bin/gcc -DHAVE_CONFIG_H > -I. > > > -I. -I.. -I../coregrind -I.. -I../coregrind/ppc32 > -I../coregrind/aix5 > > > -I../coregrind/ppc32-aix5 -I../include -I../VEX/pub > > > -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 -DVGO_aix5=1 > > > -DVGP_ppc32_aix5=1 > > > -DVG_LIBDIR="\"/home/vt/didomax/myRootDir/lib/valgrind"\" -maix32 > > > -mcpu=powerpc -O2 -g -Wmissing-prototypes -Wall -Wshadow > -Wpointer-arith > > > -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing > > > -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement > > > -fno-stack-protector -MT > > > libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o-MD -MP -MF > > > ".deps/libcoregrind_ppc32_aix5_a- syswrap-ppc32-aix5.Tpo" -c -o > > > libcoregrind_ppc32_aix5_a- > > > syswrap-ppc32-aix5.o `test -f 'm_syswrap/syswrap-ppc32-aix5.c' || > echo > > > './'`m_syswrap/syswrap-ppc32-aix5.c; \ > > > then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo" > > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Po"; else rm -f > > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"; exit 1; fi > > > m_syswrap/syswrap-ppc32-aix5.c: In function > > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before': > > > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of > > > 'sizeof' to incomplete type 'struct timespec' > > > m_syswrap/syswrap-ppc32-aix5.c: In function > > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after': > > > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of > > > 'sizeof' to incomplete type 'struct timespec' > > > m_syswrap/syswrap-ppc32-aix5.c: In function > > > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before': > > > m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed > > > declarations and code > > > m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed > > > declarations and code > > > m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed > > > declarations and code > > > gmake[3]: *** [libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o] Error > 1 > > > gmake[3]: Leaving directory > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind' > > > gmake[2]: *** [all] Error 2 > > > gmake[2]: Leaving directory > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind' > > > gmake[1]: *** [all-recursive] Error 1 > > > gmake[1]: Leaving directory > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 ' > > > gmake: *** [all] Error 2 > > > > > > I have checked the code and indeed found such statements > > > > > > PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct timespec) > ); > > > > > > POST_MEM_WRITE( ARG3, sizeof(struct timespec) ); > > > > > > w/o any definition of timespec. > > > > > > I have tried to understand the code and the only solution I have > found > > > is to change > > > > > > timespec > > > > > > into > > > > > > vki_timespec > > > > > > in the above (and similar) lines. As expected, the code compiles but > > > valgrind does not run > > > (it gives a segmentation fault). What is then the solution? > > > > > > Thanks, > > > Max > > > > > > > ------------------------------------------------------------------------ > > >- Check out the new SourceForge.net Marketplace. > > > It's the best place to buy or sell services for > > > just about anything Open Source. > > > > > > > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp > > >lace _______________________________________________ > > > Valgrind-users mailing list > > > Val...@li... > > > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > |
|
From: iprmaster <ipr...@gm...> - 2008-03-28 09:34:30
|
Hi,
On Friday 28 March 2008, Ouyang Jian wrote:
> Hi,
>
> My compilation log looks like this:
> bash-3.00# gmake
> gmake all-am
> gmake[1]: Entering directory `/home/oyj/valgrind-3.3.0/coregrind'
> gmake -C ../VEX CC="gcc" AR="ar" pub/libvex_guest_offsets.h
> gmake[2]: Entering directory `/home/oyj/valgrind-3.3.0/VEX'
> gmake[2]: `pub/libvex_guest_offsets.h' is up to date.
> gmake[2]: Leaving directory `/home/oyj/valgrind-3.3.0/VEX'
> if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../coregrind -I..
> -I../coregrind/ppc32 -I.
> pc32-aix5 -I../include -I../VEX/pub -DVG_PLATFORM="\"ppc32-aix5\""
> -DVGA_ppc32=1
> DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -maix32 -mcpu=powerpc -O -g
> -Wmissing-
> er-arith -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing
> -Wno-lon
> ation-after-statement -MT libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o
> -MD -MP
> 5_a-syswrap-ppc32-aix5.Tpo" -c -o libcoregrind_ppc32_aix5_a-
> syswrap-ppc32-aix5.o
> -aix5.c' || echo './'`m_syswrap/syswrap-ppc32-aix5.c; \
> then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"
> ".deps/libcor
> -aix5.Po"; else rm -f ".deps/libcoregrind_ppc32_aix5_a-
> syswrap-ppc32-aix5.Tpo"; e
> m_syswrap/syswrap-ppc32-aix5.c: In function
> 'vgSysWrap_ppc32_aix5_sys_thread_sets
> m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed
> declarations a
> m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed
> declarations a
> m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed
> declarations a
> rm -f libcoregrind_ppc32_aix5.a
>
> Well, I guess it might be problem with your header file?
> Can you find definition of timespec in time.h?
>
> BTW: I think your change to make it pass compilation is OK.
> The segmentation fault might be caused by other problem.
My time.h contains the timespec definition
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */
};
but it is not included in any valgrind header. The only reference to time.h in
the config.log is
configure:6511: checking whether time.h and sys/time.h may both be included
configure:6536:
gcc -c -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-stat
ement conftest.c >&5
configure:6542: $? = 0
configure:6546: test -z
|| test ! -s conftest.err
configure:6549: $? = 0
configure:6552: test -s conftest.o
configure:6555: $? = 0
configure:6566: result: yes
I have tried to include it in the "offending" files and now valgrind build w/o
modifications. Anyway, it does not start (segmentation fault), even with
CFLAGS=-O0 CXXFLAGS=-O0.
>
> I tried the subversion version of valgrind, after remove '-O2' option,
> it does not core dump any more. But still does not work correctly.
>
> bash-3.00# valgrind --tool=memcheck ls
> ==331876== Memcheck, a memory error detector.
> ==331876== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
> ==331876== Using LibVEX rev 1812, a library for dynamic binary
> translation. ==331876== Copyright (C) 2004-2008, and GNU GPL'd, by
> OpenWorks LLP. ==331876== Using valgrind-3.4.0.SVN, a dynamic binary
> instrumentation framework.
> ==331876== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
> ==331876== For more details, rerun with: -v
> ==331876==
> valgrind: FATAL: core/tool/LD_PRELOAD= preload failed.
>
> >--331876:0:initimg Diagnosing load failure
> >--331876:0:initimg loadquery returned 0 (0 = success)
> >--331876:0:initimg "2
>
> /usr/local/lib/valgrind/ppc32-aix5/vgpreload_core.so"
>
> >--331876:0:initimg "6 13"
> >--331876:0:initimg Use /usr/sbin/execerror to make sense of above
>
> string(s)
>
> >--331876:0:initimg See also comments at the bottom of
> >--331876:0:initimg coregrind/m_initimg/initimg-aix5.c (in Valgrind
>
> sources)
> ==331876==
> ==331876== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
> ==331876== malloc/free: in use at exit: 0 bytes in 0 blocks.
> ==331876== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
> ==331876== For counts of detected errors, rerun with: -v
> ==331876== All heap blocks were freed -- no leaks are possible.
>
> Will you continue to work on this?
I am not able to check the SVN version out, we are behind a firewall. May be I
have to wait for a new (more stable?) official version...
Bye,
Max
>
> On 3/27/08, iprmaster <ipr...@gm...> wrote:
> > Hi Jian,
> >
> > I have downloaded the gcc version you pointed to, but no way to get
> > valgrind build:
> >
> > m_syswrap/syswrap-ppc32-aix5.c: In function
> > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before':
> > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of
> > 'sizeof' to incomplete type 'struct timespec'
> > m_syswrap/syswrap-ppc32-aix5.c: In function
> > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after':
> > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of
> > 'sizeof' to incomplete type 'struct timespec'
> > m_syswrap/syswrap-ppc32-aix5.c: In function
> > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before':
> >
> >
> > If you still have the source directory, can you check if your
> > compilation log shows at least a warning
> > for these offending lines? I cannot figure out why our builds should be
> > different! Have you defined
> > somewhere else the timespec structure?
> >
> > Max
> >
> > On Thursday 27 March 2008, Ouyang Jian wrote:
> > > Hi,
> > >
> > > I've built valgrind 3.3.0 on an AIX box with gcc.
> > > But I've not met your problem.
> > > Which version of gcc are you using?
> > > I used gcc download here:
> > > http://www-03.ibm.com/systems/p/os/aix/linux/toolbox/download.html
> > >
> > > Though I've built valgrind, but it does not work(core dump every
> > > time). If you can make it work, could you please let me know?
> > >
> > > On 3/27/08, iprmaster <ipr...@gm...> wrote:
> > > > Hi everybody,
> > > >
> > > > since I would like to use valgrind on a AIX machine and I have seen
> >
> > that
> >
> > > > the latest version (3.3.0)
> > > > supports it, I tried to build it by running the usual steps
> > > >
> > > > CC=/home/vt/didomax/myRootDir/opt/freeware/bin/gcc ./configure
> > > > ...
> > > > blah, blah
> > > > ...
> > > > Primary build target: PPC64_AIX5
> > > > Secondary build target: PPC32_AIX5
> > > > Default supp files: xfree-3.supp xfree-4.supp aix5libc.supp
> > > >
> > > >
> > > > and
> > > >
> > > > gmake
> > > >
> > > > Unfortunately, an error occurred
> > > >
> > > > if /home/vt/didomax/myRootDir/opt/freeware/bin/gcc -DHAVE_CONFIG_H
> >
> > -I.
> >
> > > > -I. -I.. -I../coregrind -I.. -I../coregrind/ppc32
> >
> > -I../coregrind/aix5
> >
> > > > -I../coregrind/ppc32-aix5 -I../include -I../VEX/pub
> > > > -DVG_PLATFORM="\"ppc32-aix5\"" -DVGA_ppc32=1 -DVGO_aix5=1
> > > > -DVGP_ppc32_aix5=1
> > > > -DVG_LIBDIR="\"/home/vt/didomax/myRootDir/lib/valgrind"\" -maix32
> > > > -mcpu=powerpc -O2 -g -Wmissing-prototypes -Wall -Wshadow
> >
> > -Wpointer-arith
> >
> > > > -Wstrict-prototypes -Wmissing-declarations -fno-strict-aliasing
> > > > -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement
> > > > -fno-stack-protector -MT
> > > > libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o-MD -MP -MF
> > > > ".deps/libcoregrind_ppc32_aix5_a- syswrap-ppc32-aix5.Tpo" -c -o
> > > > libcoregrind_ppc32_aix5_a-
> > > > syswrap-ppc32-aix5.o `test -f 'm_syswrap/syswrap-ppc32-aix5.c' ||
> >
> > echo
> >
> > > > './'`m_syswrap/syswrap-ppc32-aix5.c; \
> > > > then mv -f ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"
> > > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Po"; else rm -f
> > > > ".deps/libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.Tpo"; exit 1;
> > > > fi m_syswrap/syswrap-ppc32-aix5.c: In function
> > > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_before':
> > > > m_syswrap/syswrap-ppc32-aix5.c:462: error: invalid application of
> > > > 'sizeof' to incomplete type 'struct timespec'
> > > > m_syswrap/syswrap-ppc32-aix5.c: In function
> > > > 'vgSysWrap_ppc32_aix5_sys__clock_gettime_after':
> > > > m_syswrap/syswrap-ppc32-aix5.c:467: error: invalid application of
> > > > 'sizeof' to incomplete type 'struct timespec'
> > > > m_syswrap/syswrap-ppc32-aix5.c: In function
> > > > 'vgSysWrap_ppc32_aix5_sys_thread_setstate_before':
> > > > m_syswrap/syswrap-ppc32-aix5.c:577: warning: ISO C90 forbids mixed
> > > > declarations and code
> > > > m_syswrap/syswrap-ppc32-aix5.c:612: warning: ISO C90 forbids mixed
> > > > declarations and code
> > > > m_syswrap/syswrap-ppc32-aix5.c:669: warning: ISO C90 forbids mixed
> > > > declarations and code
> > > > gmake[3]: *** [libcoregrind_ppc32_aix5_a-syswrap-ppc32-aix5.o]
> > > > Error
> >
> > 1
> >
> > > > gmake[3]: Leaving directory
> > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind'
> > > > gmake[2]: *** [all] Error 2
> > > > gmake[2]: Leaving directory
> > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 /coregrind'
> > > > gmake[1]: *** [all-recursive] Error 1
> > > > gmake[1]: Leaving directory
> > > > `/data_num/didomax/TmpDir/devel/valgrind-3.3.0 '
> > > > gmake: *** [all] Error 2
> > > >
> > > > I have checked the code and indeed found such statements
> > > >
> > > > PRE_MEM_WRITE( "_clock_gettime(dst)", ARG3, sizeof(struct
> > > > timespec)
> >
> > );
> >
> > > > POST_MEM_WRITE( ARG3, sizeof(struct timespec) );
> > > >
> > > > w/o any definition of timespec.
> > > >
> > > > I have tried to understand the code and the only solution I have
> >
> > found
> >
> > > > is to change
> > > >
> > > > timespec
> > > >
> > > > into
> > > >
> > > > vki_timespec
> > > >
> > > > in the above (and similar) lines. As expected, the code compiles
> > > > but valgrind does not run
> > > > (it gives a segmentation fault). What is then the solution?
> > > >
> > > > Thanks,
> > > > Max
> >
> > ------------------------------------------------------------------------
> >
> > > >- Check out the new SourceForge.net Marketplace.
> > > > It's the best place to buy or sell services for
> > > > just about anything Open Source.
> >
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketp
> >
> > > >lace _______________________________________________
> > > > Valgrind-users mailing list
> > > > Val...@li...
> > > > https://lists.sourceforge.net/lists/listinfo/valgrind-users
|