When I run configure.sh
I get this error:
checking for pkg-config... no
configure: error: pkg-config tool not found. Install it or set PKG_CONFIG environment variable to that path tool. Exiting...
I checked in aptitude and it says pkg-config is installed.
Need help with
"set PKG_CONFIG environment variable to that path tool."
runing on crunchbang 32bit
Try to set PKG_CONFIG=/usr/bin/pkg-config although it should be detected in such PATH automatically unless you've changed your PATH variable before.
You may also check if it is possible to pass path to pkg-config as a configure switch.
Check the output of ./configure --help | grep pkg.
Related
Trying to compile for linux from a mac throws this error, I have openssl and pkg-config installed from brew.
And in the file ~/.cargo/config I have this configuration.
[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"
Error:
error: failed to run custom build command for `openssl-sys v0.9.72`
Caused by:
process didn't exit successfully: `/Users/Proyect/cvm/target/release/build/openssl-sys-66182f9fe15cdddc/build-script-main` (exit status: 101)
run pkg_config fail: "`\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"` did not exit successfully: exit status: 1\nerror: could not find system library 'openssl' required by the 'openssl-sys' crate\n\n--- stderr\nPackage openssl was not found in the pkg-config search path.\nPerhaps you should add the directory containing `openssl.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'openssl' found\n"
--- stderr
thread 'main' panicked at '
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
compilation process.
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-apple-darwin
$TARGET = x86_64-unknown-linux-gnu
openssl-sys = 0.9.72
', /Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.72/build/find_normal.rs:180:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
The error message contains three possible solutions:
First make sure it is really installed including for development (which is what you need if you want to compile code against openssl):
Make sure you also have the development packages of openssl installed.
For example, libssl-dev on Ubuntu or openssl-devel on Fedora.
If it is already really installed, then it could not be found. This can be fixed by adding the directory containing `openssl.pc' to the PKG_CONFIG_PATH environment variable:
Package openssl was not found in the pkg-config search path. Perhaps
you should add the directory containing `openssl.pc' to the
PKG_CONFIG_PATH environment variable.
Or by setting the OPENSSL_DIR to point to where the openssl code is on your system:
Could not find directory of OpenSSL installation, and this -sys
crate cannot proceed without this knowledge. If OpenSSL is installed
and this crate had trouble finding it, you can set the OPENSSL_DIR
environment variable for the compilation process.
After a lot of trying and trying I found this script that compiles for linux from mac.
You just have to copy it to the root folder of the project and run it.
try add
[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"
to your Cargo.toml
I am trying to build a Rust app and I get the below when trying to build. This happened after I installed ndarray-linalg and ndarray.
I installed gcc and openvc. I am on macOS.
= note: ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I resolve this?
which gfortran
/usr/local/bin/gfortran
I found the library here:
ls /usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.*
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.5.dylib
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.dylib
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.a
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.spec
ldconfig -p | grep fortran
-bash: ldconfig: command not found
And also ran the below:
brew reinstall gcc
How can I make sure Rust will find it?
Check first if any of the env variables are set
DYLD_LIBRARY_PATH
DYLD_FALLBACK_LIBRARY_PATH
These variables tell the compiler where to look for libraries installed on the system. Built-in libraries are usually placed in /usr/lib, and homebrew places them in /usr/local/lib. So these should be in your lib path.
If for some reason you cant find your library there you can try
export DYLD_LIBARY_PATH=$DYLD_LIBARY_PATH:/usr/local/Cellar/gcc/8.2.0/lib/gcc/8
and if that does not work try with the other variables.
I am using gcc8.2 and linux operating system. I have bison package installed. Still I am getting the below error:
echo "* Error: No suitable bison/yacc found. *"
echo " Please install the 'bison' package."
exit 1
I have checked the "$ac_cv_prog_YACC" and it is not having any value. It should be set to "bison -y" if bison is already installed.
Any idea why $ac_cv_prog_YACC does not have any value?
I got this error when compiling the conntrack-tools package (version 1.0.1)
You say
I have bison package installed.
But the test in the ./configure file disagrees. That means that it cannot find an executable file named bison anywhere in your $PATH. You should start by verifying that $PATH has the correct value and that there is an executable named bison. (Apparently the ./configure script for conntrack-tools only looks for bison and byacc, and not for yacc.)
I don't know much about yocto but I did find the following note in a change log for version 2.5.1:
bison-native no longer included in many dependency chains meaning some recipes need bison-native adding to DEPENDS
I am trying to cross-compile climm-0.6.4 to windows under Ubuntu with the following command:
./configure --host=i686-pc-mingw32 --enable-ssl=gnutls
and I get this error message:
**checking for libgnutls-config... no
checking for libgnutls - version >= 0.8.8... no
*** The libgnutls-config script installed by LIBGNUTLS could not be found
*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the LIBGNUTLS_CONFIG environment variable to the
*** full path to libgnutls-config.**
After some research on the Internet I found a hint here:
The package's ./configure script is trying to invoke libgnutls-config
and/or libgnutls-extra-config to search for the gnutls library. Newer
versions of gnutls do not ship these scripts anymore.
and I am using gnutls-2.12.5
Does anybody have a patch or a kludge trick so that I am able to cross-compile climm-0.6.4 with gnutls-2.12.5?
Thank you in advance!
cheers
Daniel
Try the --with-libgnutls-prefix=PFX option to the configure script telling where the library is.
Other option in to set the environment variable LIBGNUTLS_CONFIG to a program that outputs just the parameters you need to compile/link the library.
Update:
Try the following script, name it mygnutls_config:
#!/bin/bash
if [ "$1" == "--version" ]
then
shift
EXTRA="--modversion"
else
EXTRA=""
fi
pkg-config gnutls $EXTRA "$#"
And then
$ chmod a+x mygnutls_config
$ LIBGNUTLS_CONFIG=`pwd`'/mignutls_config' ./configure --enable-ssl=gnutls
note that for this to work you need pkg-config to detect the crosscompilation configuration, not the native one. So you may need the PKG_CONFIG_LIBDIR environment variable to point to the directory where the appropriate gnutls.pc file is.
doing "cabal install hs-ffmpeg" fails like this:
checking for faacEncGetVersion in -lfaac... no
checking for zlibVersion in -lz... yes
checking for libdc1394... configure: error: Package requirements (libdc1394) were not met:
No package 'libdc1394' 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 libdc1394_CFLAGS
and libdc1394_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
cabal: Error: some packages failed to install:
hs-ffmpeg-0.3.4 failed during the configure step. The exception was:
exit: ExitFailure 1
I have libdc1394-22 and libdc1394-22-dev installed on Ubuntu 9.10 Karmic Koala.
I'm thinking that the dependency needs to be updated to reflect the new package that supercedes libdc1394, but I'm not sure how to do that.
hs-ffmpeg's configure script is looking for a libdc1394.pc. For some reason, Ubuntu ships a libdc1394-2.pc instead.
Edit hs-ffmpeg's configure.ac to use the "correct" name and then run autoreconf, and it should work.
Something like mkdir -p ~/.pc; ln -s /usr/lib/pkgconfig/libdc1394-2.pc ~/.pc/libdc1394.pc; export PKG_CONFIG_PATH+=:~/.pc may work too.