Which command fails to build with custom infodir - fedora

I have this rpm: which-2.20-12.fc23.src.rpm and I am trying to compile it with two different ways (one with gcc and one with llvm). What I do is:
export CC=clang
export CXX=clang++
rpmbuild --rebuild --define='dist .llvm.fc23' --define='_prefix /usr/llvm' which-2.20-12.fc23.src.rpm
export CC=gcc
export CXX=g++
rpmbuild --rebuild --define='dist .gcc.fc23' --define='_prefix /usr/gcc' which-2.20-12.fc23.src.rpm
My problem is that when I am trying to rebuild it with a different _prefix I have getting this error:
File not found: /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/which.info.gz
It is like which.info is never zipped... Any idea why this is happening? I overcome this issue by defining --define='_bindir %{_exec_prefix}/llvm'
Here is the spec:
Summary: Displays where a particular program in your path is located
Name: which
Version: 2.20
Release: 12%{?dist}
License: GPLv3
Group: Applications/System
Source0: http://www.xs4all.nl/~carlo17/which/%{name}-%{version}.tar.gz
Source1: which2.sh
Source2: which2.csh
Url: http://www.xs4all.nl/~carlo17/which/
Patch: which-2.19-afs.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: readline-devel
Requires(preun): /sbin/install-info
Requires(post): /sbin/install-info
%description
The which command shows the full pathname of a specified program, if
the specified program is in your PATH.
%prep
%setup -q
%patch -p1 -b .afs
%build
%configure
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -p -m 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%post
/sbin/install-info --quiet --info-dir=%{_infodir} %{_infodir}/which.info.gz
exit 0
%preun
if [ $1 = 0 ]; then
/sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/which.info.gz
fi
exit 0
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%license COPYING
%doc EXAMPLES README AUTHORS NEWS
%attr(0644,root,root) %{_sysconfdir}/profile.d/which2.*
%{_bindir}/*
%{_infodir}/which.info.gz
%{_mandir}/*/*
I think it fails in: %files -> %{_infodir}/which.info.gz
Here is the full output
$ rpmbuild --rebuild --define='dist .llvm.fc23' --define='_prefix /usr/llvm' which-2.20-12.fc23.src.rpm
Installing which-2.20-12.fc23.src.rpm
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.wsalfy
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd /home/vagrant/rpmbuild/BUILD
+ rm -rf which-2.20
+ /usr/bin/tar -xof -
+ /usr/bin/gzip -dc /home/vagrant/rpmbuild/SOURCES/which-2.20.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd which-2.20
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch (which-2.19-afs.patch):'
Patch (which-2.19-afs.patch):
+ /usr/bin/patch -p1 -b --suffix .afs --fuzz=0
patching file bash.c
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.DwQGsR
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd which-2.20
+ CFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/llvm/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/llvm/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
+ export LDFLAGS
+ '[' 1 = 1 ']'
+++ dirname ./configure
++ find . -name config.guess -o -name config.sub
+ '[' 1 = 1 ']'
+ '[' x '!=' x-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ']'
++ find . -name ltmain.sh
+ ./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr/llvm --exec-prefix=/usr/llvm --bindir=/usr/llvm/bin --sbindir=/usr/llvm/sbin --sysconfdir=/etc --datadir=/usr/llvm/share --includedir=/usr/llvm/include --libdir=/usr/llvm/lib64 --libexecdir=/usr/llvm/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/llvm/share/man --infodir=/usr/llvm/share/info
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for x86_64-redhat-linux-gnu-gcc... clang
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of clang... none
checking for a BSD-compatible install... /usr/bin/install -c
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking for xmalloc in libiberty.a... no
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for string.h... (cached) yes
checking libiberty.h usability... no
checking libiberty.h presence... no
checking for libiberty.h... no
checking whether stat file-mode macros are broken... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for strchr... yes
checking for memcpy... yes
checking for getopt_long... yes
checking for getcwd... yes
checking for getwd... yes
checking for ar... ar
checking for x86_64-redhat-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for stdlib.h... (cached) yes
checking for memory.h... (cached) yes
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking for strings.h... (cached) yes
checking for getpwent... yes
checking for getpwnam... yes
checking for getpwuid... yes
checking whether programs are able to redeclare getpw functions... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating maintMakefile
config.status: creating tilde/Makefile
config.status: creating config.h
config.status: executing depfiles commands
+ make
make all-recursive
make[1]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
Making all in tilde
make[2]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
clang -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c tilde.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
tilde.c:199:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (result = strchr (string, '~'))
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
tilde.c:199:14: note: place parentheses around the assignment to silence this warning
if (result = strchr (string, '~'))
^
( )
tilde.c:199:14: note: use '==' to turn this assignment into an equality comparison
if (result = strchr (string, '~'))
^
==
1 warning generated.
clang -DHAVE_CONFIG_H -I. -I.. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c shell.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
rm -f libtilde.a
ar cru libtilde.a tilde.o shell.o
ar: `u' modifier ignored since `D' is the default (see `U')
ranlib libtilde.a
make[2]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
Making all in .
make[2]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
clang -DHAVE_CONFIG_H -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c getopt.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
clang -DHAVE_CONFIG_H -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c getopt1.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
clang -DHAVE_CONFIG_H -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c bash.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
clang -DHAVE_CONFIG_H -I. -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c which.c
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
clang -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o which getopt.o getopt1.o bash.o which.o ./tilde/libtilde.a
clang: warning: argument unused during compilation: '-Wp,-D_FORTIFY_SOURCE=2'
clang: warning: argument unused during compilation: '-grecord-gcc-switches'
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1'
clang: warning: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
make[2]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
make[1]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.VmiScj
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ '[' /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64 '!=' / ']'
+ rm -rf /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64
++ dirname /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64
+ mkdir -p /home/vagrant/rpmbuild/BUILDROOT
+ mkdir /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64
+ cd which-2.20
+ rm -rf /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64
+ make install DESTDIR=/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64
make install-recursive
make[1]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
Making install in tilde
make[2]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
make[3]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
make[2]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20/tilde'
Making install in .
make[2]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
make[3]: Entering directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
test -z "/usr/llvm/bin" || /usr/bin/mkdir -p "/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/bin"
/usr/bin/install -c 'which' '/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/bin/which'
test -z "/usr/llvm/share/info" || /usr/bin/mkdir -p "/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info"
/usr/bin/install -c -m 644 './which.info' '/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/which.info'
install-info --info-dir='/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info' '/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/which.info'
test -z "/usr/llvm/share/man/man1" || /usr/bin/mkdir -p "/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/man/man1"
/usr/bin/install -c -m 644 './which.1' '/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/man/man1/which.1'
make[3]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
make[2]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
make[1]: Leaving directory '/home/vagrant/rpmbuild/BUILD/which-2.20'
+ mkdir -p /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/etc/profile.d
+ install -p -m 644 /home/vagrant/rpmbuild/SOURCES/which2.sh /home/vagrant/rpmbuild/SOURCES/which2.csh /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/etc/profile.d/
+ rm -f /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/dir
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/vagrant/rpmbuild/BUILD/which-2.20
extracting debug info from /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/bin/which
dwz: Too few files for multifile optimization
/usr/lib/rpm/sepdebugcrcfix: Updated 1 CRC32s, 0 CRC32s did match.
99 blocks
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: which-2.20-12.llvm.fc23.x86_64
error: File not found: /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/which.info.gz
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.XofvML
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd which-2.20
+ DOCDIR=/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ export DOCDIR
+ /usr/bin/mkdir -p /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ cp -pr EXAMPLES /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ cp -pr README /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ cp -pr AUTHORS /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ cp -pr NEWS /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/doc/which
+ exit 0
Executing(%license): /bin/sh -e /var/tmp/rpm-tmp.bWadpe
+ umask 022
+ cd /home/vagrant/rpmbuild/BUILD
+ cd which-2.20
+ LICENSEDIR=/home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/licenses/which
+ export LICENSEDIR
+ /usr/bin/mkdir -p /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/licenses/which
+ cp -pr COPYING /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/licenses/which
+ exit 0
RPM build errors:
File not found: /home/vagrant/rpmbuild/BUILDROOT/which-2.20-12.llvm.fc23.x86_64/usr/llvm/share/info/which.info.gz

