From: guido-mysqlpp Date: September 3 2012 4:29pm Subject: Mysql++ won't compile on CentOS 6 (patch included) List-Archive: http://lists.mysql.com/plusplus/9533 Message-Id: <1502841.ScpMt57Ifr@pc10> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Hi, I have just tried to compile MySQL++ 3.1.0 on CentOS 6, using rpmbuild and the included spec file. Unfortunately, the compilation failed because one of the cpp file (ssx/genv2.cpp) failed to include the C header "string.h" when it needed to: ============= g++ -c -o ssqlsxlat_genv2.o -Ilib -I/usr/include/mysql -O2 -g ./ssx/genv2.cpp ./ssx/genv2.cpp: In function 'bool generate_ssqls2(const char*, const ParseV2*)': ./ssx/genv2.cpp:70: error: 'strcmp' was not declared in this scope make: *** [ssqlsxlat_genv2.o] Error 1 make: *** Waiting for unfinished jobs.... error: Bad exit status from /var/tmp/rpm-tmp.AbkTZr (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.AbkTZr (%build) ============= Here is a patch that will include the needed header: ============= diff -ur mysql++-3.1.0-orig/ssx/genv2.cpp mysql++-3.1.0/ssx/genv2.cpp --- mysql++-3.1.0-orig/ssx/genv2.cpp 2010-06-03 19:59:23.000000000 +0200 +++ mysql++-3.1.0/ssx/genv2.cpp 2012-09-03 18:11:49.705151656 +0200 @@ -32,6 +32,8 @@ #include "parsev2.h" +#include + #include #include #include ============= And here's a patch for the spec file to make sure it will actually use the patch above: ============= --- mysql++-3.1.0-orig/mysql++.spec 2010-06-03 19:59:36.000000000 +0200 +++ rpmbuild/SPECS/mysql++.spec 2012-09-03 18:19:40.488155405 +0200 @@ -1,11 +1,12 @@ Summary: C++ wrapper for the MySQL C API Name: mysql++ Version: 3.1.0 -Release: 1%{?dist} +Release: 2%{?dist} License: LGPL Group: Development/Libraries URL: http://tangentsoft.net/mysql++/ Source0: http://tangentsoft.net/mysql++/releases/mysql++-%{version}.tar.gz +Patch1: mysql++-include-string.h.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: mysql-devel @@ -35,6 +36,7 @@ %prep %setup -q +%patch1 -p1 # Fakery for nodoc case if [ ! -e doc/README-devel-RPM.txt ] ============= Regards, Guido