I downloaded freeRTOS Basic Example -EVK1100 from the example Gallery provided by Atmel Studio and try to build it, i got this error
recipe for target 'src/asf/avr32/utils/startup/trampoline_uc3.o' failed
the Build output gives :
Building file: ../src/asf/avr32/utils/startup/trampoline_uc3.s
Invoking: AVR32/GNU Assembler : 4.4.7
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr32\avr32-gnu-toolchain\bin\avr32-as.exe: unrecognized option `-mrelax'
make: *** [src/asf/avr32/utils/startup/trampoline_uc3.o] Error 1
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr32\avr32-gnu-toolchain\bin\avr32-as.exe" -mpart=uc3a0512 -mrelax -I "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\UC3A_DFP\1.0.53\include\AT32UC3A0512" -I "../thirdparty/freertos/demo/avr32_uc3_example/at32uc3a0512_evk1105" -I "../src/ASF/avr32/utils" -I "../src/config" -I "../src/ASF/avr32/boards/evk1105" -I "../src/ASF/thirdparty/freertos/demo/common/include" -I "../src/ASF/common/utils" -I "../src" -I "../src/ASF/avr32/boards" -I "../src/ASF/thirdparty/freertos/demo/avr32_uc3_example" -I "../src/ASF/avr32/drivers/tc" -I "../src/ASF/avr32/drivers/gpio" -I "../src/ASF/thirdparty/freertos/freertos-7.0.0/source/include" -I "../src/ASF/common/boards" -I "../src/ASF/thirdparty/freertos/demo/avr32_uc3_example/at32uc3a0512_evk1105" -I "../src/ASF/avr32/utils/preprocessor" -I "../src/ASF/avr32/drivers/intc" -I "../src/ASF/thirdparty/freertos/freertos-7.0.0/source/portable/gcc/avr32_uc3" -I "../src/ASF/avr32/drivers/pm" -I "../src/ASF/avr32/drivers/usart" -I "../src/ASF/avr32/drivers/flashc" -g -o "src/asf/avr32/utils/startup/trampoline_uc3.o" "../src/asf/avr32/utils/startup/trampoline_uc3.s"
C:\Users\xxx\Documents\Atmel Studio\7.0\FREERTOS_UC3_EXAMPLE2\FREERTOS_UC3_EXAMPLE2\Debug\Makefile(518,1): error: recipe for target 'src/asf/avr32/utils/startup/trampoline_uc3.o' failed
I believe that the linker complains about the option -mrelax`unrecognized option -mrelax.
This reference shows that i have to check relax branches, but i can't find the option in my version
I wonder if there is a patch to apply to my linker so it can recognize this option or to check/uncheck some options in the project file or ....
I'am using
Atmel Studio 7 (version 7.0.934)
Windows 10
Thanks in advance
The example project is built successfully after upgrading Atmel Studio to the last version.
To get the latest version :
help > check for updates
Related
We are trying to compile this by following instructions in the readme. I must say that we are not specialists with C at all, we are students of a web development bootcamp and trying to do our last project.
It's a command line tool to calculate ephemerides of multiple celestial bodies, and as you can read in the setup in the readme file, it need to download certain data from the internet, and then compile.
All is done through the setup.sh script.
So, we have tried:
In Windows 10 ubuntu WSL terminal
If we type $./setup or $./prettymake, after download the data, gives the error:
$mkfifo: cannot create fifo 'stderr': Operation not supported
$mkdir -p obj obj/argparse obj/coreUtils obj/ephemCalc obj/listTools obj/mathsTools obj/settings
cc -Wall -Wno-format-truncation -Wno-unknown-pragmas -g -c -I /mnt/d/reboot/ephemeris-compute-de430/src -O3 -D DEBUG=0 -D MEMDEBUG1=0 -D MEMDEBUG2=0 -fopenmp -D DCFVERSION=\"2.0\" -D DATE=\"09/06/2019\" -D PATHLINK=\"/\" -D SRCDIR=\"/mnt/d/reboot/ephemeris-compute-de430/src/\" src/ephemCalc/constellations.c -o obj/ephemCalc/constellations.o
If we do it with $sudo ./setup, the error printed is:
$mkfifo: cannot create fifo 'stderr': Operation not supported
$cat: stderr: No such file or directory
$mkdir -p obj obj/argparse obj/coreUtils obj/ephemCalc obj/listTools obj/mathsTools obj/settings
cc -Wall -Wno-format-truncation -Wno-unknown-pragmas -g -c -I /mnt/d/reboot/ephemeris-compute-de430/src -O3 -D DEBUG=0 -D MEMDEBUG1=0 -D MEMDEBUG2=0 -fopenmp -D DCFVERSION=\"2.0\" -D DATE=\"09/06/2019\" -D PATHLINK=\"/\" -D SRCDIR=\"/mnt/d/reboot/ephemeris-compute-de430/src/\" src/ephemCalc/constellations.c -o obj/ephemCalc/constellations.o
In macOS terminal
If we type $./prettymake, gives the error:
$mkdir -p obj obj/argparse obj/coreUtils obj/ephemCalc obj/listTools obj/mathsTools obj/settings
cc -Wall -Wno-format-truncation -Wno-unknown-pragmas -g -c -I /Users/rominaelorrietalopez/Documents/Descargas2/ephemeris-compute-de430-master/src -O3 -D DEBUG=0 -D MEMDEBUG1=0 -D MEMDEBUG2=0 -fopenmp -D DCFVERSION=\"2.0\" -D DATE=\"09/06/2019\" -D PATHLINK=\"/\" -D SRCDIR=\"/Users/rominaelorrietalopez/Documents/Descargas2/ephemeris-compute-de430-master/src/\" src/argparse/argparse.c -o obj/argparse/argparse.o
$clang: error: unsupported option '-fopenmp'
$make: *** [obj/argparse/argparse.o] Error 1
We have tried certain things to no avail, like granting permissions and what not, but have no idea what to do next.
It seems that it have something to do with the prettymake file:
mkfifo stderr
cat stderr | sed 's/\(.*\)/\1/' &
make $# 2>stderr | sed 's/\(.*\)/\1/'
rm stderr
It's like its trying to create a pipe to save the errors of the compilation but somehow it fails.
Also possibly worth of mention, it have a Makefile associated.
Since the github project does not have Issues, we've contacted the creator via email, but well, we thought maybe someone could help us here too.
Any kind of help would be honestly appreciated, thanks.
A comment from the OP invites me to answer; here it is.
The prettymake script creates a named fifo in order to receive the messages produced by make on its standard error.
A background process (cat) consumes the data from this fifo and sends them to a sed command (see right after) in order to transform these data before writing to standard output.
(note that cat is useless here since sed could have directly read from the named fifo thanks to <)
However, the two sed commands as shown in the question don't do anything since they just capture each line of text (\(.*\)) and repeat them unchanged (\1), thus they could have been omitted.
In this case, the script could just contain make $# 2>&1, it would have produced the same effect.
On a system where creating the named fifo is problematic (old version of WSL apparently), this change in the script should produce the same effect as expected.
Looking at the link provided in the question, we can see that the original prettymake script actually contains transformations in the sed commands in order to display standard output and standard error of the make command with different colours.
We just upgraded our build server from Ubuntu 16.x to 18.04.1, and I can no longer get Coverity to work.
Per Coverity Scan fails to build <stdlib.h> with _GNU_SOURCE defined, I have a Docker container on our Ubuntu 18.04.1 machine that installs the gcc-6 package (there's no other gcc installed in that container -- it's only gcc-6).
Per TravisCI / Coverity: Warning - No files were emitted, I also ran the following in my container: /coverity/cov-analysis-linux64-7.6.0/bin/cov-configure --comptype gcc --compiler gcc-6 --template. This seems to have generated the file /coverity/cov-analysis-linux64-7.6.0/config/coverity_config.xml
When I configure / build our software (libfabric, from https://github.com/ofiwg/libfabric) in the container, it builds just fine. However, if I try to build it via cov-build, I get compilation errors. For example, here's a cov-build command to build just a single file from libfabric:
# Clear out the Coverity meta data dir, just to be sure
$ rm -rf cov-data
$ /coverity/cov-analysis-linux64-7.6.0/bin/cov-build \
-dir cov-data make src/fi_tostr.lo
Here's a snipit of the relevant output from the cov-build/build-log.txt file showing where Coverity failed:
[STATUS] Compiling src/fi_tostr.c
/coverity/cov-analysis-linux64-7.6.0/bin/cov-emit --dir=/home/jsquyres/git/libfabric/cov-data --ignore_path=/tmp/cov-0/a35264b27887fab7178c6bf7ab1117a9/cov-configure --ignore_path=/tmp/cov-0/a35264b27887fab7178c6bf7ab1117a9/cov-0/49f277832f55e48469661625f8083203 -w --no_stdarg_builtin --incompat_proto --add_type_modifier=__coverity___fpreg --add_type_modifier=__coverity___float80 --add_type_modifier=__coverity___float128 --no_predefined_cplusplus --gnu_version=60400 --no_predefines --restrict --gnu_carriage_return_line_terminator --no_multiline_string --no_trigraphs --c99 --allow__bool --pre_preinclude /home/jsquyres/git/libfabric/cov-data/emit/394646c6191c/config/5fe0c6b2b8489d2ab05d2434d738b5ac/gcc-config-0/coverity-macro-compat.h --pre_preinclude /home/jsquyres/git/libfabric/cov-data/emit/394646c6191c/config/5fe0c6b2b8489d2ab05d2434d738b5ac/gcc-config-0/coverity-compiler-compat.h --preinclude /coverity/cov-analysis-linux64-7.6.0/config/template-gcc-config-8/../user_nodefs.h --gcc -I . -I include -I prov/sockets/include -I prov/sockets --sys_include /usr/lib/gcc/x86_64-linux-gnu/6/include --sys_include /usr/local/include --sys_include /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed --sys_include /usr/include/x86_64-linux-gnu --sys_include /usr/include -DHAVE_CONFIG_H -DNDEBUG -DPROVDLDIR="/usr/local/lib/libfabric" -DRDMADIR="#rdmadir#" -DSYSCONFDIR="/usr/local/etc" -D_GNU_SOURCE -D__OPTIMIZE__ -D__USE_XOPEN2K8 --type_sizes=e16Pdlx8fi4s2 --type_alignments=e16Pdlx8fi4s2 --size_t_type=m --wchar_t_type=i --ptrdiff_t_type=l src/fi_tostr.c
"/usr/lib/gcc/x86_64-linux-gnu/6/include/stdatomic.h", line 40: error #65:
expected a ";"
typedef _Atomic _Bool atomic_bool;
^
"/usr/lib/gcc/x86_64-linux-gnu/6/include/stdatomic.h", line 41: error #84:
invalid combination of type specifiers
typedef _Atomic char atomic_char;
^
Does anyone know how to make Coverity understand these types?
How fix Error of crt1.o,crti.o in Build TinyCCompiler(TCC) from Source?
https://github.com/LuaDist/tcc
i'm test this at my Desktop system(ubuntu) and also test on server(centos).
at both OS , show error.
Error :
tcc: file '/usr/lib/crt1.o' not found
tcc: file '/usr/lib/crti.o' not found
Details :
guest#Base:~/Gits/tcc-compiler$ ./configure --prefix=build
Binary directory build/bin
TinyCC directory build/lib/tcc
Library directory build/lib
Include directory build/include
Manual directory build/man
Doc directory build/share/doc/tcc
Target root prefix
Source path /home/guest/Gits/tcc-compiler
C compiler gcc
CPU x86-64
Big Endian no
gprof enabled no
cross compilers no
use libgcc no
Creating config.mak and config.h
config.h is unchanged
guest#Base:~/Gits/tcc-compiler$ sudo make
....
....
guest#Base:~/Gits/tcc-compiler$ sudo make install
mkdir -p "build/bin"
install -s -m755 tcc "build/bin"
mkdir -p "build/man/man1"
install tcc.1 "build/man/man1"
mkdir -p "build/lib/tcc"
mkdir -p "build/lib/tcc/include"
install -m644 libtcc1.a "build/lib/tcc"
install -m644 include/stdarg.h include/stddef.h include/stdbool.h include/float.h include/varargs.h include/tcclib.h "build/lib/tcc/include"
mkdir -p "build/share/doc/tcc"
install -m644 tcc-doc.html "build/share/doc/tcc"
mkdir -p "build/lib"
install -m644 libtcc.a "build/lib"
mkdir -p "build/include"
install -m644 libtcc.h "build/include"
guest#Base:~/Gits/tcc-compiler$ cat test2.c
#include <tcclib.h>
int main()
{
printf("Hello World\n");
return 0;
}
Error :
guest#Base:~/Gits/tcc-compiler$ build/bin/tcc test2.c
tcc: file '/usr/lib/crt1.o' not found
tcc: file '/usr/lib/crti.o' not found
$ find /usr/ -name crti*
/usr/mipsel-linux-gnu/lib/crti.o
/usr/lib32/crti.o
/usr/libx32/crti.o
/usr/lib/i386-linux-gnu/crti.o
/usr/lib/x86_64-linux-gnu/crti.o
$ find /usr/ -name crt1*
/usr/mipsel-linux-gnu/lib/crt1.o
/usr/lib32/crt1.o
/usr/libx32/crt1.o
/usr/x86_64-w64-mingw32/lib/crt1.o
/usr/x86_64-w64-mingw32/lib/crt1u.o
/usr/i686-w64-mingw32/lib/crt1.o
/usr/i686-w64-mingw32/lib/crt1u.o
/usr/lib/i386-linux-gnu/crt1.o
/usr/lib/x86_64-linux-gnu/crt1.o
(Full Commands available at https://pastebin.ubuntu.com/26211506/)
how can fix error?
i'm can install tcc using sudo apt install tcc.(without bug and error)
but i want install tcc from source.(this have error)
New Update
in tcc.h file :
#define CONFIG_TCC_CRT_PREFIX CONFIG_SYSROOT "/usr/lib"
i'm change /usr/lib to /usr/lib/x86_64-linux-gnu.
$ build/bin/tcc test.c -run
Hello World
$ /build/bin/tcc test.c
tcc: undefined symbol '__libc_csu_fini'
tcc: undefined symbol '__libc_csu_init'
tcc: undefined symbol '__libc_start_main'
tcc: undefined symbol 'printf'
New Update
#include <tcclib.h>
int main()
{
printf("Hello World\n");
return 0;
}
guest#Base:~/Gits/tcc-try/_build/_install/bin$ ./tcc test.c
test.c:1: include file 'tcclib.h' not found
How fix error of include files not found?!
Related Question : How fix Error of error of include files in TinyCCompiler(TCC)?
The LuaDist project aims to build a complete Lua ecosystem using CMake. So you should use the CMake build system instead of the original makefiles. Typically you would do the following CMake invocation.
$ mkdir _build && cd _build
$ cmake .. -DCMAKE_INSTALL_PREFIX=_install
$ cmake --build . --target install
After this you should have working tcc in _install/bin
Sorry this is not exactly an answer to a question, but initially I had the same problem and this is my solution (Ubuntu 18.04):
git clone https://github.com/TinyCC/tinycc
cd tinycc
./configure
make
make test
cd ..
echo '#include <stdio.h>
int main() {
printf("Hi!\n");
}' > a.c
tinycc/tcc -Btinycc a.c -o a.o
./a.o
i have MOTIF installed X11
a easy program is saved as hello.c
there is the following message
where can i get the X11/intrinsic.h , file ???
need help to compile
my system : MX-16 Linux Debian Jessie / i386
Code:
hans#mx1:~/Documents
$ cc push.c -o push -lXm -lXt -lX11
In file included from push.c:2:0:
/usr/include/Xm/Xm.h:59:27: fatal error: X11/Intrinsic.h: No such file or directory
#include <X11/Intrinsic.h>
^
compilation terminated.
hans#mx1:~/Documents
I installed the libxt-dev package on my Debian box:
apt-get install libxt-dev
Then the proper header will be installed:
# find /usr -name "Intrinsic.h" -print
/usr/include/X11/Intrinsic.h
Been using xv for several decades now -- I always find myself trying to rebuild it.
The copy on my system came from libxt-dev
$ locate Intrinsic
/usr/include/X11/Intrinsic.h
/usr/include/X11/IntrinsicI.h
/usr/include/X11/IntrinsicP.h
$ dpkg-query -S /usr/include/X11/Intrinsic.h
libxt-dev:amd64: /usr/include/X11/Intrinsic.h
You may want to install and use apt-file - you can ask it for a filename and it will tell you which packages (that you don't even have to have installed - just from the repos in your sources.lists) contain a file with that name
I'm trying to cross compile OpenSSL for PowerPC with the FIPS module. My build host's architecture is not PowerPC. I was able to cross compile the FIPS module just fine. However, when I run make on openssl, during the linking phase, it tries to execute certain binaries to run tests. The issue is that those binaries are produced for the target architecture and, as a result, I get the error "cannot execute binary file". Is there a way to produce executables of these tests on the host architecture rather than the target architecture? Should I be handling this process differently? Here are the following commands I used to build openssl. I replaced certain directories with DIR_HIDDEN.
export FIPS_DIRECTORY="$PWD/../../openssl-fips/tgt/linux-ppc603e/"
export cross="DIR_HIDDEN/powerpc-linux-gnu-"
make clean || exit 1
make dclean || exit 1
./Configure --prefix=$PWD/../tgt/linux-ppc603e linux-ppc fips --with-fipsdir=${FIPS_DIRECTORY}
make depend || exit 1
make CC="$FIPS_DIRECTORY/bin/fipsld" RANLIB="${cross}ranlib" AR="${cross}ar r" LD="$FIPS_DIRECTORY/bin/fipsld" FIPSLD_CC="${cross}gcc" HOSTCC="/usr/bin/gcc" || exit 1
make install || exit 1
I get the following error during the make command:
shlib_target=; if [ -n "" ]; then \
shlib_target="linux-shared"; \
elif [ -n "libcrypto" ]; then \
FIPSLD_CC="/DIR_HIDDEN/openssl/openssl-1.0.1i/../../openssl-fips/tgt/linux-ppc603e//bin/fipsld"; CC=/DIR_HIDDEN/openssl/openssl-1.0.1i/../../openssl-fips/tgt/linux-ppc603e//bin/fipsld; export CC FIPSLD_CC; \
fi; \
LIBRARIES="-L.. -lssl -L.. -lcrypto" ; \
make -f ../Makefile.shared -e \
APPNAME=openssl OBJECTS="openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o" \
LIBDEPS=" $LIBRARIES -ldl" \
link_app.${shlib_target}
make[2]: Entering directory `/DIR_HIDDEN/openssl/openssl-1.0.1i/apps'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}"; LDCMD="${LDCMD:-/DIR_HIDDEN/openssl/openssl-1.0.1i/../../openssl-fips/tgt/linux-ppc603e//bin/fipsld}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DB_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_BN_ASM_MONT -I/DIR_HIDDEN/openssl/openssl-1.0.1i/../../openssl-fips/tgt/linux-ppc603e//include -DSHA1_ASM -DSHA256_ASM -DAES_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o ${APPNAME:=openssl} openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o ec.o ecparam.o x509.o genrsa.o gendsa.o genpkey.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o pkey.o pkeyparam.o pkeyutl.o spkac.o smime.o cms.o rand.o engine.o ocsp.o prime.o ts.o srp.o ${LIBDEPS} )
/DIR_HIDDEN/openssl/openssl-1.0.1i/../../openssl-fips/tgt/linux-ppc603e//bin/fipsld: line 185: ./openssl: cannot execute binary file
make[2]: *** [link_app.] Error 126
When invoking the make command again and again, I get the same error but for all the applications located in the /test directory of the openssl tarball. Examples include bntest, ectest, and ecdhtest.
I received a similar error when I was cross compiling the FIPS module, but I was able to resolve that by including the host compiler in the HOSTCC variable. A similar trick did not work for the openssl compilation.
Any guidance would be appreciated. Thanks!
I was able to modify the make command to get the process to complete. I was missing the FIPS_SIG environment variable, which points to the incore script. The make command is now:
make FIPS_SIG=$PWD/`find ../../openssl-fips/ -iname incore` CC="$FIPS_DIRECTORY/bin/fipsld" RANLIB="${cross}ranlib" AR="${cross}ar r" LD="$FIPS_DIRECTORY/bin/fipsld" FIPSLD_CC="${cross}gcc"
I still see prints to console that indicate that openssl cannot be executed, but these are warnings and don't halt the makefile. Not really sure why or how this fixed the problem, but I'll take it.