Related

Getting compilation error while building Valgrind for MIPS 64-bit

Getting below error while compiling Valgrind for Cavium MIPS
/opt/cavium-64bit/tools-3535/bin/mips64-octeon-linux-gnu-gcc -std=c99
-msoft-float -Wall -mabi=64 -G 0 -fPIC -mips64r2 -mplt -DHAVE_CONFIG_H -I. -I.. -I.. -I../include -I../include -I../VEX/pub -I../VEX/pub -DVGA_mips64=1 -DVGO_linux=1 -DVGP_mips64_linux=1 -DVGPV_mips64_linux_vanilla=1 -DVGABI_64 -I../coregrind -DVG_LIBDIR="\"/usr/local/lib/valgrind"\" -DVG_PLATFORM="\"mips64-linux\"" -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-security -Wignored-qualifiers -Wmissing-parameter-type -Wlogical-op -Wold-style-declaration -finline-functions -fno-stack-protector -fno-strict-aliasing -fno-builtin -march=octeon2 -mabi=64 -MT libnolto_coregrind_mips64_linux_a-m_main.o -MD -MP -MF .deps/libnolto_coregrind_mips64_linux_a-m_main.Tpo -c -o
libnolto_coregrind_mips64_linux_a-m_main.o test -f 'm_main.c' || echo
'./'m_main.c m_main.c:2885:1: error: expected declaration specifiers
or ‘...’ before string constant Makefile:8044: recipe for target
'libnolto_coregrind_mips64_linux_a-m_main.o' failed make[3]: *
[libnolto_coregrind_mips64_linux_a-m_main.o] Error 1 make[3]: Leaving
directory '/home/ankit/Desktop/valgrind/valgrind-3.15.0/coregrind'
Makefile:1914: recipe for target 'all' failed make[2]: [all] Error
2 make[2]: Leaving directory
'/home/ankit/Desktop/valgrind/valgrind-3.15.0/coregrind' Makefile:841:
recipe for target 'all-recursive' failed make[1]: [all-recursive]
Error 1 make[1]: Leaving directory
'/home/ankit/Desktop/valgrind/valgrind-3.15.0' Makefile:710: recipe
for target 'all' failed make: * [all] Error 2
Procedure to build Valgrind binary for MIPS Architecture
Get latest Valgrind source code from (https://valgrind.org/downloads/)
wget
https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2
Extract the tarball
tar -xvf valgrind-3.15.0.tar.bz2
On Bash prompt export below makefile defines
CC=/opt/CAVIUMsdk312/OCTEON-SDK/tools/bin/mips64-octeon-linux-gnu-gcc
CXX=/opt/CAVIUMsdk312/OCTEON-SDK/tools/bin/mips64-octeon-linux-gnu-g++
./configure --host=mips64-octeon-linux --target=mips64-octeon-linux
CFLAGS=" -march=octeon2 -mabi=64"
After configure is successfully executed do make in the directory
make​
To run Valgrind on target follow the below procedure
Copy the valgrind folder to target machine, Ex: /etc/user/
cd /etc/user/valgrind-3.15.0
touch /etc/user/valgrind-3.15.0/memcheck/default.supp
export VALGRIND_LIB=$PWD/memcheck/
export LD_LIBRARY_PATH=/usr/sbin/user/sharedobj/
./coregrind/valgrind --tool=memcheck --gen-suppressions=yes --leak-check=full -v
--track-origins=yes <Daemon>​

error: invalid application of 'sizeof' to an incomplete type 'struct snd_codec_metadata'

I am getting the following exception while building the ROM for a lineageos project and need some help diagnosing and resolving the issue:
FAILED: /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/audio.primary.msm8937_intermediates/audio_extn/utils.o
/bin/bash -c "PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang -I device/lenovo/tb8504f/include -I /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/usr/include -I /home/lineageos/out/target/product/tb8504f/obj/KERNEL_OBJ/usr/techpack/audio/include -I /home/lineageos/out/target/product/tb8504f/obj/vendor/qcom/opensource/audio-kernel/include -I external/tinyalsa/include -I external/tinycompress/include -I system/media/audio_utils/include -I external/expat/lib -I hardware/libhardware/include -I system/media/audio_route/include -I system/media/audio_effects/include -I hardware/qcom/audio-caf/msm8996/hal/msm8916 -I hardware/qcom/audio-caf/msm8996/hal/audio_extn -I hardware/qcom/audio-caf/msm8996/hal/voice_extn -I /home/lineageos/out/target/product/tb8504f/obj/include/mm-audio/sound_trigger -I hardware/qcom/audio-caf/msm8996/hal -I /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/audio.primary.msm8937_intermediates -I /home/lineageos/out/target/product/tb8504f/gen/SHARED_LIBRARIES/audio.primary.msm8937_intermediates -I libnativehelper/include_deprecated \$(cat /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/audio.primary.msm8937_intermediates/import_includes) -I system/core/include -I system/media/audio/include -I hardware/libhardware_legacy/include -I hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I frameworks/native/opengl/include -I frameworks/av/include -isystem /home/lineageos/out/target/product/tb8504f/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -c -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=\$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -std=gnu99 -O2 -fomit-frame-pointer -fstrict-aliasing -DPLATFORM_MSM8916 -DUSE_VENDOR_EXTN -DHDMI_EDID -DUSE_LL_AS_PRIMARY_OUTPUT -DPCM_OFFLOAD_ENABLED -DANC_HEADSET_ENABLED -DHIFI_AUDIO_ENABLED -DVBAT_MONITOR_ENABLED -DFLUENCE_ENABLED -DAFE_PROXY_ENABLED -DKPI_OPTIMIZE_ENABLED -DFM_POWER_OPT -DHFP_ENABLED -DCUSTOM_STEREO_ENABLED -DMULTI_VOICE_SESSION_ENABLED -DCOMPRESS_VOIP_ENABLED -DAUDIO_EXTN_FORMATS_ENABLED -DSPKR_PROT_ENABLED -DHW_VARIANTS_ENABLED -DFLAC_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DFLAC_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DVORBIS_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DWMA_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DALAC_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DAPE_OFFLOAD_ENABLED -DCOMPRESS_METADATA_NEEDED -DPCM_OFFLOAD_ENABLED_24 -DDEV_ARBI_ENABLED -DDOLBY_ACDB_LICENSE -DDS2_DOLBY_DAP_ENABLED -DDS1_DOLBY_DDP_ENABLED -DSOURCE_TRACKING_ENABLED -DAUDIO_EXTERNAL_HDMI_ENABLED -DSOUND_TRIGGER_ENABLED -DSOUND_TRIGGER_PLATFORM_NAME=msm8937 -Wall -Werror -fPIC -D_USING_LIBCXX -Wno-unused-variable -Wno-unused-function -Wno-missing-field-initializers -DANDROID_STRICT -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/audio.primary.msm8937_intermediates/audio_extn/utils.d -o /home/lineageos/out/target/product/tb8504f/obj_arm/SHARED_LIBRARIES/audio.primary.msm8937_intermediates/audio_extn/utils.o hardware/qcom/audio-caf/msm8996/hal/audio_extn/utils.c"
hardware/qcom/audio-caf/msm8996/hal/audio_extn/utils.c:1336:14: error: use of undeclared identifier 'SND_AUDIOCODEC_DSD'
id = SND_AUDIOCODEC_DSD;
^
hardware/qcom/audio-caf/msm8996/hal/audio_extn/utils.c:1339:14: error: use of undeclared identifier 'SND_AUDIOCODEC_APTX'
id = SND_AUDIOCODEC_APTX;
^
2 errors generated.
Device tree:= https://github.com/darran-kelinske-fivestars/android_device_lenovo_tb8504f/tree/lineage-15.1
Vendor tree:= https://github.com/darran-kelinske-fivestars/android_vendor_lenovo_tb8504f/tree/lineage-15.1
Kernel source:= https://github.com/darran-kelinske-fivestars/android_kernel_lenovo_tb8504f/tree/lineage-15.1
ROM Source:= https://github.com/LineageOS/android
Command:
source build/envsetup.sh && brunch tb8504f
The issue was that I was missing definitions in the kernel uapi includes. Once I added these definitions, I was able to get passed the build issue. I had imported a kernel from Lenovo that did not include the definitions that the xiami kernel had.
https://github.com/redmidevs/android_kernel_xiaomi_msm8917/commit/b33b025abaf5213ccfe1b5e17f75785163eb696a
#define SND_AUDIOCODEC_DSD ((__u32) 0x00000021)
#define SND_AUDIOCODEC_MAX SND_AUDIOCODEC_DSD
and
https://github.com/redmidevs/android_kernel_xiaomi_msm8917/commit/ae0ff772885768103d03ea01c9084990938f15a5
struct snd_dec_aptx {
__u32 lap;
__u32 uap;
__u32 nap;
};

cgicc make fails when trying to install cgicc libraries for c++ web programming

I'm a newbie to c++ web programming. I followed the link tutorialspoint for C++ web programming.
http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm
I installed the cgicc library, confirgures it but will making i get the following error: I need to usecgicc libraries to make my html work.
Making all in cgicc
make[1]: Entering directory '/path/to/cgicc-3.0.2/cgicc'
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiEnvironment.cc
mkdir .libs
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c -fPIC -DPIC CgiEnvironment.cc -o .libs/CgiEnvironment.lo
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiEnvironment.cc -o CgiEnvironment.o >/dev/null 2>&1
mv -f .libs/CgiEnvironment.lo CgiEnvironment.lo
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c CgiUtils.cc
rm -f .libs/CgiUtils.lo
c++ -DHAVE_CONFIG_H -I. -I. -I. -I.. -g -O2 -c -fPIC -DPIC CgiUtils.cc -o .libs/CgiUtils.lo
CgiUtils.cc:111:30: error: 'string' does not name a type
CGICCNS unescapeString(const string& src)
^
CgiUtils.cc:111:41: error: 'std::__cxx11::string cgicc::unescapeString(const int&)' should have been declared inside 'cgicc'
CGICCNS unescapeString(const string& src)
^
CgiUtils.cc: In function 'std::__cxx11::string cgicc::unescapeString(const int&)':
CgiUtils.cc:117:18: error: request for member 'begin' in 'src', which is of non-class type 'const int'
for(iter = src.begin(); iter != src.end(); ++iter) {
^
CgiUtils.cc:117:39: error: request for member 'end' in 'src', which is of non-class type 'const int'
for(iter = src.begin(); iter != src.end(); ++iter) {
^
Makefile:229: recipe for target 'CgiUtils.lo' failed
make[1]: * [CgiUtils.lo] Error 1
make[1]: Leaving directory '/path/to/cgicc-3.0.2/cgicc'
Makefile:161: recipe for target 'all-recursive' failed
make: * [all-recursive] Error 1
Please tell me where I'm going wrong! Is there anything else i need to do

I cant install oj ruby gem on windows 7 64

I tried to install oj ruby gem
gem install oj -v '1.3.5'
Here's the output log
C:/Ruby192/bin/ruby.exe extconf.rb
Creating Makefile for ruby version 1.9.2 <<<<<
creating Makefile
make
C:/Ruby192/bin/ruby -e "puts 'EXPORTS', 'Init_oj'" > oj-i386-mingw32.def
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o cache.o -c cache.c
cache.c: In function 'oj_cache_new':
cache.c:54:5: warning: implicit declaration of function 'bzero'
cache.c:54:5: warning: incompatible implicit declaration of built-in function 'bzero'
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o cache8.o -c cache8.c
gcc -I. -IC:/Ruby192/include/ruby-1.9.1/i386-mingw32 -I/C/Ruby192/include/ruby-1.9.1/ruby/backward -I/C/Ruby192/include/ruby-1.9.1 -I. -DRUBY_TYPE=ruby -DRUBY_RUBY -DRUBY_VERSION=1.9.2 -DRUBY_VERSION_MAJOR=1 -DRUBY_VERSION_MINOR=9 -DRUBY_VERSION_MICRO=2 -DHAS_RB_TIME_TIMESPEC=0 -DHAS_ENCODING_SUPPORT=1 -DHAS_NANO_TIME=1 -DHAS_RSTRUCT=1 -DHAS_IVAR_HELPERS=1 -DHAS_EXCEPTION_MAGIC=0 -DHAS_PROC_WITH_BLOCK=1 -DHAS_TOP_LEVEL_ST_H=0 -DSAFE_CACHE -Wall -O3 -g -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o dump.o -c dump.c
In file included from c:/Ruby192/include/ruby-1.9.1/ruby/defines.h:205:0,
from c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:74,
from c:/Ruby192/include/ruby-1.9.1/ruby.h:32,
from oj.h:43,
from dump.c:39:
c:/Ruby192/include/ruby-1.9.1/ruby/win32.h:272:12: error: conflicting types for 'gettimeofday'
c:\devkit\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:39:29: note: previous declaration of 'gettimeofday' was here
In file included from c:/Ruby192/include/ruby-1.9.1/ruby/ruby.h:1326:0,
from c:/Ruby192/include/ruby-1.9.1/ruby.h:32,
from oj.h:43,
from dump.c:39:
c:/Ruby192/include/ruby-1.9.1/ruby/missing.h:42:8: error: redefinition of 'struct timezone'
c:\devkit\mingw\bin\../lib/gcc/mingw32/4.5.2/../../../../include/sys/time.h:26:8: note: originally defined here
In file included from dump.c:39:0:
oj.h:50:21: fatal error: pthread.h: No such file or directory
compilation terminated.
make: *** [dump.o] Error 1
I am running windows 7 x64, ruby 1.92, rails 3.1.
Any idea how can I install the oj gem?
Thanks
New release from OJ fixed the windows problems.
I installed OJ 1.4.3

Ruby - Gem - mysql - Failed to build gem native extension

since two days I'm facing a problem I can't solve. I'm trying to install redmine on a debian machine. When it comes to installation for the gem mysql it fails. I don't know what to do anymore. My last instance is your help.
Error
root#host:~# gem1.8 install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.8
--with-mysql-config
--without-mysql-config
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api/gem_make.out
What I've tried
Installing packages by instruction: http://wiki.rubyonrails.org/database-support/mysql#linux_ubuntu
installing with mysql_config parameter
root#host:~# find / -name mysql_config
/usr/bin/mysql_config
root#host:~# gem1.8 install mysql -- --with-mysql-config=/usr/bin/mysql_config
System
user#host:~# uname -a
Linux www.example.org 2.6.18-028stab070.4 #1 SMP Tue Aug 17 18:32:47 MSD 2010 x86_64 GNU/Linux
root#s15428277:~# aptitude search '~i (mysql|ruby)|mysql.*dev'
i A libdbd-mysql-perl - A Perl5 database interface to the MySQL database
p libghc6-hsql-mysql-dev - Multi-Database Interface System for Haskell
p libgnademysql-dev - GNat Ada Database Environment - MySQL programming interface
p liblua5.1-sql-mysql-dev - luasql development files for the lua language version 5.1
i libmysql++-dev - mysql C++ library bindings (development)
i A libmysql++2c2a - mysql C++ library bindings (runtime)
p libmysql-ocaml-dev - OCaml bindings for MySql
v libmysqlclient-dev -
i libmysqlclient15-dev - MySQL database development files
i A libmysqlclient15off - MySQL database client library
i libopenssl-ruby1.8 - OpenSSL interface for Ruby 1.8
i A libreadline-ruby1.8 - Readline interface for Ruby 1.8
i A libruby1.8 - Libraries necessary to run Ruby 1.8
i libsqlite3-ruby1.8 - SQLite3 interface for Ruby 1.8
i A mysql-client-5.0 - MySQL database client binaries
i A mysql-common - MySQL database common files
i mysql-server - MySQL database server (metapackage depending on the latest version)
i A mysql-server-5.0 - MySQL database server binaries
i ruby1.8 - Interpreter of object-oriented scripting language Ruby 1.8
i ruby1.8-dev - Header files for compiling extension modules for the Ruby 1.8
root#host:~# gem1.8 --version
1.3.7
root#host:~# ruby1.8 --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
Files
mkmf.log
have_func: checking for mysql_ssl_set()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_ssl_set; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { mysql_ssl_set(); return 0; }
/* end */
--------------------
have_func: checking for rb_str_set_len()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_str_set_len; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_str_set_len(); return 0; }
/* end */
--------------------
have_func: checking for rb_thread_start_timer()... -------------------- no
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))rb_thread_start_timer; return 0; }
/* end */
"cc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/usr/lib/mysql -lmysqlclient -lruby1.8-static -L/usr/lib/mysql -lmysqlclient -lpthread -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { rb_thread_start_timer(); return 0; }
/* end */
--------------------
have_header: checking for mysql.h... -------------------- no
"cc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include
/* end */
--------------------
have_header: checking for mysql/mysql.h... -------------------- no
"cc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/usr/lib/ruby/gems/1.8/gems/mysql-2.8.1/ext/mysql_api -I/usr/include/mysql -DBIG_JOINS=1 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include
/* end */
--------------------
It looks like you are on the right track. Even though you appear to have the mysql libraries installed, you need to ensure that the MySQL development header files and their dependencies are fully installed in order for the MySQL gem to be compiled.
Try:
sudo apt-get install mysql-dev
And then:
sudo gem install mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Clearly, the exact command depends upon where the mysql-dev files are installed.
I had the same problem.
The solution for me was to install ruby-dev.
Maybe it helps somebody else, I see you've already solved your porblem.