"AM_PROG_LIBTOOL" not found in library - autoconf

I got an error while trying to compile a library in centOS 7, and i tried reinstall libtool but it does not help. Below is the error
+ autoreconf --install
configure.ac:32: warning: macro 'AM_PROG_LIBTOOL' not found in library
configure.ac:32: error: possibly undefined macro: AM_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

I solved it just by:
sudo yum install libtool

You might need: autoreconf -fvi to make sure everything is updated.
It's also worth noting that AM_PROG_LIBTOOL is deprecated, and should be replaced with LT_INIT, and optionally with LT_PREREQ beforehand.

Related

Seeing bzlib.h not found when trying the Bindgen tutorial

I know there is a similar post to this but I followed it and I'm still seeing the issue so I thought I'd ask again sorry. I downloaded the bbindgen-tutorial-bzip2-sys and tried to run it but I get the following error
wrapper.h:1:10: fatal error: 'bzlib.h' file not found
wrapper.h:1:10: fatal error: 'bzlib.h' file not found, err: true
The other user suggested downgrading the Bindgen version in the .toml and I tried that and I still see the issue, also I verified that bzip2 is installed.
Is there a known clang version that works with Bindgen?
Thanks
-------------------------------------------------------Update------------------------------------------------------------------
So I installed the dev bzip files and verified that the library was in a folder that ld looked at by adding the path to LD_LIBRARY_PATH and then updating with ldconfig. I am now able to compile when I run CARGO BUILD,
fred#fred-MS-7B06:~/rust_projects/bindgen-tutorial-bzip2-sys-master$ cargo build
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
however now when I try to run the program with CARGO TEST, as per the tutorial
https://rust-lang.github.io/rust-bindgen/print.html#include-the-generated-bindings-in-srclibrs
I now get the following error:
= note: /bin/ld: cannot find -lbz2
collect2: error: ld returned 1 exit status
I found a post that appeared to have the same issue:
https://dev.to/rrampage/cargo-refused-to-build-my-project---a-rust-debugging-story-25e9
And they fixed it by adding a config.toml file and specified the linker, I tried this and still got the same error. Any ideas as to what I can check I'm a little stuck on this one.
Also I checked the bzip2 dev file that I downloaded from the website:
https://www.sourceware.org/bzip2/
I noticed that there is no file called bz2 but there is a libbz2.def and a libbz2.dsp file, is it possible my ld is incorrectly removing the "lib" from the name?
As noted by #Jmb in the comments, I needed to install libbz2-dev:
sudo apt install libbz2-dev
Since this was a fairly new WSL instance of Ubuntu, I also needed libclang-dev:
sudo apt install libclang-dev

Graph-tool/Autoconf - configure.ac:39: error: possibly undefined macro: PKG_INSTALLDIR

