Open V-Z opened 1 year ago
The issue seems to be with the warning that std::unexpected
is deprecated. Perhaps you have turned on 'treat warnings as errors'? Probably replace it with std::terminate
.
As for the change to libs/vdb-sqlite/sqlite3.c
, that is sqlite's code; I have no idea if your change is correct.
Thank You for fast reply. openSUSE Open Build Service does treat warnings as errors (no way to change).
Replacement of std::unexpecte
by std::terminate
did help. I did also few more edits which helped:
diff -Naur sra-tools-3.0.3.orig/libs/vdb-sqlite/sqlite3.c sra-tools-3.0.3.edit/libs/vdb-sqlite/sqlite3.c
--- sra-tools-3.0.3.orig/libs/vdb-sqlite/sqlite3.c 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/libs/vdb-sqlite/sqlite3.c 2023-03-29 15:53:24.947996154 +0200
@@ -115611,7 +115611,7 @@
pNew = sqlite3DbMallocRawNN(db, sizeof(*pNew) );
if( pNew==0 ){
assert( db->mallocFailed );
- pNew = &standin;
+ return NULL;
}
if( pEList==0 ){
pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db,TK_ASTERISK,0));
diff -Naur sra-tools-3.0.3.orig/ngs/ngs-sdk/dispatch/Refcount.cpp sra-tools-3.0.3.edit/ngs/ngs-sdk/dispatch/Refcount.cpp
--- sra-tools-3.0.3.orig/ngs/ngs-sdk/dispatch/Refcount.cpp 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/ngs/ngs-sdk/dispatch/Refcount.cpp 2023-03-30 10:32:30.305078072 +0200
@@ -64,60 +64,52 @@
}
void OpaqueRefcount :: Release ()
- NGS_NOTHROW ()
+ NGS_NOTHROW ()
{
- if ( this != 0 )
+ // cast to C object
+ NGS_Refcount_v1 * self = Self ();
+
+ try
{
- // cast to C object
- NGS_Refcount_v1 * self = Self ();
-
- try
- {
- // extract VTable
- const NGS_Refcount_v1_vt * vt = Cast ( self -> vt );
-
- // release object
- ErrBlock err;
- assert ( vt -> release != 0 );
- ( * vt -> release ) ( self, & err );
-
- // check for errors
- err . Check ();
- }
- catch ( ErrorMsg & x )
- {
- // good place for a message to console or error log
- }
- catch ( ... )
- {
- }
- }
- }
-
- void * OpaqueRefcount :: Duplicate () const
- NGS_THROWS ( ErrorMsg )
- {
- if ( this != 0 )
- {
- // cast to C object
- const NGS_Refcount_v1 * self = Self ();
-
// extract VTable
const NGS_Refcount_v1_vt * vt = Cast ( self -> vt );
-
- // duplicate object reference
+
+ // release object
ErrBlock err;
- assert ( vt -> duplicate != 0 );
- void * dup = ( * vt -> duplicate ) ( self, & err );
-
+ assert ( vt -> release != 0 );
+ ( * vt -> release ) ( self, & err );
+
// check for errors
- err. Check ();
-
- // return duplicated reference
- assert ( dup != 0 );
- return dup;
+ err . Check ();
+ }
+ catch ( ErrorMsg & x )
+ {
+ // good place for a message to console or error log
}
+ catch ( ... )
+ {
+ }
+ }
- return 0;
+ void * OpaqueRefcount :: Duplicate () const
+ NGS_THROWS ( ErrorMsg )
+ {
+ // cast to C object
+ const NGS_Refcount_v1 * self = Self ();
+
+ // extract VTable
+ const NGS_Refcount_v1_vt * vt = Cast ( self -> vt );
+
+ // duplicate object reference
+ ErrBlock err;
+ assert ( vt -> duplicate != 0 );
+ void * dup = ( * vt -> duplicate ) ( self, & err );
+
+ // check for errors
+ err. Check ();
+
+ // return duplicated reference
+ assert ( dup != 0 );
+ return dup;
}
}
diff -Naur sra-tools-3.0.3.orig/ngs/ngs-sdk/language/c++/Statistics.cpp sra-tools-3.0.3.edit/ngs/ngs-sdk/language/c++/Statistics.cpp
--- sra-tools-3.0.3.orig/ngs/ngs-sdk/language/c++/Statistics.cpp 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/ngs/ngs-sdk/language/c++/Statistics.cpp 2023-03-30 10:44:06.891034256 +0200
@@ -29,32 +29,34 @@
namespace ngs
{
Statistics :: Statistics ( StatisticsRef ref )
- NGS_NOTHROW ()
- : self ( ref )
+ NGS_NOTHROW ()
+ : self ( ref )
{
assert ( ref != 0 );
}
-
+
Statistics & Statistics :: operator = ( const Statistics & obj )
- NGS_THROWS ( ErrorMsg )
+ NGS_THROWS ( ErrorMsg )
{
- self -> Release ();
- self = obj . self -> Duplicate ();
-
+ if (self != obj.self) {
+ self -> Release ();
+ self = obj . self -> Duplicate ();
+ }
return * this;
}
-
+
Statistics :: Statistics ( const Statistics & obj )
- NGS_THROWS ( ErrorMsg )
- : self ( obj . self -> Duplicate () )
+ NGS_THROWS ( ErrorMsg )
+ : self ( obj . self -> Duplicate () )
{
}
-
+
Statistics :: ~ Statistics ()
- NGS_NOTHROW ()
+ NGS_NOTHROW ()
{
self -> Release ();
self = 0;
}
-
+
}
+
diff -Naur sra-tools-3.0.3.orig/tools/external/driver-tool/proc.posix.cpp sra-tools-3.0.3.edit/tools/external/driver-tool/proc.posix.cpp
--- sra-tools-3.0.3.orig/tools/external/driver-tool/proc.posix.cpp 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/tools/external/driver-tool/proc.posix.cpp 2023-03-30 09:39:47.319446955 +0200
@@ -243,7 +243,7 @@
assert(rc != 0); // only happens if WNOHANG is given
if (rc == 0)
- std::unexpected();
+ std::terminate();
} while (errno == EINTR);
assert(errno != ECHILD); // you already waited on this!
diff -Naur sra-tools-3.0.3.orig/tools/external/driver-tool/run-source.cpp sra-tools-3.0.3.edit/tools/external/driver-tool/run-source.cpp
--- sra-tools-3.0.3.orig/tools/external/driver-tool/run-source.cpp 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/tools/external/driver-tool/run-source.cpp 2023-03-29 16:08:33.873355053 +0200
@@ -477,7 +477,7 @@
queryInfo = getLocalFileInfo(cmdline, args, cwd, qualityPreference().isFullQuality);
cwd.makeCurrentDirectory();
}
- auto const havePerm = perm != nullptr;
+ // auto const havePerm = perm != nullptr;
auto const canSendCE = config->canSendCEToken();
if (logging_state::is_dry_run()) ; else assert(!(havePerm && !canSendCE));
diff -Naur sra-tools-3.0.3.orig/tools/external/sra-pileup/sam-dump.c sra-tools-3.0.3.edit/tools/external/sra-pileup/sam-dump.c
--- sra-tools-3.0.3.orig/tools/external/sra-pileup/sam-dump.c 2023-01-03 21:32:28.000000000 +0100
+++ sra-tools-3.0.3.edit/tools/external/sra-pileup/sam-dump.c 2023-03-30 10:39:06.070724676 +0200
@@ -3227,9 +3227,9 @@
ds->cols[ alg_CIGAR_LEN ].name = "CIGAR_SHORT_LEN";
}
- if ( param -> qualQuant && param -> qualQuantSingle ) { /** we don't really need quality ***/
- ds->cols[ alg_SAM_QUALITY ] . name = "";
- }
+ // if ( param -> qualQuant && param -> qualQuantSingle ) { /** we don't really need quality ***/
+ // ds->cols[ alg_SAM_QUALITY ] . name = "";
+ // }
switch ( type ) {
case edstt_EvidenceInterval:
I'm not 100% sure if all my edits are the best (although they seem to work), but solving rest of issues is beyond my skills. :-( Complete log is at https://build.opensuse.org/package/live_build_log/home:vojtaeus/sra-tools/15.4/x86_64
I'm failing trying to compile SRA toolkit on openSUSE Linux. I had issue with
libs/vdb-sqlite/sqlite3.c
returning empty local variablestandin
and withtools/external/driver-tool/run-source.cpp
and unused variablehavePerm
. I think I fixed the issues:This improved the situation, compilation seems to run well, but still finally fails, and I'm unable to find reasoning.
Here is the log:
There doesn't seem to be any obvious error. :-(
For completeness, I work with Open Build Service using RPM spec file
But I don't think this plays any role.