/usr/local/lib: file not recognized: Is a directory - centos6

When installing justniffer on CentOS 6.5,
./configure
works fine, but make gives the following error:
libtool: link: g++ -g -O2 -o justniffer justniffer-main.o justniffer-formatter.o justniffer-utilities.o justniffer-regex.o justniffer-prog_read_file.o /usr/local/lib -L/root/justniffer/lib/libnids-1.21_patched/src -lnids2 -lpcap -L/usr/local/lib -lboost_regex-mt -lboost_program_options -lpython2.6
/usr/local/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[1]: *** [justniffer] Error 1
make[1]: Leaving directory `/root/justniffer/src'
make: *** [all-recursive] Error 1
What's the solution for this?

use./configure LIBS="-I /usr/local/include -L/usr/local/lib" ,then make,it's work!

Having not compile program for so long time, made the same silly mistake:
Like CFLAGS, LIBS, GTK_LIBS etc should be flags e.g. -Lpath, not bare paths. What I used to do is relocate all DIRs to CFLAGS=/I/L Another way to
Spaces should be quoted or escaped like LIBS="-L'c/program files/gtk+/lib'"
LIBS="-Lc/program\ files/gtk+/lib"

vi Makefile and src/Makefile
LIBS = -pthread -lm -lz -ldl -lutil
make & make install
Success!

Related

Error while building R from source with gcc OpenMP support

I am trying to compile R in a Redhat linux environment on a HPC cluster. I have used environment modules to install recent versions of a number of tools including GCC 5.2.0. I cannot get R to build from the source. It fails with undefined reference to `GOMP_parallel'. When I compile with the --disable-openmp option it compiles fine.
array.o: In function `do_colsum':
array.c:(.text+0x5829): undefined reference to `GOMP_parallel'
collect2: error: ld returned 1 exit status
make[3]: *** [R.bin] Error 1
make[3]: Leaving directory `/scratch/kokul/240763.hpc5/R- 3.2.3/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/scratch/kokul/240763.hpc5/R- 3.2.3/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/scratch/kokul/240763.hpc5/R-3.2.3/src'
make: *** [R] Error 1
A couple of questions
What are the advantages of having openMP enabled, I am assuming this will enhance the performance?
How do I fix the error I encounter while building? Is this related to linking the correct library? -fopenmp is correctly used while building. libgomp.* files are also in the $LIBRARY_PATH and $LD_LIBRARY_PATH.
It might be a simple thing I am missing, but I have tried to search for a proper answer without success.
Advanced thanks for any help.
I am having the same problem:
gcc -Wl,--export-dynamic -fopenmp -L/usr/local/lib -o R.bin Rmain.o CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o colors.o complex.o connections.o context.o cum.o dcf.o datetime.o debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o match.o memory.o names.o objects.o options.o paste.o platform.o plot.o plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o qsort.o radixsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o subassign.o subscript.o subset.o summary.o sysutils.o times.o unique.o util.o version.o g_alab_her.o g_cntrlify.o g_fontdb.o g_her_glyph.o xxxpr.o ls ../unix/*.o ../appl/*.o ../nmath/*.o ../extra/tre/libtre.a -L../../lib -lRblas -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -lgfortran -lm -lquadmath -lreadline -lpcre -llzma -lbz2 -lz -lrt -ldl -lm
array.o: In function do_colsum':
/home/myaccount/Downloads/R-patched/src/main/array.c:1437: undefined reference toGOMP_parallel'
collect2: error: ld returned 1 exit status
Makefile:144: recipe for target 'R.bin' failed
This is a configuration problem from R (autotools problem). My computer has both gcc 4.8 (came with OS) and the latest version gcc 5.2 (I build from source). The gcc 5.2 is located in /usr/local
I saw that R is mixing these two up, and not picking up the 5.2 library locations.
I changed the Makefile (this is only one time fix since the make file is generated by the autotool).
First go to src/main directory. Then edit the Makefile:
143 $(R_binary): $(R_bin_OBJECTS) $(R_bin_DEPENDENCIES)
144 $(MAIN_LINK) -o $# $(R_bin_OBJECTS) $(R_bin_LDADD)
Edite line 144:
144 $(MAIN_LINK) -o $# $(R_bin_OBJECTS) -L/usr/local/lib64 -lgomp $(R_bin_LDADD)
This fixed my problem. I had a hard time filing a bug with the R project. If the R developers saw this, could they fix this at the auto configure level? The auto probing just have to be a little bit smarter.

WKHTMLTOPDF with Patched QT Ubuntu 14.04 Errors during compiling

I am trying to compile the wkhtmltopdf with patched qt using these instructions and when i get to the make && make install it gives me an error has anyone else done this on Ubuntu 14.04? I can't figure out what to do from here.
these are the instructions i am following i know they are not for 14.04 but i hoped they would have worked https://gist.github.com/Zauberfisch/8773593
This is the error i get:
cd src/lib/ && make -f Makefile make[1]: Entering directory /temp/wkhtmltopdf/src/lib' rm -f libwkhtmltox.so.0.12.1 libwkhtmltox.so libwkhtmltox.so.0 libwkhtmltox.so.0.12 g++ -Wl,-O1 -Wl,-rpath,/temp/wkqt/lib -shared -Wl,-soname,libwkhtmltox.so.0 -o libwkhtmltox.so.0.12.1 ../../build/loadsettings.o ../../build/multipageloader.o ../../build/tempfile.o ../../build/converter.o ../../build/websettings.o ../../build/reflect.o ../../build/utilities.o ../../build/pdfsettings.o ../../build/pdfconverter.o ../../build/outline.o ../../build/tocstylesheet.o ../../build/imagesettings.o ../../build/imageconverter.o ../../build/pdf_c_bindings.o ../../build/image_c_bindings.o ../../build/moc_multipageloader_p.o ../../build/moc_converter_p.o ../../build/moc_pdfconverter_p.o ../../build/moc_imageconverter_p.o ../../build/moc_pdf_c_bindings_p.o ../../build/moc_image_c_bindings_p.o ../../build/moc_converter.o ../../build/moc_multipageloader.o ../../build/moc_utilities.o ../../build/moc_pdfconverter.o ../../build/moc_imageconverter.o ../../build/qrc_wkhtmltopdf.o -L/temp/wkqt/lib -lQtWebKit -lQtSvg -L/temp/wkqt/lib -L/usr/X11R6/lib -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread /usr/bin/ld: ../../build/qrc_wkhtmltopdf.o: relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC ../../build/qrc_wkhtmltopdf.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[1]: * [../../bin/libwkhtmltox.so.0.12.1] Error 1 make[1]: Leaving directory `/temp/wkhtmltopdf/src/lib' make: * [sub-src-lib-make_default-ordered] Error 2
I downloaded a binary from their site that already had the QT build and that fixed the issue for me. Thanks!