I have been trying to compile graph-tool from source. When running ./autogen.sh I receive the following error message:
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:39: error: possibly undefined macro: PKG_INSTALLDIR
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
I have been told that this is because I am missing pkg-config (http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/graph-triangulation-cc-55-61-fatal-error-CGAL-Periodic-3-Delaunay-triangulation-traits-3-h-No-such-fy-td4026810.html#a4026824) but pkg-config is already running on my machine and is of the latest version. Running dpkg -l pkg-config returns:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii pkg-config 0.26-1ubuntu4 amd64 manage compile and link flags for libraries
Does anybody know how I might be able to fix this problem or what it is being caused by? I am running Ubuntu 14.04.
It looks like you're not the only one. It seems that the PKG_INSTALLDIR breaks pkg-config versions earlier than 0.27 as experienced by someone else here.
There doesn't seem to be a PPA for 14.04 with pkg-config > 0.26, from my brief search. You'll probably have to build it yourself.

Can't install cabal-install

I've just installed Mint 17 on my laptop and followed this with haskell platform generic. (I chose generic instead of using apt-get because it was the only way I could get ghc 7.10) When I try:
cabal install cabal-install
I get this error:
Resolving dependencies...
Configuring cabal-install-1.22.6.0...
Failed to install cabal-install-1.22.6.0
Build log ( /home/william/.cabal/logs/cabal-install-1.22.6.0.log ):
cabal: Error: some packages failed to install:
cabal-install-1.22.6.0 failed during the configure step. The exception was:
user error ('/usr/local/bin/ghc' exited with an error:
/usr/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
)
Does anyone know how to fix this ?
update:
Fixed by installing libgmp-dev
[edit] You already found that
sudo apt-get install libgmp-dev
should solve your problem (for Mint - for systems without apt-get you would need to use the resident package manager, and in other apt-get based system there could be variation in package names).
If you run into similar errors in the future, here is the reasoning with which to solve the problem: ld is a linker, essentially linking libraries into a program which is being compiled. -lgmp is the argument supplied to ld, telling it to link in the library gmp. It cannot find this library, so either you need to:
(a) tell it about its location in case you know you have the library (the cabal argument --extra-lib-dirs= is useful in this case), or
(b) install the library (google the library name and your system).
GMP is the GNU MP Bignum library which plays a role in providing the Integer and Fractional types.

Qt Creator compile error "cannot find -lGL". Other solutions are not working

I have installed QT5 that also comes with QT creator on an amd machine running ubuntu 12.04. My grapics driver is a radeon r9270x if that matters.
When I try to compile a basic "hello world" type Qt program I get the error message "cannot find -lGL". I have searched around and here( Qt: can't find -lGL error ) it says to use "sudo apt-get install libgl1-mesa-dev" but when I do I already have that installed. Here ( Installing Qt on linux, cannot find -lGL ) it says to install "sudo apt-get install libgl-dev" but that only gets me
"Reading package lists... Done Building dependency tree Reading
state information... Done Package libgl-dev is a virtual package
provided by: libgl1-mesa-swx11-dev 8.0.4-0ubuntu0.7
libgl1-mesa-dev-lts-trusty 10.1.3-0ubuntu0.1~precise1
libgl1-mesa-dev-lts-saucy 9.2.1-1ubuntu3~precise1
libgl1-mesa-dev-lts-raring 9.1.7-1ubuntu2~precise1
libgl1-mesa-dev-lts-quantal 9.0.3-0ubuntu0.4~precise1
libgl1-mesa-dev 8.0.4-0ubuntu0.7 You should explicitly select one to
install.
E: Package 'libgl-dev' has no installation candidate"
Various other resources that I have used say to do similar things but I get this error still. Any ideas?
As a side not, not knowing the relevance, I could not get QT creator to launch for the longest time. It would always seg fault and core dump. I finally updated my amd catylist control center/video drivers and that fixed the problem.
Here is the compile output from qt creator:
02:34:21: Running steps for project myHelloWorld... 02:34:21:
Configuration unchanged, skipping qmake step. 02:34:21: Starting:
"/usr/bin/make" g++
-Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64 -Wl,-rpath,/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -o myHelloWorld main.o
-L/media/UsbExternalDrive/DesignTools/Qt5.3/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lGL collect2: ld returned 1 exit status make: *** [myHelloWorld]
Error 1 02:34:21: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project myHelloWorld (kit: Desktop Qt
5.3 GCC 64bit) When executing step "Make" 02:34:21: Elapsed time: 00:00.
Try running this, restart Qt creator and try a clean build.
sudo apt-get install mesa-common-dev
EDIT:
Could be that you just miss Mesa package. Take a look at XCB dependencies listed here and install what’s missing.
I’ve seen this error also mentioned in a different case, but I don’t remember the solution there. I think I had solved the problem by installing the “libglu1-mesa-dev” package.
sudo apt-get install libglu1-mesa-dev -y
But I am not entirely sure if just this had fixed the issue or I had to install anything else.
So what I found worked for me, I manual added the path to the library and compiled. Then I was able to remove the manually added path. I assume somewhere on the backend it was not searching the correct place and once it was shown it remembered and kept the correct location.

trying to install hs-ffmpeg haskell package fails to find libdc1394

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.

Resources