Linux software installation - override version of library in ./configure - linux

I'm trying to install the software TinyOWS on a Linux computer. The source code is written in C programming language. I don't have much experience with installing C or C++ programs from source code on Linux. I read installation instructions, and it says that I must follow 3 steps after I unzip the source code folder:
./configure
make
make install
When I run ./configure, I get the following error:
checking for xml2-config... /usr/bin/xml2-config
checking for libxml2 version... 2.7.6
configure: error: You need at least libxml 2.8.0
This means that the software being installed requires version 2.8.0 of a library called libxml2 but my computer only has the 2.7.6 version. Unfortunately I found out that I cannot easily install the libxml 2.8.0 on my Linux distribution. The reason why the software TinyOWS that I'm trying to install requires libxml2.8.0 of the library is because libxml2.7.6 has a small bug. But most of the functionality of the software is not affected by the bug.
So, here is my question:
What files do I have to edit or what command line options do I need to use If I want the ./configure command to use the library libxml2.7.6 instead of libxml2.8.0?

Get the source, in the file configure.in replace the line:
AC_MSG_ERROR([You need at least libxml 2.8.0])
By
AC_MSG_NOTICE([You need at least libxml 2.8.0])
Then, do:
autoreconf -f -i -s
./configure
make
The configure step will not stop. But i think if the developpers have restricted this version of libxml2 there must be a good reason.

Related

Problems between fftw-2.1.5 libraries and OpenMPI

I am trying to install the MPI FFTW2 libraries (fftw2.1.5) as I need them for a program that only works with that version. The specific library I need is "drfftw_mpi.h" so I try the followed:
./configure --enable-mpi --enable-type-prefix
But it always gives me the following error:
configure: error: couldn't find mpi library for --enable-mpi
In a previous question they solve it by running sudo ldconfig before, but for me it does not work giving the same error. For other mpi software they solve it in this post by passing mpicc as the right compiler to ./configure, with the CC flag CC=mpicc, something that does not work for me.
I have installed Open MPI version 4.0.3 on a Ubuntu 20.04 LTS, and when --enable-mpi is not used I was able to install "dfftw.h" "drfftw.h" "fftw.h" and "rfftw.h", do you have an idea of what I am doing wrong or what should I do to install "drfftw_mpi.h"?

flexdll error with ocaml on cygwin

I just did a fresh install of cygwin64 on windows 10.1.
I installed ocaml package (4.02.3) from the cygwin repository.
I have strange errors related to flexdll :
$ ocaml
OCaml version 4.02.3
#load "str.cma";;
Cannot load required shared library dllcamlstr.
Reason: /usr/lib/ocaml/stublibs/dllcamlstr.so: flexdll error: cannot relocate RELOC_REL32, target is too far: 0xfffffffc12c2a92a 0x12c2a92a.
Do you know what the problem is and how to circumvent it ? In fact, I encountered a similar issue while trying to compile findlib on cygwin from sources.
Best regards,
François
François,
I faced the same problem when trying to compile findlib under cygwin. I was using cygwin's package for ocaml.
My solution has been to uninstall the ocaml package(s) from cygwin, then download and compile ocaml from sources (that is version 4.03.0, instead of 4.02.3 packaged with cygwin), using the following to have the installation replace cygwin's ocaml software:
./configure -prefix /usr -no-curses
make world.opt
make install
Once ocaml installed from sources, configure and build findlib is successful:
cd findlib-1.7.1
./configure
make all
make opt
make install
I hope that helps,
David.

How to compile c++ programs in the new c++ driver provided by Datastax in Linux

I am new to Cassandra. I installed c++ driver from Datastax. Can some one please provide me the steps like in which path I have to create the ‘.c’ file and how I can compile it. I can see some example programs in example folder. Can anyone plz tell me how to compile the example programs.
The cpp-driver uses cmake and depends on libuv. So the first steps would be to ensure you have cmake installed as well as libuv. Depending on your linux distribution it may be as simple as using package manager like apt or yum (i.e. sudo apt-get install cmake libuv-dev)
Building is just a matter of running the following steps in the cpp-driver directory:
cmake .
make
sudo make install
This will install libcassandra.so to somewhere in your lib path. You can then link by providing '-lcassandra' in your parameters to clang or gcc (i.e. clang myfile.c -o myfile -lcassandra)
There is very comprehensive documentation on building from source here.

How to tell Autotools Build System (Guile 1.8.8) Where Libtool is Installed?

I am trying to build Guile 1.8.8 from source. I am stuck at the point where the build system is looking for libtool. I have installed it in a non-standard location.
I have already built Guile 2.0.11. In 2.0.11 build system, there is an explicit flag to configure --with-libltdl-prefix, which I think tells the build system where libtool is installed.
For Guile 1.8.8, I have Libtool installed in a non-standard location. How do I tell the build system where it is installed?
I am specifically getting error messages like:
libguile/Makefile.am:40: Libtool library used but `LIBTOOL' is undefined
libguile/Makefile.am:40: The usual way to define `LIBTOOL' is to add `LT_INIT'
I think in general this is a question regarding one or more of the autotools and how the build system finds programs / headers / libraries in non-standard locations.
This link is informative: How to point autoconf/automake to non-standard packages
Find the directory where *.m4 exists, which corresponds to libtool, or package which is in non-standard location.
export ACLOCAL_PATH=/path/to/m4/file
cd /path/to/configure.[in,ac]
autoreconf -if
./configure

