Error when I try to start any simulation on Cooja/Contiki - msp430

I'm trying to start my first simulator on Cooja/Contiki, but I'm getting the below error:
> make hello-world.sky TARGET=sky
CC hello-world.c
CC ../../platform/sky/./contiki-sky-main.c
LD hello-world.sky
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/mmpy-16/libgcc.a when searching for -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/libgcc.a when searching for -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: cannot find -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/mmpy-16/libgcc.a when searching for -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/libgcc.a when searching for -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: cannot find -lgcc
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/mmpy-16/libcrt0.a when searching for -lcrt0
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: skipping incompatible /usr/lib64/gcc/msp430/4.6.4/libcrt0.a when searching for -lcrt0
/usr/lib64/gcc/msp430/4.6.4/../../../../msp430/bin/ld: cannot find -lcrt0
collect2: ld returned 1 exit status
../../Makefile.include:280: recipe for target 'hello-world.sky' failed
rm hello-world.co obj_sky/contiki-sky-main.o
make: *** [hello-world.sky] Error 1
Process returned error code 2

Could your problem be connected to this thread: https://bugzilla.redhat.com/show_bug.cgi?id=1175942 ?
If it does, I solved it from Fedora 23 by installing Fedora 20 version of MSP430 toolchain:
dnf install --releasever=20 msp430-gcc msp430-libc msp430mcu msp430-binutils
Hope it helps,
LS

Related

Mac OS Big Sur R compilation error: ld: framework not found CoreFoundation

After my Xcode automatically updated itself to 12.4, my Rstudio package compilation breaks and throws the following error:
ld: framework not found CoreFoundation
collect2: error: ld returned 1 exit status
I have tried reinstalling Xcode command-line tool; disabling csrutil and then manually creating links, but these attempts were to no avail. I would really appreciate any help!
I was able to fix this error by:
Installing XCode CLI (you can find it here: https://developer.apple.com/download/all/?q=for%20Xcode)
Removing ~/.R/Makevars and ~/.Renviron (you can just rename them if you don't want to delete them)
Installing gfortran from here: https://github.com/fxcoudert/gfortran-for-macOS/releases
add -F/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ into LDFLAGS

HDF5 package error compile

I have compiled the HDF5 package by GCC 4.9.2, CentOS 6.8 and std=c++11, but I get error:
for package Linux 3.10 CentOS 7 x86_64 I get :
./host/src/hdf5/lib/libhdf5.so: undefined reference to `memcpy#GLIBC_2.14'
collect2: error: ld returned 1 exit status
for package Linux 2.6 CentOS 6 x86_64 I get :
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld: warning: libsz.so.2, needed by ./host/src/hdf5/lib/libhdf5.so, not found (try using -rpath or -rpath-link)
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_encoder_enabled'
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_BufftoBuffCompress'
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_BufftoBuffDecompress'
collect2: error: ld returned 1 exit status
Any idea to slove this?
Thank you
The compiler complains that it is not finding SZ_... routines. szip is an optional library for HDF5 that you have to download separately.
Two options:
Re-configure hdf5 to disable szip
download, build and install szip

Compiling QScintilla on Ubuntu Fails

I'm trying to compile Qscintilla 2.9.2 on Ubuntu 16.04 64bit using Qt 5.7 got the following error message:
-L/home/mwambi/Qt5.7.0/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:979: recipe for target 'libqscintilla2.so.12.0.1' failed
make: *** [libqscintilla2.so.12.0.1] Error 1
I do not know what the library GL is and where to find it. How can I solve this?
In my experience, this troubleshooting procedure is enough to solve about 90% of missing library issues during compilation:
"-l[name]" implies there's a "lib[name].so"
Search your system for "lib[name]" (use locate or find).
If you find it on your system, check paths ($LB_LIBRARY_PATH and the build system's -L flags) and verify that the architecture matches (x86+64 vs. i686).
Do a repository search for "lib[name]" (use apt, yum, synaptic, &c.).
Install it if it's missing.
Type "lib[name].so" into google or a dedicated package-search site (like RPMFind or packages.ubuntu.com) and see what package names come up, then search for as in #2-3.
In this case, libGL is an implementation of OpenGL. You can install Mesa or find an alternative implementation (I've only ever used Qt with Mesa). Here's a list of packages that provide libGL; if you already have one of these installed on your system, try fetching the dev versions of whichever ones you already have.

Library of opencl not found?

I am trying to compile an opencl sample code but I am getting the following error
/usr/bin/ld: cannot find -lOpenCL
/usr/bin/ld: cannot find -loclUtil_x86_64
/usr/bin/ld: cannot find -lshrutil_x86_64
collect2: error: ld returned 1 exit status
make: *** [../../..//OpenCL//bin//linux/release/DeviceQuery] Error 1
I am using intel based machine ...
My make file is
EXECUTABLE := DeviceQuery
CCFILES := devQury.cpp
include ../common/common_opencl.mk
Any help would be of great help
Thanks ,
Piyush
Make sure that the OpenCL library (libOpenCL.so) is present in /usr/lib. This should have been put in place by the driver, so you shouldn't have to do anything.
If not then copy libOpenCL.so present in your cuda toolkit (lib64) to the above location.
sudo cp /usr/local/cuda-7.0/lib64/libOpenCL.so /usr/lib
This fixes the error
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
Have you installed the OpenCL SDK from either Intel or AMD? If not then perhaps you should follow these instructions. If you have an SDK installed then your makefile is probably missing -L... in the compiler command line, where ... is the path to the lib folder in the OpenCL SDK that should contain a file libOpenCL.a or something similar.

Cannot start with bnfc

I'm following a short bnfc example, to generate an haskell parser. When I launch the make command I get these errors:
latex DocCalc.tex; dvips DocCalc.dvi -o DocCalc.ps
/bin/sh: 1: latex: not found
/bin/sh: 1: dvips: not found
make: *** [all] Error 127
I don't have latex installed, neither divps (what is the last?). So I removed the line:
latex DocCalc.tex; dvips DocCalc.dvi -o DocCalc.ps
in the make file, because I don't know exactly the names of the needed packages to install, and because I don't need documetation files. So I relaunch the make command, and this time I get these errors, after the building phase:
Linking TestCalc ...
/usr/bin/ld: --hash-size=31: unknown option
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
Can you help me to understand what I'm missing?
As kosmikus said, it's a problem caused from ghc and the gold linker.
I resolved my problem reading this question

Resources