I'm using a Raspberry Pi 2 running Ubuntu MATE 15.10 to work on a project.
I'm trying to run a makefile and got this error
/home/dpanagou/Quadrotors/Vicon/libs/libViconDataStreamSDK_CPP.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
Makefile:8: recipe for target '../bin/Vicon_state' failed
make[1]: *** [../bin/Vicon_state] Error 1
make[1]: Leaving directory '/home/dpanagou/Quadrotors/HLP/Vicon'
Makefile:40: recipe for target 'Vicon' failed
make: *** [Vicon] Error 2
I've also tried make clean before make.
From research, a lot of people have suggested that the object file might be corrupted. So I downloaded new files from the developer and ran the makefile again. I still get the same error.
Here is my makefile:
CUR_DIR = $(shell pwd)
CFLAGS = `pkg-config --cflags lcm`
LDFLAGS = `pkg-config --libs lcm` ../src/filter_util.o ../src/util.o
vicon_lib = $(CUR_DIR:%/HLP/Vicon=%/Vicon/libs)
../bin/Vicon_state:
g++ $(CFLAGS) Vicon_state_data.cpp -o ../bin/Vicon_state -Wl,- rpath=../../Vicon/libs -L$(vicon_lib) -lViconDataStreamSDK_CPP -lDebugServices $(LDFLAGS)
Please help with specific instructions as I am very new to Linux and programming.
Check the format of the file with the "file" command, and compare it to the format of any .so that comes with rpi.
I'm not 100% sure, but might it be that the library is for raspbian with its v6 compatible HF vs generic V7-only HF in debian?
Related
I am just doing some simple OCCI thing, however it compiles a bit strangely
Environment:
Oracle VM: Centos7 64bit on Windows 8 64bit
gcc-c++.x86_64
Simply installed Oracle XE by double clicking the rpm (download pages says
linux 64bit)
echo $LD_LIBRARY_PATH yields:
/usr/local/lib64/:/u01/app/oracle/product/11.2.0/xe/lib/
I also tried export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib/
so that it yields
/u01/app/oracle/product/11.2.0/xe/lib/
some listing command:
find /u01/app/oracle/product/11.2.0/xe/lib/ -name lib*
yields the following:
/u01/app/oracle/product/11.2.0/xe/lib/
/u01/app/oracle/product/11.2.0/xe/lib/libagtsh.so.1.0
/u01/app/oracle/product/11.2.0/xe/lib/libcell11.so
/u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so.11.1
/u01/app/oracle/product/11.2.0/xe/lib/libnnz11.so
/u01/app/oracle/product/11.2.0/xe/lib/libocci.so.11.1
/u01/app/oracle/product/11.2.0/xe/lib/libclntsh.so
/u01/app/oracle/product/11.2.0/xe/lib/libocci.so
/u01/app/oracle/product/11.2.0/xe/lib/libagtsh.so
and some others....
however the compile command says ld cannot find some libraries:
g++ -o ab -I/u01/app/oracle/product/11.2.0/xe/rdbms/public/ -lnnz11 -lclntsh -locci a.cpp
/usr/bin/ld: cannot find -lnnz11
/usr/bin/ld: cannot find -lclntsh
/usr/bin/ld: cannot find -locci
collect2: error: ld returned 1 exit status
I have tried adding -L/u01/app/oracle/product/11.2.0/xe/lib/, it successfully compiles however running the program will cause it silently crashes / blocks at the simple line
Environment *env = Environment::createEnvironment();
no exceptions caught.
Does anyone know some part I did wrong? or are the two issues related?
And by the way, it USED to work like 5 hours ago, when it suddenly stopped working I reinstalled the whole VM and now it still doesn't work.
however the compile command says ld cannot find some libraries: g++ -o ab -I/u01/app/oracle/product/11.2.0/xe/rdbms/public/ -lnnz11 -lclntsh -locci a.cpp
Your command is incorrect (and the linker is right to complain). You need to tell the linker where to find the library, and you do that with -L flag:
ORACLE=/u01/app/oracle/product/11.2.0/xe
g++ -I ${ORACLE}/rdbms/public -L ${ORACLE}/lib a.cpp -lnnz11 -lclntsh -locci
(Note that your placement of source after library is also incorrect, and I fixed it above. Placement of libraries and sources on link command line matters.)
I have installed mosquitto using the command apt-get install mosquitto. It is installed successfully on my system, but I got version "1.4.5". I want to downgrade to version 1.4.4, so I was trying using the source tar file. Under folder, I am running the command make and it is throwing an error:
set -e; for d in lib client src; do make -C ${d}; done
make[1]: Entering directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
cc -Wall -ggdb -O2 -I. -I.. -I../lib -fPIC -DWITH_TLS -DWITH_TLS_PSK -DWITH_THREADING -DWITH_SOCKS -DWITH_SRV -c mosquitto.c -o mosquitto.o
In file included from mosquitto.c:33:0:
./mosquitto_internal.h:27:27: fatal error: openssl/ssl.h: No such file or directory
# include <openssl/ssl.h>
^
compilation terminated.
make[1]: *** [mosquitto.o] Error 1
make[1]: Leaving directory `/home/ubuntu/org.eclipse.mosquitto-1.4.4/lib'
make: *** [mosquitto] Error 2
What is going wrong here?. Is there any another way to install 1.4.4 version of mosquitto?
Thanks
You're missing dependencies needed for compilation.
Try:
apt-get install libc-ares-dev libssl-dev libwrap0-dev uthash-dev uuid-dev
If you want libwebsockets support you can either install libwebsockets-dev, or better install it manually from source - that will get you version 1.5 instead of the old 1.2 that is in Debian/Ubuntu.
If you install the manually compiled version with
make prefix=/usr install
then it will overwrite the existing binary and you can use it with the existing system services.
I'm using Luarocks 2.2.0beta1 to install luafilesystem on windows 7 with lua 5.2 and mingw. I got this error:
>luarocks install luafilesystem
Installing http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock...
Using http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
mingw32-gcc -O2 -c -o src/lfs.o -IC:/lua/include/src/lfs.c
mingw32-gcc -shared -o lfs.dll src/lfs.o C:/lua/bin/lua52.dll -lm
C:\lua\bin\lua52.dll: file not recognized: File format not recognized
collect2.exe: error: Id returned 1 exit status
Error: Build error: Failed compiling module lfs.dll
any idea how to fix this?
note: until now, I have no problem installing other module with luarocks that have no dependency with luafilesystem.
Solved, this problem arise because actually I'm not using the same MinGW compiler when building lua52.dll. I don't know which compiler I use at the first time. Thanks to #siffiejoe
I'm working with Tmote-sky nodes. I have installed instant-contiki as a virtual machine using VMware player. Now I can't compile any .c file on the nodes. I have always this error message:
make: msp430-gcc: Command not found
CC ../../core/net/rime/rimeaddr.c
make: msp430-gcc: Command not found
make: *** [obj_sky/rimeaddr.o] Error 127
I thought that it was because of msp430-gcc toolchain. I've installed this toolchain which normally exists with instant-contiki but I still have this problem.
Can some one help me please?
You have to install gcc-msp430 with the following command:
sudo apt-get install gcc-msp430
Try this :
the problem causes with little switch. remove it you're good to go.
open this file in note pad and goto line 132
contiki/cpu/msp40/Makefile.msp430
remove -g switch from the following line:
CFLAGSNO = -Wall -mmcu=$(CC_MCU) -g $(CFLAGSWERROR)
the line will be:
CFLAGSNO = -Wall -mmcu=$(CC_MCU) $(CFLAGSWERROR)
just clean up and recompile.
it should work.... :)
I am having trouble building sqsh against freetds. This post cross-references with https://sourceforge.net/projects/sqsh/forums/forum/365924/topic/4716627.
I've installed Freetds 0.91 from sunfreeware.com on Solaris 10. I've confirmed the installation as noted in Chapter 9 of the user guide.
Following the sqsh notes from sqsh.org, I've set the SYBASE environment variable to /usr/local/freetds and run the configure script. (I do not have Sybase installed on this machine. I shouldn't need it.)
SYBASE=/usr/local/freetds; export SYBASE
./configure --with-readline
I've checked the Makefile, it seems to be right given what I've read.
SYBASE_LIBS = -lct -ltds -lnsl -ldl -lm
When I run make, I get(after building a bunch of stuff):
make
...
...[build output]...
...
gcc -L/usr/local/freetds/lib -L/usr/local/lib cmd_alias.o cmd_bcp.o cmd_buf.o cmd_connect.o cmd_do.o cmd_echo.o cmd_exit.o cmd_for.o cmd_func.o cmd_go.o cmd_help.o cmd_history.o cmd_if.o cmd_input.o cmd_jobs.o cmd_kill.o cmd_lock.o cmd_loop.o cmd_misc.o cmd_read.o cmd_reconnect.o cmd_redraw.o cmd_reset.o cmd_return.o cmd_rpc.o cmd_set.o cmd_shell.o cmd_show.o cmd_sleep.o cmd_wait.o cmd_warranty.o cmd_while.o var_ctlib.o var_date.o var_debug.o var_dsp.o var_hist.o var_misc.o var_passwd.o var_readline.o var_thresh.o dsp.o dsp_bcp.o dsp_csv.o dsp_conv.o dsp_desc.o dsp_horiz.o dsp_html.o dsp_meta.o dsp_none.o dsp_out.o dsp_pretty.o dsp_vert.o dsp_x.o sqsh_alias.o sqsh_args.o sqsh_avl.o sqsh_buf.o sqsh_cmd.o sqsh_compat.o sqsh_ctx.o sqsh_debug.o sqsh_env.o sqsh_error.o sqsh_expand.o sqsh_fd.o sqsh_filter.o sqsh_fork.o sqsh_func.o sqsh_getopt.o sqsh_global.o sqsh_history.o sqsh_init.o sqsh_job.o sqsh_readline.o sqsh_sig.o sqsh_sigcld.o sqsh_stdin.o sqsh_strchr.o sqsh_tok.o sqsh_varbuf.o sqsh_main.o -lct -ltds -lnsl -ldl -lm -lreadline -lcurses -o sqsh
ld: warning: global symbol `_END_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: warning: global symbol `_START_' has non-global binding:
(file /usr/local/freetds/lib/libct.so value=LOCL);
ld: fatal: file /usr/local/freetds/lib/libtds.a: unknown file type
ld: fatal: File processing errors. No output written to sqsh
collect2: ld returned 1 exit status
make[1]: *** [sqsh] Error 1
make[1]: Leaving directory `/opt/BFMIfiles/src/sqsh-2.1.7/src'
make: *** [build-subdirs] Error 2
Is the error related to this: http://www.freetds.org/faq.html#where.is.libtds.so?
Any ideas?
Reference on freetds mailing list.
Reference on sqsh help forum.
When editing src/Makefile, get rid of -ltds (as suggested here) and change -ldl to -liconv. I got that last bit from the cygwin version of the sqsh README.
I used SYBASE=/usr/local/freetds/.
After that I had to set the LD_LIBRARY_PATH=$SYBASE/lib/:/usr/local/lib/ to get the freetds and liconv libraries.
Big thanks to the freetds mailing list. http://lists.ibiblio.org/pipermail/freetds/2011q3/027382.html