Building mysql++ libraries for powerpc

I have an embedded application written in C++ (running on a PowerPC in linux environment) which accesses an external database. So my application needs mysql++ libraries which needs to be built using a powerpc compiler. Before building the libraries, I wanted to build mysql++ libraries for linux on my Ubuntu VM to check the procedure. I downloaded the latest package from Official Website. Then I followed the steps mentioned.
Ran ./configure from the root directory, I got the below error.
*checking for MySQL library directory... configure: error: Didn't find mysqlclient library in '/usr/lib64 /usr/lib /usr/lib64/mysql /usr/lib/mysql /usr/local/lib64 /usr/local/lib /usr/local/lib/mysql /usr/local/mysql/lib /usr/local/mysql/lib/mysql /usr/mysql/lib/mysql /opt/mysql/lib /opt/mysql/lib/mysql /sw/lib /sw/lib/mysql'*
I tried locate mysqlclient and did not find any references, hence I followed instructions given in other forums and tried to install the libmysqlclient15-dev using the below command.
sudo apt-get install libmysqlclient15-dev
The output is as shown below
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libmysqlclient-dev' instead of 'libmysqlclient15-dev'
libmysqlclient-dev is already the newest version.
The following packages were automatically installed and are no longer required:
libcommons-collections3-java junit4 libecj-java libdb5.1-java libasm3-java libgcj-bc gcj-4.6-jre-lib libgnomeui-common libcommons-el-java
junit linux-headers-3.2.0-32 linux-headers-3.2.0-29 libcommons-compress-java libregexp-java libdb-java libswt-cairo-gtk-3-jni libjasper-java
libbonoboui2-common libbonoboui2-0 libdb5.1-java-gcj libcommons-httpclient-java libservlet2.4-java liblucene2-java libswt-gtk-3-java
libcommons-cli-java libslf4j-java libgcj12 libxml-commons-external-java libswt-webkit-gtk-3-jni linux-headers-3.2.0-29-generic-pae
libswt-gtk-3-jni ant gcj-4.6-base libcommons-logging-java default-jdk libswt-glx-gtk-3-jni libcommons-codec-java jarwrapper
libequinox-osgi-java libgcj-common libapache-pom-java libgnomeui-0 libjetty-java libjline-java libxerces2-java sat4j
libcommons-beanutils-java libdb-je-java fastjar libcommons-digester-java libcommons-parent-java libhamcrest-java libjtidy-java
libxml-commons-resolver1.1-java libicu4j-java linux-headers-3.2.0-32-generic-pae libicu4j-4.4-java libwebkitgtk-1.0-common
libcommons-lang-java libwebkitgtk-1.0-0 libjavascriptcoregtk-1.0-0 libjsch-java ant-optional libswt-gnome-gtk-3-jni
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
After this I tried to locate libmysqlclient and I still couldn't find the libraries (.so files). I tried ./configure again and it failed in the same location with the same error message. How can I install libmysqlclient ?
Once this is solved I will rebuild the mysql++ library using my toolchain for powerpc. Has anyone tried this ? To build mysql++ library I need mysqlclient, in the earlier example I would install it by executing the command apt-get, but the libraries would be compiled using a gnu compiler ? How to cross compile mysqlclient for powerpc ? I guess I need to do the below
Build mysqlclient for powerpc.
Use those libraries and build mysql++ libraries for powerpc.
Use mysql++ and mysqlclient libraries in my application and compile for powerpc.
I am new to linux and databases.
I finally solved this problem. I did the below.
Downloaded the Connector/C (libmysql) source files from here
Cross compiled it for powerpc, below is the command given to cmake
cmake -DCMAKE_INSTALL_PREFIX="~/mysqlclient_C/lib" -DCMAKE_C_COMPILER="ppc_4xx-gcc" -DCMAKE_C_FLAGS="-I/opt/ELDK/4.2/ppc_4xx/usr/include/" -DCMAKE_CXX_COMPILER="ppc_4xx-g++" -DCMAKE_CXX_FLAGS="-I/opt/ELDK/4.2/ppc_4xx/usr/include/" -DCMAKE_EXE_LINKER_FLAGS="-lm"
Then a simple make generated the libmysql libraries.
Downloaded mysql++ source files from here
Cross compiled it for powerpc, below is my configure command
./configure --target=powerpc-linux --host=powerpc-linux --prefix="$HOME/mysql++/lib" --enable-thread-check --with-mysql="$HOME/mysqlclient_C/lib" CC=ppc_4xx-gcc CXX=ppc_4xx-g++ LDFLAGS=-lm CFFLAGS="-I/opt/ELDK/4.2/ppc_4xx/usr/include" CXXFLAGS="-I/opt/ELDK/4.2/ppc_4xx/usr/include"
The mysql++ libraries is generated now.
I have not tested the built libraries yet.

Resources