I'm on Mac OS X Mountain Lion and a newbie to autotools and other GNU build tools. I'm trying to build a custom version of json-c to use with a a C project (axis2/c). After running the auto tools, and I run the configure command I get a failure with this output:
checking whether to use JSON... yes
checking for JSON... no
configure: error: Package requirements (json) were not met:
No package 'json' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables JSON_CFLAGS
and JSON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
If I install json-c from macports, configure runs properly. Unfortunately, the project needs a later version of json-c, than what is available in macports (even though this is successful in the configure stage, it later results in a compilation error).
When I install this manually from source, I see that the libs are there in /usr/local/lib and header files in /usr/local/include/json-c. After removing any json-c files that came from macports, I tried copying these repective to the locations in /opt/local/lib and /opt/local/include/json-c but it still resulted in the same package not found error.
What does macports do differently that the package is 'found' when you run configure? Can I replicate the same when I manually install json-c from source?
Thanks in advance.
Macports creates a .pc file with under /opt/local/pkgconfig/. In this case it was json.pc. I edited that to point to the locations in /usr/local and the configure found and used the package I manually built from source.
Related
I have cloned "https://gitlab.gnome.org/GNOME/msitools/-/tree/v0.100" in my Centos7 host and trying to build, but facing following error and even though required package is already installed, it still doesn't work.
Below is the error I am getting when tried to build the code using the "autogen.sh" in the code base.
Error:
Checking for GSF... no configure: error: Package requirements (libgsf-1) were not met: No package 'libgsf-1' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GSF_CFLAGS
and GSF_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
But the issue is I have the libgsf rpm already installed
[meuser#localhost msitools]$ rpm -qa | grep libgsf
libgsf-1.14.26-7.el7.x86_64
Thanks in advance for the help !
When building software on top of another package, you should install the development package, which will contain the necessary stuff like include headers, pkg-config files (which it's looking for here) and others.
CentOS/Fedora in general denote development packages by adding a "-devel" suffix, which is also the case here. So the package you're looking for is libgsf-devel
I am trying to run simulations using Gadget2, an astrophysics N-body simulation package. It requires a few libraries, including fftw-2.1.5. I have installed fftw using the guidelines given in the user manual:
./configure --prefix=<PATH> --enable-typeprefix --enable-mpi
make
make install
make clean
./configure --prefix=<PATH> --enable-float--enable-type-prefix --enable-mpi
make
make install
The two makes are to get both single and double precision files according to this source. The install happened successfully, and I was also able to compile Gadget2.
But when I try to run Gadget2, I get the following error:
./Gadget2: error while loading shared libraries: libsrfftw_mpi.so.2: cannot open shared object file: No such file or directory
The file libsrfftw_mpi.so.2 is missing in the fftw lib folder, even though a few download sites for fftw packages say that it is part of the contents. What am I missing?
Specify the below and run your command again.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH=<PATH from your install command>
also don't forget to additionally specify --enable-shared for both configure commands.
I have been trying to install the Geany plugins since yesterday but unsuccessfully.
I am using a mac os Sierra version 10.12.6
I installed Geany 1.31 on my mac.
and here are the steps I follow to install the plugins:
1- I dowloaded the plugins folder
then on the terminal I type:
cd /Users/davidabitbol/Downloads/untitled\ folder/geany-plugins-1.31
then
./configure
and here it does not work. this is what I get:
Package geany was not found in the pkg-config search path.
Perhaps you should add the directory containing `geany.pc'
to the PKG_CONFIG_PATH environment variable
No package 'geany' found
checking for GEANY... no
configure: error: Package requirements (geany >= 1.29) were not met:
No package 'geany' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables GEANY_CFLAGS
and GEANY_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
I can't manage to solve this issue.
Any idea what should be done?
thanks
I am trying to install guile locally on a system. It requires gnu/libtool. While installing all its dependencies, the "make check" command showed errors while installing gnu/libtool. But if I omitted the command and simply ran "make" followed by "make install", then it was able to install successfully. I was able to install the rest of the dependencies without any problem. However, when I run the following command, then I am getting the below mentioned error:
Command:
../configure --with-libltdl-prefix=$PREFIX/libtool --with-libgmp-prefix=$PREFIX/gmp --with-libunistring-prefix=$PREFIX/libunistring --with-libiconv-prefix=$PREFIX/libiconv --with-libreadline-prefix=$PREFIX/libreadline --with-libintl-prefix=$PREFIX/gettext --prefix=$PREFIX/guile
Error:
configure: error: GNU libltdl (Libtool) not found, see README.
the $PREFIX is defined and I have installed the libltdl library in the libtool folder. When I look through the include and lib sub directories of the libtool folder, I can find the libltdl folders and .so files.
So, I am unsure as to why the configure script is not able to find the locally installed version of libtool. I will be highly grateful if someone can point out the problem in the command and how to remedy this error.
I had a similar issue when trying to compile bind9 using distcc under Rasbian. I had previously installed the package libtool but I was also missing the package libtool-bin.
That solved my issue.
Try
apt list libtool* --installed
and see if both show up.
When attempting to compile RNNLib, I got an error in NetcdfDataset.hpp:26:24 saying that Netcdfcpp.h could not be found. I looked around and found a bug report from 2011 that suggested that this was a bug, but it claimed to have been fixed. I have tried everything I can think of, including rebuilding NetCDF (a dependency of RNNLib) with various different flags, and have been unable to fix this bug. Can anyone give me a hand?
I had some trouble on a virtual machine building rnnlib.
I had to install the C and C++ version of NetCDF to get it to work.
The C version can be installed via sudo apt-get install libnetcdf-dev
I had to install the C++ version by building it.
Hope it will help. It's quite a difficult lib to install.
Maybe this helps someone: you can avoid some of the pain by installing packages from APT, and access the correct version mentioned by user3620756, which contains the netcdfcpp.h header file
. This happens through a legacy package, available on Ubuntun 16.04 (Xenial universe, see APT repository).
First install libnetcdf for C, then install libnetcdf-cxx-legacy-dev which should depend on libnetcdf-c++4 and install required C++ libraries on the go:
sudo apt install libnetcdf-dev libnetcdf-cxx-legacy-dev
The newest version doesn't have this netcdfcpp.h file anymore.
I had to use ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2.tar.gz to get it working.
I have also followed the same process and it worked for me
"The newest version doesn't have this netcdfcpp.h file anymore. I had to use ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-cxx-4.2.tar.gz to get it working."
After downloading the folder, I had to build it by entering into the netcdf folder. I used simple command for the task :
.\configure
make
sudo make install
But in the file named as "NetcdfDataset.hpp", I have to give the complete path of the netcdfcpp.h file. For my case the path of the include file is :
#include "/Volumes/Macintosh_HD_2/WordSpottingProj/trunk/CODE C++/rnnlib_source_forge_version/netcdf-cxx-4.2/cxx/netcdfcpp.h"
I had this problem in the context of trying to use a makefile that called for netcdfcpp.h:
$ make -f makefile_MAC
c++ -O2 -o burn7.x burn7.cpp -I/opt/local/include -L/opt/local/lib -lm -lnetcdf_c++
burn7.cpp:31:10: fatal error: 'netcdfcpp.h' file not found
#include <netcdfcpp.h>
^
1 error generated.
make: *** [burn7.x] Error 1
I'm on a Mac, so I used Homewbrew to install the NetCDF package, but version 4.3.3.1 didn't appear to have netcdfcpp.h:
brew install homebrew/science/netcdf
However, I found that installing it with an additional flag resulted in this version being included:
brew install homebrew/science/netcdf --with-cxx-compat
I assume that the same is true of other installation/compilation methods, and not that this file has been taken out of versions since 4.2 as others answers state. Maybe it was a default option before and now it isn't?