[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#549640: soci: FTBFS : error: 'strncmp' was not declared in this scope

Package: soci
Version: 3.0.0+cvs20081223-3
Justification: FTBFS
Severity: serious
Tags: patch
User: debian-sh4@superh.org
Usertags: sh4
X-Debbugs-CC: debian-superh@lists.debian.org


I am now trying to run Debian on Renesas SH CPU(sh4).
soci FTBFS on sh4. I checked on i386 by pbuilder, I get same bug.

make[4]: Entering directory
if i486-linux-gnu-g++ -DPACKAGE_NAME=\"SOCI\"
-I../../../../src/core -I../../../../src/core/test
-I../../../../src/backends/postgresql -I/usr/include
-I/usr/include/postgresql -UNDEBUG -U_DEBUG   -O2 -g -O2 -Wall
-pedantic -Wno-long-long -MT test-postgresql.o -MD -MP -MF
".deps/test-postgresql.Tpo" -c -o test-postgresql.o
test-postgresql.cpp; \
	then mv -f ".deps/test-postgresql.Tpo" ".deps/test-postgresql.Po";
else rm -f ".deps/test-postgresql.Tpo"; exit 1; fi
test-postgresql.cpp: In function 'void test3()':
test-postgresql.cpp:225: error: 'strncmp' was not declared in this scope
make[4]: *** [test-postgresql.o] Error 1
make[4]: Leaving directory
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/buildd/soci-3.0.0+cvs20081223/src/backends'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/buildd/soci-3.0.0+cvs20081223/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/buildd/soci-3.0.0+cvs20081223'
make: *** [build-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

I made a patch to revise to be able to build.
Would you apply it?

Best regards,

Nobuhiro Iwamatsu
--- a/src/backends/sqlite3/test/test-sqlite3.cpp	2008-07-31 12:24:52.000000000 +0900
+++ b/src/backends/sqlite3/test/test-sqlite3.cpp	2009-10-05 15:57:52.000000000 +0900
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <cmath>
 #include <ctime>
+#include <cstring>
 using namespace soci;
 using namespace soci::tests;
--- src/backends/postgresql/test/test-postgresql.cpp	2009-10-05 14:08:31.000000000 +0900
+++ src/backends/postgresql/test/test-postgresql.cpp.a	2009-10-05 16:17:02.000000000 +0900
@@ -15,6 +15,7 @@
 #include <cmath>
 #include <ctime>
 #include <cstdlib>
+#include <cstring>
 using namespace soci;
 using namespace soci::tests;

Reply to: