Libtool version mismatch - c++

I have downloaded the source of some old project. I'm trying to build it now:
./bootstrap && ./configure
It works fine, but:
make
/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -W -g -O2 -DDEBUG -MT rcclexer.lo -MD -MP -MF .deps/rcclexer.Tpo -c -o rcclexer.lo rcclexer.cpp
../libtool: line 415: CDPATH: command not found
libtool: Version mismatch error. This is libtool 2.4.2, but the
libtool: definition of this LT_INIT comes from an older release.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
libtool: and run autoconf again.
p.s. that small project page: http://sourceforge.net/projects/rccparser/
Any help?

Something like:
autoreconf -fvi
maybe? I'd hope bootstrap would take care of that though, but it looks like it doesn't.

Related

Error linking IRAF library relocation R_X86_64_32 against can not be used

I'm trying to compile a program called DAOSPEC written in Fortran. It gives me the following error (among similar others):
/usr/bin/ld: /home/osboxes/iraf/bin.linux64//libimfort.a(imakwc.o): relocation R_X86_64_32 against `.bss' can not be used when making a PIE object; recompile with -fPIC
See the full log here.
How do I fix it?
My Makefile
FCOMP = gfortran
FFLAGS = -Wall -Wextra -fPIC -fmax-errors=1 -O3 -march=native -ffast-math -funroll-loops
.SUFFIXES: .o .f
.f.o:
$(FCOMP) -c $(FFLAGS) $<
default : daospec
daospec: daospec.o lnxsubs.o iosubs.o mathsubs.o bothsubs.o
$(FCOMP) -o daospec daospec.o lnxsubs.o iosubs.o mathsubs.o bothsubs.o -L/usr/local/lib/ -lcfitsio -lplotsub -ldevices -lutils -L/usr/lib/x86_64-linux-gnu/ -lX11 -L/home/YOUR_USERNAME/iraf/bin.linux64/ -limfort -lsys -lvops -L/home/YOUR_USERNAME/iraf/unix/bin.linux64/ -los -lf2c -lcurl
clean:
rm -rf daospec *.o
The same Makefile works on a different PC with Ubuntu 16.04 gfortran 5.4, but breaks on Ubuntu 18.04 gfortran 7.3. In both cases the IRAF library files are the same.
I have managed to solve the problem, with help from Vladimir F. Ubuntu 18.04 uses PIE, position independent executables (source), and thus it requires libraries to be built with -fPIC option. The libraries in the official IRAF distribution that I used were not build with -fPIC, and that's what caused my errors.
Fortunately, one can now install IRAF libraries from the iraf-dev package on Ubuntu 18.04:
sudo apt-get install iraf-dev
Alternatively, one can compile IRAF from Github's iraf-community/iraf repository with -fPIC option.
Lastly, I modified the Makefile to use the new locations of IRAF library files: /usr/lib/iraf/bin/ and /usr/lib/iraf/unix/bin/.
FCOMP = gfortran
FFLAGS = -Wall -Wextra -fPIC -fmax-errors=1 -O3 -march=native -ffast-math -funroll-loops
.SUFFIXES: .o .f
.f.o:
$(FCOMP) -c $(FFLAGS) $<
default : daospec
daospec: daospec.o lnxsubs.o iosubs.o mathsubs.o bothsubs.o
$(FCOMP) -o daospec daospec.o lnxsubs.o iosubs.o mathsubs.o bothsubs.o -L/usr/local/lib/ -lcfitsio -lplotsub -ldevices -lutils -L/usr/lib/x86_64-linux-gnu/ -lX11 -L/usr/lib/iraf/bin/ -limfort -lsys -lvops -L/usr/lib/iraf/unix/bin/ -los -lf2c -lcurl
clean:
rm -rf daospec *.o

libswscale/swscale.h: No such file or directory