Including wrong Qt version headers

I am trying to install QT Creator from source on Centos 6. I have installed (what I think are) the Qt5 libraries onto my system using yum. When I check which rpm's are installed I see
[qt-creator-2.8.1-src]# rpm -qa | grep qt
qt5-qtbase-x11-5.1.1-3.el6.x86_64
qt-4.6.2-26.el6_4.x86_64
qt-sqlite-4.6.2-26.el6_4.x86_64
qt-x11-4.6.2-26.el6_4.x86_64
qt5-qtbase-5.1.1-3.el6.x86_64
ibus-qt-1.3.0-2.el6.x86_64
qt3-3.3.8b-30.el6.x86_64
qt5-qtbase-devel-5.1.1-3.el6.x86_64
qt-devel-4.6.2-26.el6_4.x86_64
qt3-devel-3.3.8b-30.el6.x86_64
So qt5 seems to be installed, but so is qt4 and qt3 (perhaps required by some other apps, but this is a pretty plain system). So now I've downloaded the QT Creator source, and am trying to compile. I gave the full path the qt5 qmake (/usr/lib64/qt5/bin/qmake qtcreator.pro) and that worked. But now when I issue the command make I see:
[qt-creator-2.8.1-src]# make
cd src/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake /usr/src/qtcreator/qt-creator-2.8.1-src/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
cd libs && make -f Makefile
make[2]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs'
cd aggregation && make -f Makefile
make[3]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs/aggregation'
g++ -c -pipe -Wall -W -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -DAGGREGATION_LIBRARY -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I. -I/src -I\ -I/usr/lib64/qt-3.3/include -o aggregate.o aggregate.cpp
In file included from aggregate.h:33,
from aggregate.cpp:30:
aggregation_global.h:33:21: error: qglobal.h: No such file or directory
In file included from aggregate.cpp:30:
aggregate.h:35:19: error: QObject: No such file or directory
aggregate.h:36:17: error: QList: No such file or directory
aggregate.h:37:17: error: QHash: No such file or directory
aggregate.h:38:26: error: QReadWriteLock: No such file or directory
aggregate.h:39:23: error: QReadLocker: No such file or directory
aggregate.cpp:32:24: error: QWriteLocker: No such file or directory
aggregate.cpp:33:18: error: QDebug: No such file or directory
In file included from aggregate.cpp:30:
aggregate.h:43: error: expected initializer before ‘:’ token
aggregate.cpp:277: error: expected ‘}’ at end of input
make[3]: *** [aggregate.o] Error 1
make[3]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs/aggregation'
make[2]: *** [sub-aggregation] Error 2
make[2]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs'
make[1]: *** [sub-libs] Error 2
make[1]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make: *** [sub-src-make_first-ordered] Error 2
so it looks like make is including the qt 3.3 headers I/usr/lib64/qt-3.3/mkspecs/default). How do I tell make or qmake to use the Qt5 headers/libraries?
I remove the qt3-devel package as suggested below, and now my error changes to:
cd src/ && ( test -e Makefile || /opt/Qt/5.1.1/gcc_64/bin/qmake /usr/src/qtcreator/qt-creator-2.8.1-src/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make[1]: *** No rule to make target `/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by `Makefile'. Stop.
make[1]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make: *** [sub-src-make_first-ordered] Error 2
as you can see make is still referencing the qt3 stuff.
The solution for those encountering the same:
Remove qt3-devel
Install qt5-* (otherwise the make process will complain about missing items). You can probably be more selective but after 10 time install individual packages based on make complains, I just put them all in.
run qmake giving the full path to the qt5 version of qmake
run 'qmake -r' not 'qmake qtcreator.pro'

Cygwin 'make' command

I'm trying to compile a library using a Unix shell. I'm running Cygwin on Windows. The install instructions for the library state:
cd' to the directory containing the package's source code and type
./configure' to configure the package for your system. If you're
using csh' on an old version of System V, you might need to type
sh ./configure' instead to prevent csh' from trying to execute
configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
Type `make' to compile the package.
<... MORE INSTRUCTIONS FOLLOW ...>
So, I've placed the folder containing the library source into my Cygwin directory, cd'ed to the folder, and run ./configure. This all appears to work fine, but the 'make' command produces the following output:
$ make
make all-recursive
make[1]: Entering directory `/liblo-0.26'
Making all in src
make[2]: Entering directory `/liblo-0.26/src'
Making all in .
make[3]: Entering directory `/liblo-0.26/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -
Wall -I.. -g -O2 -MT liblo_la-address.lo -MD -MP -MF .deps/liblo_la-address.Tpo
-c -o liblo_la-address.lo `test -f 'address.c' || echo './'`address.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -I.. -g -O2 -MT liblo_la-a
ddress.lo -MD -MP -MF .deps/liblo_la-address.Tpo -c address.c -DDLL_EXPORT -DPI
C -o .libs/liblo_la-address.o
In file included from lo_types_internal.h:33,
from address.c:37:
../lo/lo_osc_types.h:32:20: stdint.h: No such file or directory
In file included from address.c:37:
lo_types_internal.h:89: field `addr' has incomplete type
lo_types_internal.h:98: confused by earlier errors, bailing out
make[3]: *** [liblo_la-address.lo] Error 1
make[3]: Leaving directory `/liblo-0.26/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/liblo-0.26/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/liblo-0.26'
make: *** [all] Error 2
What am I doing wrong? Happy to provide more info - but I'm new to Unix shell (as you can probably tell...)
The error is that the header file stdint.h is not found.
stdint.h is a new header, standardized in C99 (The version published in 1999 of the C standard.) It could be that your UNIX does not have it. But cygwin should be recent and have it.
Does your cygwin installation have the C library header files installed?

XCode 4 Unimotion

I use Xcode 4, and I currently dont have any iDevice right now to be able to test accelerometer in my application, so I googled for a while and find util named "unimotion". read me file for Unimotion says: "A Makefile is included so all you have to do is cd to the 'unimotion' directory and type 'make'." So I tried, but terminal give me a message
ls: /Developer/SDKs: No such file or directory cc -Wall -Os -g
-isysroot /Developer/SDKs/ -arch i386 -arch ppc -fconstant-cfstrings -c -o unimotion.o unimotion.c clang: warning: not using the clang compiler for the 'powerpc' architecture unimotion.c:72:10: fatal
error: 'IOKit/IOKitLib.h' file not found
include IOKit/IOKitLib.h>
1 error generated. make[1]: * [unimotion.o] Error 1 make: * [sub-unimotion] Error 2
again and again.
So, what am I doing wrong?
Thanks.
Rewrite all occurrences of /Developer/SDKs/ in the 3 Makefiles (calibrate/Makefile, motion/Makefile and unimotion/Makefile) with
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
that should help you. If you're using Xcode 4, you'll probably get further error also
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
as the -arch ppc is not supported there anymore. Just delete every single occurrence of -arch ppc in Makefiles, and it will work.

Resources