mailing list of musl libc
 help / color / mirror / code / Atom feed
* Attempting to debug C++ library and command via valgrind
@ 2014-07-09  4:39 Isaac Dunham
  2014-07-09 15:30 ` Jeff Pohlmeyer
  2014-07-11 12:19 ` [musl] " John Spencer
  0 siblings, 2 replies; 12+ messages in thread
From: Isaac Dunham @ 2014-07-09  4:39 UTC (permalink / raw)
  To: musl

Hello,
I've been trying to get Sword 1.7.3 (crosswire.org/sword) running on Alpine.
Sword is a library for free bible software that comes with a few utilities.
It builds fine and runs with few issues, but I'm having a bit of trouble figuring out one of the bugs:
valgrind was recommended, but I can't get valgrind to run the command properly.
I was asked to provide the output of roughly this command (adjusting for
Windows/*nix differences):
valgrind --leak-check=full --track-origins=yes \
  --keep-stacktraces=alloc-and-free \
  utilities/diatheke/.libs/diatheke  -b KJV -k Ps117

But when I do this, diatheke errors out:
-----
$ valgrind --leak-check=full --track-origins=yes --keep-stacktraces=all
oc-and-free diatheke  -b KJV -k Ps117
==5743== Memcheck, a memory error detector
==5743== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==5743== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==5743== Command: diatheke -b KJV -k Ps117
==5743== 
diatheke: cannot load -b: No such file or directory
==5743== 
==5743== HEAP SUMMARY:
==5743==     in use at exit: 0 bytes in 0 blocks
==5743==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==5743== 
==5743== All heap blocks were freed -- no leaks are possible
==5743== 
==5743== For counts of detected and suppressed errors, rerun with: -v
==5743== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
-----
Comparing this to the default output below, my guess is that the command line parsing is not happening when run from valgind.


The bug I'm trying to track down (background):
diatheke is a utility that comes with Sword that shows all verses or passages in a bible or book that match a key (such as a reference);
the basic command line looks like this:
diatheke -b book -k reference

The bug is that the last passage/verse gets repeated:
$ diatheke  -b KJV -k Ps117
Psalms 117:1: O praise the LORD, all ye nations: praise him, all ye people.
Psalms 117:2: For his merciful kindness is great toward us: and the truth of the LORD endureth for ever. Praise ye the LORD. 
: For his merciful kindness is great toward us: and the truth of the LORD endureth for ever. Praise ye the LORD. 
(KJV)

Currently running Alpine edge with linux-vanilla as kernel.
All binaries are built using abuild; the system CFLAGS were "-Os -pipe -fomit-frame-pointer", but the package adds "-O3".
I got the same results after changing CFLAGS in abuild.comf to "-g -pipe".

If the build scripts are desired, I can supply them.

Thanks,
Isaac Dunham


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-07-12  4:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09  4:39 Attempting to debug C++ library and command via valgrind Isaac Dunham
2014-07-09 15:30 ` Jeff Pohlmeyer
2014-07-09 15:46   ` Jeff Pohlmeyer
2014-07-10  4:13   ` [alpine-devel] " Isaac Dunham
2014-07-10  4:47     ` Rich Felker
2014-07-10  6:50       ` Isaac Dunham
2014-07-11  3:39         ` Rich Felker
2014-07-12  4:03           ` Solved: Re: [musl]Attempting " Isaac Dunham
2014-07-12  4:09             ` Solved: Re: [musl][alpine-devel] Attempting " Rich Felker
2014-07-12  4:38               ` Solved: " Isaac Dunham
2014-07-11 12:19 ` [musl] " John Spencer
2014-07-12  3:11   ` Isaac Dunham

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).