When installing Sumo-0.30.0 on Ubuntu 16.04, make resulted in the following error:
make[4]: Entering directory '/home/<path>/sumo-0.30.0/src/gui'
g++ -DHAVE_CONFIG_H -I. -I../../src -I/home/<path>/sumo-0.30.0/./src -I/usr/include/ffmpeg -I/usr/local/include -I/usr/include/fox-1.6 -I/usr/include/gdal -I/usr/local/include -I/usr/include -msse2 -mfpmath=sse -O2 -DNDEBUG -MT GUIViewTraffic.o -MD -MP -MF .deps/GUIViewTraffic.Tpo -c -o GUIViewTraffic.o GUIViewTraffic.cpp
In file included from GUIViewTraffic.cpp:36:0:
../../src/utils/gui/div/GUIVideoEncoder.h:58:32: fatal error: libswscale/swscale.h: No such file or directory
compilation terminated.
Makefile:449: recipe for target 'GUIViewTraffic.o' failed
Having installed all the prerequisite libraries as mentioned in Installing/Linux Build Libraries and verifying my ffmpeg version is the latest one, I proceeded with ./configure command from installation guide which was successful. The last lines of ./configure result shows that ffmpeg is enabled.
Optional features summary
-------------------------
Enabled: TRACI PROJ GDAL GUI ffmpeg
Disabled: Debug Profiling Coverage PIC UnitTests Python OSG
I could neither locate libswscale directory nor swscale.h even after going through similar post here.
According to another post here, someone mentions that on Ubuntu the problem is that ffmpeg package does not install swscale.h.
How do I fix this?
Install the libswscale-dev package. It provides /usr/include/*/libswscale/swscale.h.

How do you keep Netbeans 8.0 from rebuilding every file?

For all of my c++ projects using netbeans, whenever I make a single small change the entire project is rebuilt. There must be a way to prevent this.
My build logs ends up looking like this:
mkdir -p build/Debug/CLang-Windows/_ext/237546996
rm -f "build/Debug/CLang-Windows/_ext/237546996/Sensor.o.d"
clang++ -g -std=gnu++11 -c -g -DSFML_STATIC -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libsndfile/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libfreetype/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/jpeg -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/AL -I../SFML/src -I../SFML/include -MMD -MP -MF "build/Debug/CLang-Windows/_ext/237546996/Sensor.o.d" -o build/Debug/CLang-Windows/_ext/237546996/Sensor.o ../SFML/src/SFML/Window/Sensor.cpp
mkdir -p build/Debug/CLang-Windows/_ext/237546996
rm -f "build/Debug/CLang-Windows/_ext/237546996/SensorManager.o.d"
clang++ -g -std=gnu++11 -c -g -DSFML_STATIC -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libsndfile/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libfreetype/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/jpeg -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/AL -I../SFML/src -I../SFML/include -MMD -MP -MF "build/Debug/CLang-Windows/_ext/237546996/SensorManager.o.d" -o build/Debug/CLang-Windows/_ext/237546996/SensorManager.o ../SFML/src/SFML/Window/SensorManager.cpp
mkdir -p build/Debug/CLang-Windows/_ext/237546996
rm -f "build/Debug/CLang-Windows/_ext/237546996/Touch.o.d"
clang++ -g -std=gnu++11 -c -g -DSFML_STATIC -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libsndfile/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/libfreetype/windows -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/jpeg -I/C/Users/izack_000/Documents/Programming/Projects/SynapseCpp/SFML/extlibs/headers/AL -I../SFML/src -I../SFML/include -MMD -MP -MF "build/Debug/CLang-Windows/_ext/237546996/Touch.o.d" -o build/Debug/CLang-Windows/_ext/237546996/Touch.o ../SFML/src/SFML/Window/Touch.cpp
As as you can see the object files are being removed before generating new files. Is there a setting for this or do I have to change the makefiles generated by netbeans?
Or perhaps there is something I accidentally turned on? (always clean?) Though I don't think its likely because its happening for both of my projects.
Edit: this seems to only happens on windows

Cant make mod_wsgi-3.3 in trying to use it with xampp and django

raz#T43:~/Downloads/mod_wsgi-3.3$ sudo ./configure --with-apxs=/opt/lampp/bin/apxs --with-python=/usr/bin/python2.6
checking Apache version... 2.2.14
configure: creating ./config.status
config.status: creating Makefile
raz#T43:~/Downloads/mod_wsgi-3.3$ sudo make
/opt/lampp/bin/apxs -c -I/usr/include/python2.6 -DNDEBUG mod_wsgi.c -L/usr/lib -L/usr/lib/python2.6/config -lpython2.6 -lpthread -ldl -lutil -lm
/opt/lampp/build/libtool --silent --mode=compile gcc -prefer-pic -O3 -Wl,--rpath -Wl,/opt/lampp/lib -Wl,--rpath -Wl,/opt/lampp/lib/mysql -I/opt/lampp/include -L/opt/lampp/lib -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/opt/lampp/include -I/opt/lampp/include -I/opt/lampp/include -I/opt/lampp/include -I/usr/include/python2.6 -DNDEBUG -c -o mod_wsgi.lo mod_wsgi.c && touch mod_wsgi.slo
mod_wsgi.c:135: fatal error: Python.h: No such file or directory
compilation terminated.
apxs:Error: Command failed with rc=65536
.
make: *** [mod_wsgi.la] Error 1
I cant find what's wrong. Any one have an idea? Python seams to work in all other regards
You need to install the 'dev' package for Python installation you are using.
Error message is described in:
http://code.google.com/p/modwsgi/wiki/InstallationIssues#Missing_Python_Header_Files

Android: Statically link against libstdc++

my program compiles nicely for Android, however when I try to copy it to the Android emulator, it gives the following error:
knight666#Katja-Linux /media/Data/Shared/Galaxians $ acpy Galaxians.android
Filename: 'Galaxians.android'
819 KB/s (420657 bytes in 0.501s)
link_image[1638]: 825 could not load needed library 'libstdc++.so.6' for '/system/sbin/Galaxians.android' (load_library[984]: Library 'libstdc++.so.6' not found)CANNOT LINK EXECUTABLE
acpy is a small script I wrote that does the following:
#!/bin/sh
FILEPATH=`dirname $1`
FILENAME=`basename $1 .c`
echo "Filename: '$FILENAME'"
adb push $FILEPATH/$FILENAME /system/sbin/$FILENAME
adb shell chmod 777 /system/sbin/$FILENAME
adb shell /system/sbin/$FILENAME
Here is how I build my application:
oem#androiddev /media/YoghurtGum/Tests/Galaxians $ sudo make
arm-none-linux-gnueabi-g++ -static-libgcc -g -Wall -Werror -O2 -w -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Alien.cpp -o intermediate/Alien.o
arm-none-linux-gnueabi-g++ -static-libgcc -g -Wall -Werror -O2 -w -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Bullet.cpp -o intermediate/Bullet.o
arm-none-linux-gnueabi-g++ -static-libgcc -g -Wall -Werror -O2 -w -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Game.cpp -o intermediate/Game.o
arm-none-linux-gnueabi-g++ -static-libgcc -g -Wall -Werror -O2 -w -I ../../YoghurtGum/src/GLES -I ../../YoghurtGum/src -c src/Player.cpp -o intermediate/Player.o
arm-none-linux-gnueabi-gcc
-Wl,--entry=main,
-dynamic-linker=/system/bin/linker,
-rpath-link=/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib,
-rpath=../../YoghurtGum/lib/Android,
-L/home/oem/android-ndk-r3/build/platforms/android-5/arch-arm/usr/lib
-nostdlib
-lstdc++
intermediate/Alien.o
intermediate/Bullet.o
intermediate/Game.o
intermediate/Player.o
../../YoghurtGum/lib/Android/libstdc++.a
../../YoghurtGum/bin/YoghurtGum.a
-o bin/Galaxians.android
Line breaks are only for clarity, none exist in the actual output.
YoghurtGum is my game library that already statically and dynamically links to libstdc++.
When I remove lstdc++, the program doesn't compile because it can't find the library.
Is there a way to link to stdlibc++ statically or link the application to the correct dynamic library in the emulator?
Thanks in advance.
There is a modification of the ndk with support for exceptions, RTTI and stdlibc++.
http://www.crystax.net/android/ndk-r3.php
The other alternative involves porting just what you need, by hand... eek!