maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #03711
Unable to build connector-c
Hi,
I want to use mariadb client for Qt so I tried to build
mariadb-connector-c using the following parameters under Linux Mint 17.3
x64 xfce:
#!/bin/bash
version=2.3.0
pkg=mariadb-connector-c-$version-src.tar.gz
url=https://downloads.mariadb.org/f/connector-c-$version/$pkg
dir=$(basename $pkg .tar.gz)
if [ ! -d $dir ]; then
wget -c $url
tar -xf $pkg || exit 1
fi
pushd $dir
sed -i -e"s|ADD_SUBDIRECTORY(unittest/libmariadb)|#ADD_SUBDIRECTORY(unittest/libmariadb)|" CMakeLists.txt
sed -i -e"N; s|typedef unsigned short ushort;\n#endif|#endif\ntypedef unsigned
short ushort;|" include/my_global.h
sed -i -e"N; s|SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION.*||" libmariadb/CMakeLists.txt
sed -i -e"N; s|SOVERSION \${CPACK_PACKAGE_VERSION_MAJOR})||" libmariadb/CMakeLists.txt # Pig disgusting: the previous multiline thingie should've done it
sed -i -e"N; s|\${CPACK_PACKAGE_VERSION_MAJOR}||" libmariadb/CMakeLists.txt # Pig disgusting: what the fuck
mkdir build
pushd build
PKG_CONFIG_PATH=$SR/usr/lib/pkgconfig cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS=--sysroot="$SR" \
-DCMAKE_INSTALL_PREFIX="$SR/usr" \
-DCMAKE_C_COMPILER="$BR"gcc \
-DCMAKE_LINKER="$BR"ld \
-DCMAKE_AR="$BR"ar \
-DCMAKE_NM="$BR"nm \
-DCMAKE_OBJCOPY="$BR"objcopy \
-DCMAKE_OBJDUMP="$BR"objdump \
-DCMAKE_RANLIB="$BR"ranlib \
-DCMAKE_STRIP="$BR"strip \
-DICONV_INCLUDE_DIR="$SR/usr/include" \
-DICONV_LIBRARIES="$SR/usr/lib/libiconv.a" \
-DWITH_EXTERNAL_ZLIB=ON \
-DZLIB_INCLUDE_DIR="$SR/usr/include" \
-DZLIB_LIBRARY="$SR/usr/lib/libz.so" ../ || exit 1
make install || exit 1
popd
# ???
pwd
cp build/libmariadb/*.{a,so}"$SR/usr/lib/mariadb/" || exit 1
popd
But I get this error message:
/home/mbnoimi/Snippets/Scripts/Shell/create-mysql-qt-android-plugin/mariadb-connector-c-2.3.0-src/libmariadb/my_context.c: In function 'my_context_init':
/home/mbnoimi/Snippets/Scripts/Shell/create-mysql-qt-android-plugin/mariadb-connector-c-2.3.0-src/libmariadb/my_context.c:129:11: error: missing binaryoperator before token"("
#if sizeof(char *) > SIZEOF_INT*2
^
make[2]: *** [libmariadb/CMakeFiles/mariadb_obj.dir/my_context.c.o] Error 1
make[1]: *** [libmariadb/CMakeFiles/mariadb_obj.dir/all] Error 2
make: *** [all] Error 2
Changes:
diff: ./rootfs_files_before.txt: No such file or directory
mbnoimi@mbnoimi-laptop ~/Snippets/Scripts/Shell/create-mysql-qt-android-plugin $
How can I fix this issue?
NOTE: For full thread about this issue you can use this link
<https://forum.qt.io/topic/69038/unable-to-build-mysql-plugin>.
--
Best Regards,
Muhammad Bashir Al-Noimi
Skype+Telegram+GMail: mbnoimi