[Debian-med-packaging] Preliminary package of the NCBI SRA SDK: help needed.
Andreas Tille
andreas at an3as.eu
Wed Dec 22 14:21:11 UTC 2010
On Wed, Dec 22, 2010 at 12:21:23AM +0900, Charles Plessy wrote:
> $ sra-stat SRR006565.sra
> 2010-12-21 15:15:00 sra-stat int: schema not found while opening table within virtual database module - failed to open SRATable 'SRR006565.sra'
I confirm that I can reproduce this problem.
The attached patch adds some debug lines to find out the piece of code
where the problem seems to occure. The test was done on amd64
architecture. I'm mentioning this because I have the vague suspicion
that some pointer issue is causing this. I can not really spend more
time into this but perhaps this hint might be helpful to track down
the issue a bit.
> Here is a typical result obtained from the static binaries that are distributed
> by the NCBI (http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?cmd=show&f=software&m=software&s=software):
>
> $ /home/karl/src/sratoolkit.2.0b5-centos_linux64/sra-stat SRR006565.sra
> SRR006565.sra||2145126:77224536:77224536|0:0|0:0|0:0
The path name sratoolkit.2.0b5-centos_linux64 let me assume this is also
an amd64 machine - so perhaps my hint leads into the wrong direction.
However, I do not thinkt that the difference dynamic versus static
linking is the reason of the problem (but I might be wrong here).
> By the way, I acknowledge that the package is still very far from being
> uploadable to Debian (see debian/control).
That's fine. I hope you are fine with source format 3.0 (quilt) (I just
introduced this to get the patch easier).
Kind regards
Andreas.
--
http://fam-tille.de
-------------- next part --------------
--- sra-sdk-2.0.0~b6.orig/tools/sra-stat/sra-stat.c
+++ sra-sdk-2.0.0~b6/tools/sra-stat/sra-stat.c
@@ -316,6 +316,7 @@ rc_t run ( srastat_parms *pb )
{
const SRATable *tbl;
rc = SRAMgrOpenTableRead ( mgr, & tbl, pb -> src_path );
+printf("DEBUG %s(%i): pb -> src_path = %s\n", __FILE__, __LINE__, pb -> src_path);
if ( rc != 0 )
PLOGERR ( klogInt, (klogInt, rc, "failed to open SRATable '$(spec)'", "spec=%s", pb -> src_spec ));
else
--- sra-sdk-2.0.0~b6.orig/libs/sra/sratbl-cmn.c
+++ sra-sdk-2.0.0~b6/libs/sra/sratbl-cmn.c
@@ -214,6 +214,7 @@ rc_t ResolveTablePath ( const SRAMgr *mg
len = vsnprintf ( path, psize, spec, args );
if ( len < 0 || ( size_t ) len >= psize )
return RC ( rcSRA, rcTable, rcOpening, rcPath, rcExcessive );
+printf("DEBUG %s(%i) path = %s(%i), spec = %s, len = %i\n", __FILE__, __LINE__, path, psize, spec, len);
return 0;
}
@@ -266,6 +267,7 @@ LIB_EXPORT rc_t CC SRAMgrVOpenTableRead
{
char path [ 4096 ];
rc = ResolveTablePath ( self, path, sizeof path, spec, args );
+printf("DEBUG %s(%i) path = %s(%i), rc = %i\n", __FILE__, __LINE__, path, sizeof path, (int)rc);
if ( rc == 0 )
{
SRATable *tbl = calloc ( 1, sizeof *tbl );
--- sra-sdk-2.0.0~b6.orig/libs/sra/srapath-stub.c
+++ sra-sdk-2.0.0~b6/libs/sra/srapath-stub.c
@@ -319,6 +319,7 @@ rc_t CC SRAPathFull ( const SRAPath *sel
*/
bool CC SRAPathTest ( const SRAPath *self, const char *path )
{
+printf("DEBUG %s(%i) path = %s\n", __FILE__, __LINE__, path);
if ( self == NULL )
return false;
if ( path == NULL || path [ 0 ] == 0 )
More information about the Debian-med-packaging
mailing list