raspberry pi 1 cross compliation on Mac Monterey using CMake - c++

im trying to compile c++ code on Mac (Monterey) using cross-compilation (to Raspberry Pi 1) using this CMake and following compiler:
arm-unknown-linux-gnueabihf
from:
https://thinkski.github.io/osx-arm-linux-toolchains/
here is CMake toolchain setup:
SET(CMAKE_SYSTEM_NAME Darwin)
SET(CMAKE_SYSTEM_VERSION 1)
SET(CMAKE_C_COMPILER /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-gcc) #
SET(CMAKE_CXX_COMPILER /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-g++ )
set(CMAKE_VERBOSE_MAKEFILE TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv6zk -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -v -std=c++14 ")
set(CMAKE_AR /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-ar )
set(CMAKE_RANLIB /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-ranlib )
SET(CMAKE_OSX_SYSROOT /Users/dro/Development/arm/rpisysroot/rpisysroot/)# /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot/usr/include/")
SET(CMAKE_FIND_ROOT_PATH /Users/dro/Development/arm/rpisysroot/rpisysroot/)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
add_definitions(-Wall)
after i run:
cmake -D CMAKE_TOOLCHAIN_FILE=/Users/dro/Development/arm/code/toolchainpihf.cmake ../
and then
make
i got following error (during linking):
[ 75%] Linking CXX executable CMakeHelloWorld
/Applications/CMake.app/Contents/bin/cmake -E cmake_link_script CMakeFiles/CMakeHelloWorld.dir/link.txt --verbose=1
/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-g++ -march=armv6zk -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -v -std=c++14 -isysroot /Users/dro/Development/arm/rpisysroot/rpisysroot/ -Wl,-headerpad_max_install_names --specs=nosys.specs CMakeFiles/CMakeHelloWorld.dir/HelloWorld.cpp.o -o CMakeHelloWorld Hello/libHello.a
Using built-in specs.
Reading specs from nosys.specs
arm-unknown-linux-gnueabihf-g++: error: nosys.specs: No such file or directory
when i manually type what is above, but without flag --specs=nosys.specsevertyhing works smooth:
dro#build build% /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-g++ -march=armv6zk -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -v -std=c++14 -isysroot /Users/dro/Development/arm/rpisysroot/rpisysroot/ -Wl,-headerpad_max_install_names CMakeFiles/CMakeHelloWorld.dir/HelloWorld.cpp.o -o CMakeHelloWorld Hello/libHello.a
output:
Using built-in specs.
COLLECT_GCC=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/arm-unknown-linux-gnueabihf-g++
COLLECT_LTO_WRAPPER=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/arm-unknown-linux-gnueabihf/8.3.0/lto-wrapper
Target: arm-unknown-linux-gnueabihf
Configured with: /Volumes/xtool-build-env/.build/arm-unknown-linux-gnueabihf/src/gcc/configure --build=x86_64-build_apple-darwin18.7.0 --host=x86_64-build_apple-darwin18.7.0 --target=arm-unknown-linux-gnueabihf --prefix=/Volumes/xtool-build-env/arm-unknown-linux-gnueabihf --with-sysroot=/Volumes/xtool-build-env/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot --enable-languages=c,c++ --with-cpu=cortex-a9 --with-fpu=neon-vfpv4 --with-float=hard --with-pkgversion='crosstool-NG 1.24.0' --enable-__cxa_atexit --disable-libmudflap --disable-libgomp --disable-libssp --disable-libquadmath --disable-libquadmath-support --disable-libsanitizer --disable-libmpx --with-gmp=/Volumes/xtool-build-env/.build/arm-unknown-linux-gnueabihf/buildtools --with-mpfr=/Volumes/xtool-build-env/.build/arm-unknown-linux-gnueabihf/buildtools --with-mpc=/Volumes/xtool-build-env/.build/arm-unknown-linux-gnueabihf/buildtools --with-isl=/Volumes/xtool-build-env/.build/arm-unknown-linux-gnueabihf/buildtools --enable-lto --enable-threads=posix --enable-target-optspace --enable-plugin --enable-gold --disable-nls --disable-multilib --with-local-prefix=/Volumes/xtool-build-env/arm-unknown-linux-gnueabihf/arm-unknown-linux-gnueabihf/sysroot --enable-long-long
Thread model: posix
gcc version 8.3.0 (crosstool-NG 1.24.0)
COMPILER_PATH=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/arm-unknown-linux-gnueabihf/8.3.0/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/bin/
LIBRARY_PATH=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/lib/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/lib/:/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/usr/lib/
COLLECT_GCC_OPTIONS= '-mcpu=arm1176jzf-s' '-mfpu=vfp' '-mfloat-abi=hard' '-v' '-std=c++14' '-isysroot' '/Users/dro/Development/arm/rpisysroot/rpisysroot/' '-o' 'CMakeHelloWorld' '-shared-libgcc' '-mtls-dialect=gnu' '-marm' '-march=armv6zk+fp'
/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/arm-unknown-linux-gnueabihf/8.3.0/collect2 -plugin /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/arm-unknown-linux-gnueabihf/8.3.0/liblto_plugin.so -plugin-opt=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../libexec/gcc/arm-unknown-linux-gnueabihf/8.3.0/lto-wrapper -plugin-opt=-fresolution=/var/folders/s0/bp0mmft901q26dz9_qq44vdr0000gn/T//cczSMnXT.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot --eh-frame-hdr -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o CMakeHelloWorld /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/usr/lib/crt1.o /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/usr/lib/crti.o /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/crtbegin.o -L/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0 -L/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc -L/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/../../../../arm-unknown-linux-gnueabihf/lib -L/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/lib -L/Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/usr/lib -headerpad_max_install_names CMakeFiles/CMakeHelloWorld.dir/HelloWorld.cpp.o Hello/libHello.a -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../lib/gcc/arm-unknown-linux-gnueabihf/8.3.0/crtend.o /Users/dro/Development/arm/arm-unknown-linux-gnueabihf/bin/../arm-unknown-linux-gnueabihf/sysroot/usr/lib/crtn.o
COLLECT_GCC_OPTIONS= '-mcpu=arm1176jzf-s' '-mfpu=vfp' '-mfloat-abi=hard' '-v' '-std=c++14' '-isysroot' '/Users/dro/Development/arm/rpisysroot/rpisysroot/' '-o' 'CMakeHelloWorld' '-shared-libgcc' '-mtls-dialect=gnu' '-marm' '-march=armv6zk+fp'
and executable is created:
dro#build build% file CMakeHelloWorld
CMakeHelloWorld: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 4.20.8, with debug_info, not stripped
Question: seems that this complier does not support flag --specs, is it possible in CMake to remove this flag from settings? I think it is added by default..

Related

G++ not understanding console option

So, I need to compile, assemble, and link a C++ file. But, I need to use an external library with it. So, I'm attempting to do so with G++ using this batch file:
g++ -c WindowTest.cpp -I include\bgfx-master\include\bgfx -I include\glfw-3.3.8.bin.WIN32\include\GLFW --verbose
g++ WindowTest.o -o WindowTest.exe -static -L include\glfw-3.3.8.bin.WIN32\lib-vc2022 -l glfw3.lib --verbose
However, when run, I get this output:
g++ -c WindowTest.cpp -I include\bgfx-master\include\bgfx -I include\glfw-3.3.8.bin.WIN32\include\GLFW --verbose
Using built-in specs.
COLLECT_GCC=g++
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
COLLECT_GCC_OPTIONS='-c' '-I' 'include\bgfx-master\include\bgfx' '-I' 'include\glfw-3.3.8.bin.WIN32\include\GLFW' '-v' '-shared-libgcc' '-mtune=generic' '-march=i586'
c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/cc1plus.exe -quiet -v -I include\bgfx-master\include\bgfx -I include\glfw-3.3.8.bin.WIN32\include\GLFW -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/ WindowTest.cpp -quiet -dumpbase WindowTest.cpp -mtune=generic -march=i586 -auxbase WindowTest -version -o C:\Users\owenr\AppData\Local\Temp\ccnfsknd.s
GNU C++14 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.2, isl version 0.15
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include/c++"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include/c++/mingw32"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include/c++/backward"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include"
ignoring duplicate directory "/mingw/lib/gcc/mingw32/6.3.0/../../../../include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/include-fixed"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/6.3.0/../../../../mingw32/include"
ignoring duplicate directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
include\bgfx-master\include\bgfx
include\glfw-3.3.8.bin.WIN32\include\GLFW
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include/c++
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include/c++/mingw32
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include/c++/backward
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../include
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/include-fixed
c:\mingw\bin\../lib/gcc/mingw32/6.3.0/../../../../mingw32/include
End of search list.
GNU C++14 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.2, isl version 0.15
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: af09a87986453bf79da3565f33c7648f
COLLECT_GCC_OPTIONS='-c' '-I' 'include\bgfx-master\include\bgfx' '-I' 'include\glfw-3.3.8.bin.WIN32\include\GLFW' '-v' '-shared-libgcc' '-mtune=generic' '-march=i586'
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/as.exe -v -I include\bgfx-master\include\bgfx -I include\glfw-3.3.8.bin.WIN32\include\GLFW -o WindowTest.o C:\Users\owenr\AppData\Local\Temp\ccnfsknd.s
GNU assembler version 2.28 (mingw32) using BFD version (GNU Binutils) 2.28
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/6.3.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../
COLLECT_GCC_OPTIONS='-c' '-I' 'include\bgfx-master\include\bgfx' '-I' 'include\glfw-3.3.8.bin.WIN32\include\GLFW' '-v' '-shared-libgcc' '-mtune=generic' '-march=i586'
$-> g++ WindowTest.o -o WindowTest.exe -static -L include\glfw-3.3.8.bin.WIN32\lib-vc2022 -l glfw3.lib --verbose
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/6.3.0/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../
COLLECT_GCC_OPTIONS='-o' 'WindowTest.exe' '-static' '-Linclude\glfw-3.3.8.bin.WIN32\lib-vc2022' '-v' '-mtune=generic' '-march=i586'
c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/collect2.exe -plugin c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/liblto_plugin-0.dll -plugin-opt=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\owenr\AppData\Local\Temp\ccyUGRgT.res -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -plugin-opt=-pass-through=-ladvapi32 -plugin-opt=-pass-through=-lshell32 -plugin-opt=-pass-through=-luser32 -plugin-opt=-pass-through=-lkernel32 -plugin-opt=-pass-through=-lmingw32 -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_eh -plugin-opt=-pass-through=-lmoldname -plugin-opt=-pass-through=-lmingwex -plugin-opt=-pass-through=-lmsvcrt -Bstatic -o WindowTest.exe c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../crt2.o c:/mingw/bin/../lib/gcc/mingw32/6.3.0/crtbegin.o -Linclude\glfw-3.3.8.bin.WIN32\lib-vc2022 -Lc:/mingw/bin/../lib/gcc/mingw32/6.3.0 -Lc:/mingw/bin/../lib/gcc -Lc:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/lib -Lc:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../.. WindowTest.o -lglfw3.lib -lstdc++ -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/6.3.0/crtend.o
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lglfw3.lib
collect2.exe: error: ld returned 1 exit status
I've tried moving the library file, adding or removing space between the -l option and glfw3.lib, and many other things. It gives this output every time unless I just don't try to include the library file, in which case I get this error:
WindowTest.o:WindowTest.cpp:(.text+0xc): undefined reference to `glfwInit'
collect2.exe: error: ld returned 1 exit status
Edit:
Here's the file system
Main Directory:
include
glfw-3.3.8.bin.WIN32
include
glw3.h (Header file included in WindowTest.cpp)
lib-vc2022
glfw3.lib (Library file I want to include)
WindowTest.cpp
MakeFile.bat (Has g++ commands)

debugging remote application with Eclipse gdb/gdbserver

I want to debug an application with Eclipse Oxygen on an arm-linux (debian) target where ssh is not installed.
So I used the C/C++ Attach to Application method.
I've compiled the application with g3option of course and copied the application on the target.
I've started gdbserver on the target.
When I start debugging (using the cross gdb of course), it connects to gdbserver via TCP and it stops on the application's start address but it doesn't load the source file.
When I click on resume, the application starts normally.
If I debug it locally, everything works well of course.
What is missing here to get the source files loaded?
What usefull info I can provide to guess what's wrong?
Edit
make all
Building file: ../src/main.c
Invoking: Cross GCC Compiler
arm-buildroot-linux-gnueabihf-gcc -std=c99 -I"/home/user/Documents/Dev/Xwidgets/inc" -I"/home/user/Documents/Dev/myApp/inc" -O0 -g3 -Wall -c -fmessage-length=0 -Wno-missing-braces --sysroot=/home/user/Documents/myProject/sysroot -D_REENTRANT -fsigned-char -v -MMD -MP -MF"src/main.d" -MT"src/main.o" -o "src/main.o" "../src/main.c"
Utilisation des specs internes.
COLLECT_GCC=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/arm-buildroot-linux-gnueabihf-gcc.br_real
Target: arm-buildroot-linux-gnueabihf
Configuré avec: ./configure --prefix=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --sysconfdir=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/etc --enable-static --target=arm-buildroot-linux-gnueabihf --with-sysroot=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr/arm-buildroot-linux-gnueabihf/sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --with-gmp=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-mpc=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-mpfr=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-pkgversion='Buildroot 2017.05.2-g3bca02e-dirty' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --enable-tls --disable-libmudflap --enable-threads --without-isl --without-cloog --disable-decimal-float --with-abi=aapcs-linux --with-cpu=cortex-a7 --with-fpu=vfpv4-d16 --with-float=hard --with-mode=arm --enable-languages=c --with-build-time-tools=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr/arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
Modèle de thread: posix
gcc version 4.9.4 (Buildroot 2017.05.2-g3bca02e-dirty)
COLLECT_GCC_OPTIONS='-std=c99' '-I' '/home/user/Documents/Dev/Xwidgets/inc' '-I' '/home/user/Documents/Dev/myApp/inc' '-O0' '-g3' '-Wall' '-c' '-fmessage-length=0' '-Wno-missing-braces' '-D' '_REENTRANT' '-fsigned-char' '-v' '-MMD' '-MP' '-MF' 'src/main.d' '-MT' 'src/main.o' '-o' 'src/main.o' '-mcpu=cortex-a7' '-mfloat-abi=hard' '-mfpu=vfpv4-d16' '-mabi=aapcs-linux' '-marm' '-mtls-dialect=gnu'
/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/cc1 -quiet -v -I /home/user/Documents/Dev/Xwidgets/inc -I /home/user/Documents/Dev/myApp/inc -iprefix /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/ -isysroot /home/user/Documents/myProject/sysroot -MMD src/main.d -MF src/main.d -MP -MT src/main.o -dD -D _REENTRANT ../src/main.c -quiet -dumpbase main.c -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=vfpv4-d16 -mabi=aapcs-linux -marm -mtls-dialect=gnu -auxbase-strip src/main.o -g3 -O0 -Wall -Wno-missing-braces -std=c99 -version -fmessage-length=0 -fsigned-char -o /tmp/ccdyGfCH.s
GNU C (Buildroot 2017.05.2-g3bca02e-dirty) version 4.9.4 (arm-buildroot-linux-gnueabihf)
compiled by GNU C version 6.3.0 20170516, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3
heuristiques GGC: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
directory « /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/include » est ignoré car inexistant
directory « /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/../../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/include » est ignoré car présent deux fois
directory « /home/user/Documents/myProject/sysroot/usr/local/include » est ignoré car inexistant
directory « /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/../../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/include-fixed » est ignoré car présent deux fois
directory « /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/../../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/include » est ignoré car inexistant
la recherche pour #include "..." débute ici :
la recherche pour #include <...> débute ici:
/home/user/Documents/Dev/Xwidgets/inc
/home/user/Documents/Dev/myApp/inc
/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/include
/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/include-fixed
/home/user/Documents/myProject/sysroot/usr/include
Fin de la liste de recherche.
GNU C (Buildroot 2017.05.2-g3bca02e-dirty) version 4.9.4 (arm-buildroot-linux-gnueabihf)
compiled by GNU C version 6.3.0 20170516, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3
heuristiques GGC: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 97c01351799a22899fe6b56e86741046
COLLECT_GCC_OPTIONS='-std=c99' '-I' '/home/user/Documents/Dev/Xwidgets/inc' '-I' '/home/user/Documents/Dev/myApp/inc' '-O0' '-g3' '-Wall' '-c' '-fmessage-length=0' '-Wno-missing-braces' '-D' '_REENTRANT' '-fsigned-char' '-v' '-MMD' '-MP' '-MF' 'src/main.d' '-MT' 'src/main.o' '-o' 'src/main.o' '-mcpu=cortex-a7' '-mfloat-abi=hard' '-mfpu=vfpv4-d16' '-mabi=aapcs-linux' '-marm' '-mtls-dialect=gnu'
/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/bin/as -v -I /home/user/Documents/Dev/Xwidgets/inc -I /home/user/Documents/Dev/myApp/inc -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=vfpv4-d16 -meabi=5 -o src/main.o /tmp/ccdyGfCH.s
Version de l'assembleur GNU 2.27 (arm-buildroot-linux-gnueabihf) utilisant la version BFD (GNU Binutils) 2.27
COMPILER_PATH=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/bin/
LIBRARY_PATH=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/lib/:/home/user/Documents/myProject/sysroot/lib/:/home/user/Documents/myProject/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-std=c99' '-I' '/home/user/Documents/Dev/Xwidgets/inc' '-I' '/home/user/Documents/Dev/myApp/inc' '-O0' '-g3' '-Wall' '-c' '-fmessage-length=0' '-Wno-missing-braces' '-D' '_REENTRANT' '-fsigned-char' '-v' '-MMD' '-MP' '-MF' 'src/main.d' '-MT' 'src/main.o' '-o' 'src/main.o' '-mcpu=cortex-a7' '-mfloat-abi=hard' '-mfpu=vfpv4-d16' '-mabi=aapcs-linux' '-marm' '-mtls-dialect=gnu'
Finished building: ../src/main.c
Building target: myApp
Invoking: Cross GCC Linker
arm-buildroot-linux-gnueabihf-gcc -L"/home/user/Documents/Dev/Xwidgets/a20som_IM4" -v --sysroot=/home/user/Documents/myProject/sysroot -o "myApp" ./src/IMV_asymmetry.o ./src/IMV_power.o ./src/IMV_precision.o ./src/IMV_random.o ./src/IMV_sensibility.o ./src/IMV_speed.o ./src/IMV_timer.o ./src/free_session_screen.o ./src/fs_big_toolbar.o ./src/fs_page_1.o ./src/fs_page_2.o ./src/fs_page_3.o ./src/fs_page_4.o ./src/fs_right_sidebar.o ./src/fs_small_toolbar.o ./src/main.o ./src/patient_screen.o ./src/programs_screen.o ./src/run_timeline.o ./src/running_screen.o ./src/welcome_screen.o -lXwidgets -lpthread -lm -ljpeg -lpng16 -lSDL2 -lSDL2_image -lSDL2_ttf -ljson-c
Utilisation des specs internes.
COLLECT_GCC=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/arm-buildroot-linux-gnueabihf-gcc.br_real
COLLECT_LTO_WRAPPER=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/lto-wrapper
Target: arm-buildroot-linux-gnueabihf
Configuré avec: ./configure --prefix=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --sysconfdir=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/etc --enable-static --target=arm-buildroot-linux-gnueabihf --with-sysroot=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr/arm-buildroot-linux-gnueabihf/sysroot --disable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib --with-gmp=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-mpc=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-mpfr=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr --with-pkgversion='Buildroot 2017.05.2-g3bca02e-dirty' --with-bugurl=http://bugs.buildroot.net/ --disable-libquadmath --enable-tls --disable-libmudflap --enable-threads --without-isl --without-cloog --disable-decimal-float --with-abi=aapcs-linux --with-cpu=cortex-a7 --with-fpu=vfpv4-d16 --with-float=hard --with-mode=arm --enable-languages=c --with-build-time-tools=/home/user/Documents/myProject/buildroot-2017.05.2/buildroot-2017.05.2/../board/a20som_IM4/cross/usr/arm-buildroot-linux-gnueabihf/bin --enable-shared --disable-libgomp
Modèle de thread: posix
gcc version 4.9.4 (Buildroot 2017.05.2-g3bca02e-dirty)
COMPILER_PATH=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/bin/
LIBRARY_PATH=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/:/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/lib/:/home/user/Documents/myProject/sysroot/lib/:/home/user/Documents/myProject/sysroot/usr/lib/
COLLECT_GCC_OPTIONS='-L/home/user/Documents/Dev/Xwidgets/a20som_IM4' '-v' '-o' 'myApp' '-mcpu=cortex-a7' '-mfloat-abi=hard' '-mfpu=vfpv4-d16' '-mabi=aapcs-linux' '-marm' '-mtls-dialect=gnu'
/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/collect2 -plugin /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/liblto_plugin.so -plugin-opt=/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../libexec/gcc/arm-buildroot-linux-gnueabihf/4.9.4/lto-wrapper -plugin-opt=-fresolution=/tmp/cc9MsoIV.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/home/user/Documents/myProject/sysroot --eh-frame-hdr -dynamic-linker /lib/ld-linux-armhf.so.3 -X -m armelf_linux_eabi -o myApp /home/user/Documents/myProject/sysroot/usr/lib/crt1.o /home/user/Documents/myProject/sysroot/usr/lib/crti.o /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/crtbegin.o -L/home/user/Documents/Dev/Xwidgets/a20som_IM4 -L/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4 -L/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc -L/home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/../../../../arm-buildroot-linux-gnueabihf/lib -L/home/user/Documents/myProject/sysroot/lib -L/home/user/Documents/myProject/sysroot/usr/lib ./src/IMV_asymmetry.o ./src/IMV_power.o ./src/IMV_precision.o ./src/IMV_random.o ./src/IMV_sensibility.o ./src/IMV_speed.o ./src/IMV_timer.o ./src/free_session_screen.o ./src/fs_big_toolbar.o ./src/fs_page_1.o ./src/fs_page_2.o ./src/fs_page_3.o ./src/fs_page_4.o ./src/fs_right_sidebar.o ./src/fs_small_toolbar.o ./src/main.o ./src/patient_screen.o ./src/programs_screen.o ./src/run_timeline.o ./src/running_screen.o ./src/welcome_screen.o -lXwidgets -lpthread -lm -ljpeg -lpng16 -lSDL2 -lSDL2_image -lSDL2_ttf -ljson-c -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /home/user/Documents/myProject/buildroot-2017.05.2/board/a20som_IM4/cross/usr/bin/../lib/gcc/arm-buildroot-linux-gnueabihf/4.9.4/crtend.o /home/user/Documents/myProject/sysroot/usr/lib/crtn.o
Finished building target: myApp
You need to map the source path in GDB. Have a look here for the documentation.
Finding Source file mapping
You can try running the following command in cross GDB to find the source file mapping:
info sources
# Find the source files used to build the executable.
Mapping the binary source file paths to absolute file paths
For example, if the file /foo/bar/baz.c was moved to /mnt/cross/baz.c, then the command:
set substitute-path /foo/bar /mnt/cross
Note: Referenced from GDB documentation available here.

Eclipse is compiling with with libopencm3 for STM32F0 but not for STM32F1

I managed it to get a working blink template with libopencm3 for the STM32F051 (# stmf0discovory). Then I wanted to get a working one for my Maple Mini (with STM32F103 = cortex-m3) so I copied the first one and changed the cpu flag from cortex-m0-plus to cortex-m3, the library from opencm3_stm32f0 to opencm3_stm32f1 and so on...
But as you can guess its not compiling. From the compilation log it seems like the compiler is not invoking the linker and thats why its not finding the gpio_mode_setup function and definistions like GPIO_MODE_OUTPUT. Here are the Eclipse console outputs:
str32f0 - working:
19:07:01 **** Incremental Build of configuration Debug for project Template ****
make all
'Building file: ../Source/main.c'
'Invoking: Cross ARM C Compiler'
arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -mlittle-endian -Og -fmessage-length=0 -ffunction-sections -fdata-sections -fno-common -msoft-float -pedantic -Wall -Wextra -Wmissing-declarations -Wshadow -g3 -ggdb -DSTM32F0 -I"C:\ARM-GNU-Toolchain\libopencm3\include" -I"C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include" -std=gnu11 -Wmissing-prototypes -Wstrict-prototypes -Wimplicit-function-declaration -Wredundant-decls -Wa,-adhlns="Source/main.o.lst" -v -MMD -MP -MF"Source/main.d" -MT"Source/main.o" -c -o "Source/main.o" "../Source/main.c"
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-mingw --libexecdir=/home/build/work/GCC-4-9-build/install-mingw/lib --infodir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (GNU Tools for ARM Embedded Processors)
COLLECT_GCC_OPTIONS='-mcpu=cortex-m0plus' '-mthumb' '-mlittle-endian' '-Og' '-fmessage-length=0' '-ffunction-sections' '-fdata-sections' '-fno-common' '-mfloat-abi=soft' '-Wpedantic' '-Wall' '-Wextra' '-Wmissing-declarations' '-Wshadow' '-g3' '-ggdb' '-D' 'STM32F0' '-I' 'C:\ARM-GNU-Toolchain\libopencm3\include' '-I' 'C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include' '-std=gnu11' '-Wmissing-prototypes' '-Wstrict-prototypes' '-Wimplicit-function-declaration' '-Wredundant-decls' '-v' '-MMD' '-MP' '-MF' 'Source/main.d' '-MT' 'Source/main.o' '-c' '-o' 'Source/main.o'
c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/cc1.exe -quiet -v -I C:\ARM-GNU-Toolchain\libopencm3\include -I C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include -imultilib armv6-m -iprefix c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/ -isysroot c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi -MMD Source/main.d -MF Source/main.d -MP -MT Source/main.o -dD -D__USES_INITFINI__ -D STM32F0 ../Source/main.c -quiet -dumpbase main.c -mcpu=cortex-m0plus -mthumb -mlittle-endian -mfloat-abi=soft -auxbase-strip Source/main.o -g3 -ggdb -Og -Wpedantic -Wall -Wextra -Wmissing-declarations -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wimplicit-function-declaration -Wredundant-decls -std=gnu11 -version -fmessage-length=0 -ffunction-sections -fdata-sections -fno-common -o C:\Users\Lenny\AppData\Local\Temp\ccN3qnLh.s
GNU C (GNU Tools for ARM Embedded Processors) version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (arm-none-eabi)
compiled by GNU C version 4.7.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/include"
ignoring nonexistent directory "c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi/home/build/work/GCC-4-9-build/install-mingw/lib/gcc/arm-none-eabi/4.9.3/../../../../include"
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/include-fixed"
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/include"
ignoring nonexistent directory "c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi/usr/include"
#include "..." search starts here:
#include <...> search starts here:
C:\ARM-GNU-Toolchain\libopencm3\include
C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/include
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/include-fixed
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/include
End of search list.
GNU C (GNU Tools for ARM Embedded Processors) version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (arm-none-eabi)
compiled by GNU C version 4.7.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9d74dec9c13b63cc54577fa808c91d66
COLLECT_GCC_OPTIONS='-mcpu=cortex-m0plus' '-mthumb' '-mlittle-endian' '-Og' '-fmessage-length=0' '-ffunction-sections' '-fdata-sections' '-fno-common' '-mfloat-abi=soft' '-Wpedantic' '-Wall' '-Wextra' '-Wmissing-declarations' '-Wshadow' '-g3' '-ggdb' '-D' 'STM32F0' '-I' 'C:\ARM-GNU-Toolchain\libopencm3\include' '-I' 'C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include' '-std=gnu11' '-Wmissing-prototypes' '-Wstrict-prototypes' '-Wimplicit-function-declaration' '-Wredundant-decls' '-v' '-MMD' '-MP' '-MF' 'Source/main.d' '-MT' 'Source/main.o' '-c' '-o' 'Source/main.o'
c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/as.exe -v -I C:\ARM-GNU-Toolchain\libopencm3\include -I C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include -EL -mcpu=cortex-m0plus -mfloat-abi=soft -meabi=5 -adhlns=Source/main.o.lst -o Source/main.o C:\Users\Lenny\AppData\Local\Temp\ccN3qnLh.s
GNU assembler version 2.24.0 (arm-none-eabi) using BFD version (GNU Tools for ARM Embedded Processors) 2.24.0.20150604
COMPILER_PATH=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/
LIBRARY_PATH=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-mcpu=cortex-m0plus' '-mthumb' '-mlittle-endian' '-Og' '-fmessage-length=0' '-ffunction-sections' '-fdata-sections' '-fno-common' '-mfloat-abi=soft' '-Wpedantic' '-Wall' '-Wextra' '-Wmissing-declarations' '-Wshadow' '-g3' '-ggdb' '-D' 'STM32F0' '-I' 'C:\ARM-GNU-Toolchain\libopencm3\include' '-I' 'C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template/Include' '-std=gnu11' '-Wmissing-prototypes' '-Wstrict-prototypes' '-Wimplicit-function-declaration' '-Wredundant-decls' '-v' '-MMD' '-MP' '-MF' 'Source/main.d' '-MT' 'Source/main.o' '-c' '-o' 'Source/main.o'
'Finished building: ../Source/main.c'
' '
'Building target: Template.elf'
'Invoking: Cross ARM C Linker'
arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -mlittle-endian -Og -fmessage-length=0 -ffunction-sections -fdata-sections -fno-common -msoft-float -pedantic -Wall -Wextra -Wmissing-declarations -Wshadow -g3 -ggdb -T "C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template\Misc\stm32f0-discovery.ld" -nostartfiles -Xlinker --gc-sections -L"C:\ARM-GNU-Toolchain\libopencm3\lib" -Wl,-Map,"Template.map" -Xlinker --cref --specs=nano.specs -v --static -Wl,--start-group -lc -lgcc -lnosys -Wl,--end-group -o "Template.elf" ./Source/main.o -lopencm3_stm32f0 -lc_nano -lnosys
Using built-in specs.
Reading specs from c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/nano.specs
rename spec link to nano_link
rename spec link_gcc_c_sequence to nano_link_gcc_c_sequence
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper.exe
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-mingw --libexecdir=/home/build/work/GCC-4-9-build/install-mingw/lib --infodir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (GNU Tools for ARM Embedded Processors)
COMPILER_PATH=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/
LIBRARY_PATH=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib/armv6-m/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/;c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib/
COLLECT_GCC_OPTIONS='-mcpu=cortex-m0plus' '-mthumb' '-mlittle-endian' '-Og' '-fmessage-length=0' '-ffunction-sections' '-fdata-sections' '-fno-common' '-mfloat-abi=soft' '-Wpedantic' '-Wall' '-Wextra' '-Wmissing-declarations' '-Wshadow' '-g3' '-ggdb' '-T' 'C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template\Misc\stm32f0-discovery.ld' '-nostartfiles' '-LC:\ARM-GNU-Toolchain\libopencm3\lib' '-specs=nano.specs' '-v' '-static' '-o' 'Template.elf'
c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/collect2.exe -plugin c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/liblto_plugin-0.dll -plugin-opt=c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/lto-wrapper.exe -plugin-opt=-fresolution=C:\Users\Lenny\AppData\Local\Temp\ccm3aIUJ.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lg_nano -plugin-opt=-pass-through=-lc_nano -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc_nano --sysroot=c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi -EL -Bstatic -X -o Template.elf -LC:\ARM-GNU-Toolchain\libopencm3\lib -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/armv6-m -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv6-m -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib/armv6-m -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3 -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib -Lc:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../arm-none-eabi/lib --gc-sections -Map Template.map --cref --start-group -lc_nano -lgcc -lnosys --end-group ./Source/main.o -lopencm3_stm32f0 -lc_nano -lnosys --start-group -lgcc -lg_nano -lc_nano --end-group --start-group -lgcc -lc_nano --end-group -T C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template\Misc\stm32f0-discovery.ld
'Finished building target: Template.elf'
' '
make --no-print-directory post-build
'Call post_build.py'
python C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template\Misc\post_build.py "C:/Users/Lenny/Documents/Eclipse/stm32f0-libopencm3/Template" "Debug" "Template"
arm-none-eabi-objdump -S "C:\Users\Lenny\Documents\Eclipse\stm32f0-libopencm3\Template\Debug\Template.elf" > "C:\Users\Lenny\Documents\Eclipse\stm32f0-libopencm3\Template\Debug\Template.lst"
' '
'Invoking: Cross ARM GNU Create Flash Image'
arm-none-eabi-objcopy -O ihex "Template.elf" "Template.hex"
'Finished building: Template.hex'
' '
'Invoking: Cross ARM GNU Print Size'
arm-none-eabi-size --format=berkeley "Template.elf"
text data bss dec hex filename
500 0 0 500 1f4 Template.elf
'Finished building: Template.siz'
' '
19:07:04 Build Finished (took 2s.662ms)
stm32f1 - maple, not wortking:
19:43:56 **** Incremental Build of configuration Debug for project Template ****
make all
'Building file: ../Source/main.c'
'Invoking: Cross ARM C Compiler'
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -mlittle-endian -mfix-cortex-m3-ldrd -Og -fmessage-length=0 -ffunction-sections -fdata-sections -msoft-float -pedantic -Wall -Wextra -Wmissing-declarations -Wshadow -g3 -ggdb -DSTM32F1 -I"C:\ARM-GNU-Toolchain\libopencm3\include" -I"C:/Users/Lenny/Documents/Eclipse/maple-mini/Template/Include" -std=gnu11 -Wmissing-prototypes -Wstrict-prototypes -Wimplicit-function-declaration -Wredundant-decls -Wa,-adhlns="Source/main.o.lst" -v -MMD -MP -MF"Source/main.d" -MT"Source/main.o" -c -o "Source/main.o" "../Source/main.c"
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-9-build/src/gcc/configure --build=i686-linux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/work/GCC-4-9-build/install-mingw --libexecdir=/home/build/work/GCC-4-9-build/install-mingw/lib --infodir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-9-build/install-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes --with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-9-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-isl=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-libelf=/home/build/work/GCC-4-9-build/build-mingw/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r
Thread model: single
gcc version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (GNU Tools for ARM Embedded Processors)
COLLECT_GCC_OPTIONS='-mcpu=cortex-m3' '-mthumb' '-mlittle-endian' '-mfix-cortex-m3-ldrd' '-Og' '-fmessage-length=0' '-ffunction-sections' '-fdata-sections' '-mfloat-abi=soft' '-Wpedantic' '-Wall' '-Wextra' '-Wmissing-declarations' '-Wshadow' '-g3' '-ggdb' '-D' 'STM32F1' '-I' 'C:\ARM-GNU-Toolchain\libopencm3\include' '-I' 'C:/Users/Lenny/Documents/Eclipse/maple-mini/Template/Include' '-std=gnu11' '-Wmissing-prototypes' '-Wstrict-prototypes' '-Wimplicit-function-declaration' '-Wredundant-decls' '-v' '-MMD' '-MP' '-MF' 'Source/main.d' '-MT' 'Source/main.o' '-c' '-o' 'Source/main.o'
c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/bin/../lib/gcc/arm-none-eabi/4.9.3/cc1.exe -quiet -v -I C:\ARM-GNU-Toolchain\libopencm3\include -I C:/Users/Lenny/Documents/Eclipse/maple-mini/Template/Include -imultilib armv7-m -iprefix c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/ -isysroot c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi -MMD Source/main.d -MF Source/main.d -MP -MT Source/main.o -dD -D__USES_INITFINI__ -D STM32F1 ../Source/main.c -quiet -dumpbase main.c -mcpu=cortex-m3 -mthumb -mlittle-endian -mfix-cortex-m3-ldrd -mfloat-abi=soft -auxbase-strip Source/main.o -g3 -ggdb -Og -Wpedantic -Wall -Wextra -Wmissing-declarations -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wimplicit-function-declaration -Wredundant-decls -std=gnu11 -version -fmessage-length=0 -ffunction-sections -fdata-sections -o C:\Users\Lenny\AppData\Local\Temp\ccd3YTdy.s
GNU C (GNU Tools for ARM Embedded Processors) version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (arm-none-eabi)
compiled by GNU C version 4.7.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/include"
ignoring nonexistent directory "c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi/home/build/work/GCC-4-9-build/install-mingw/lib/gcc/arm-none-eabi/4.9.3/../../../../include"
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/include-fixed"
ignoring duplicate directory "c:/arm-gnu-toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609-win32/lib/gcc/../../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/include"
ignoring nonexistent directory "c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../arm-none-eabi/usr/include"
#include "..." search starts here:
#include <...> search starts here:
C:\ARM-GNU-Toolchain\libopencm3\include
C:/Users/Lenny/Documents/Eclipse/maple-mini/Template/Include
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/include
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/include-fixed
c:\arm-gnu-toolchain\gcc-arm-none-eabi-4_9-2015q2-20150609-win32\bin\../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/include
End of search list.
GNU C (GNU Tools for ARM Embedded Processors) version 4.9.3 20150529 (release) [ARM/embedded-4_9-branch revision 224288] (arm-none-eabi)
compiled by GNU C version 4.7.4, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9d74dec9c13b63cc54577fa808c91d66
../Source/main.c: In function 'gpio_setup':
../Source/main.c:38:2: warning: implicit declaration of function 'gpio_mode_setup' [-Wimplicit-function-declaration]
gpio_mode_setup(PORT_LED, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, PIN_LED);
^
../Source/main.c:38:28: error: 'GPIO_MODE_OUTPUT' undeclared (first use in this function)
gpio_mode_setup(PORT_LED, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, PIN_LED);
^
../Source/main.c:38:28: note: each undeclared identifier is reported only once for each function it appears in
../Source/main.c:38:46: error: 'GPIO_PUPD_NONE' undeclared (first use in this function)
gpio_mode_setup(PORT_LED, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, PIN_LED);
^
make: *** [Source/main.o] Fehler 1
19:43:57 Build Finished (took 567ms)
I am pretty sure its a stupid mistake, but I cant find it by my own and hope you can give me a hint.
Thank you very much.
The libopencm3 library interfaces for the mentioned architectures are different.
For the f1 the function is gpio_set_mode and not gpio_mode_setup. Also the defines are slightly different.

undefined reference to get_driver_instance - on ubuntu - debian is ok

I am using c++ mysql connector and when I am compiling on ubnutu 14.04 64bit (g++ 4.8.4), the following error occur:
....so: undefined reference to `get_driver_instance'
however if I try to compile it on Debian 8 64bit (g++ 4.8.4) it compile without any error...
also if I compile it on ubuntu, but with g++ 5.1 it has no errors...
The command which I run:
g++-4.9 -std=c++11 -lmysqlcppconn server.cpp -I ./websocketpp/ -L mysql-connector-c++/lib -lboost_system -lbeanstalkpp -lboost_chrono -I rapidjson/include/
EDIT:
the output of compiler with error (using -v switch)
g++ -v -std=c++11 server.cpp -I mysql-connector-c++/include/cppconn/ -I ./websocketpp/ -L mysql-connector-c++/lib -lboost_system -lmysqlcppconn -lbeanstalkpp -lboost_chrono -I rapidjson/include/ -lpthread
[1] 4364
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-I' 'mysql-connector-c++/include/cppconn/' '-I' './websocketpp/' '-Lmysql-connector-c++/lib' '-I' 'rapidjson/include/' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -quiet -v -I mysql-connector-c++/include/cppconn/ -I ./websocketpp/ -I rapidjson/include/ -imultiarch x86_64-linux-gnu -D_GNU_SOURCE server.cpp -quiet -dumpbase server.cpp -mtune=generic -march=x86-64 -auxbase server -std=c++11 -version -fstack-protector -Wformat -Wformat-security -o /tmp/cc8ZjcCL.s
GNU C++ (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version 3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.8"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
mysql-connector-c++/include/cppconn/
./websocketpp/
rapidjson/include/
/usr/include/c++/4.8
/usr/include/x86_64-linux-gnu/c++/4.8
/usr/include/c++/4.8/backward
/usr/lib/gcc/x86_64-linux-gnu/4.8/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++ (Ubuntu 4.8.4-2ubuntu1~14.04) version 4.8.4 (x86_64-linux-gnu)
compiled by GNU C version 4.8.4, GMP version 5.1.3, MPFR version 3.1.2-p3, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9cb21c615435621dce26fe5e793192fd
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-I' 'mysql-connector-c++/include/cppconn/' '-I' './websocketpp/' '-Lmysql-connector-c++/lib' '-I' 'rapidjson/include/' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
as -v -I mysql-connector-c++/include/cppconn/ -I ./websocketpp/ -I rapidjson/include/ --64 -o /tmp/cczJ3S6r.o /tmp/cc8ZjcCL.s
GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.24
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-I' 'mysql-connector-c++/include/cppconn/' '-I' './websocketpp/' '-Lmysql-connector-c++/lib' '-I' 'rapidjson/include/' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o -Lmysql-connector-c++/lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8 -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. /tmp/cczJ3S6r.o -lboost_system -lmysqlcppconn -lbeanstalkpp -lboost_chrono -lpthread -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.8/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crtn.o
//usr/local/lib/libbeanstalkpp.so: undefined reference to `get_driver_instance'
collect2: error: ld returned 1 exit status
[1]+ Exit 1 g++ -v -std=c++11 server.cpp -I mysql-connector-c++/include/cppconn/ -I ./websocketpp/ -L mysql-connector-c++/lib -lboost_system -lmysqlcppconn -lbeanstalkpp -lboost_chrono -I rapidjson/include/ -lpthread

Can't link BOTAN library with eclipse

I have installed and built the BOTAN cryptographic library.
Everything seems correctly installed, since I have the following entries in /usr/local/lib directory:
-rw-r--r-- 1 root root 7676350 2012-06-03 11:01 libbotan-1.10.a
lrwxrwxrwx 1 root root 20 2012-06-03 11:01 libbotan-1.10.so -> libbotan-1.10.so.0.1
lrwxrwxrwx 1 root root 20 2012-06-03 11:01 libbotan-1.10.so.0 -> libbotan-1.10.so.0.1
-rwxr-xr-x 1 root root 3396354 2012-06-03 11:01 libbotan-1.10.so.0.1
and in the /usr/local/include one too:
drwxr-xr-x 3 root root 4096 2012-06-03 11:01 botan-1.10
And eventually I managed to include the libraries in the main of my program, and write code without error.
However when building my project (on Eclipse Indigo) I get the following output on console, with the red stderr fashion:
error while loading shared libraries: libbotan-1.10.so.0: cannot open shared object file: No such file or directory
The code I'm trying to execute is the following:
try
{
cout << "In try" << endl;
Botan::LibraryInitializer init;
}catch(std::exception& e)
{
cout << "In catch" << endl;
cerr << e.what() << endl;
}
I have the following doubts:
Is it a problem of the Linker? (And if yes, why isn't the linker throwing the error, but the stderr?)
If not, how can I figure out to let my program find the libbotan-1.10.so.0 file which is actually there? (in /usr/local/lib).
Note that my environment variable $LD_LIBRARY_PATH is currently set, and has the following value:
$> echo $LD_LIBRARY_PATH
$> /usr/local/lib/
Compiler Command Line:
Invoking: GCC C++ Compiler
g++ -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -O3 -g3 -Wall -c -fmessage-length=0 -std=c++0x -v -MMD -MP -MF"mainOobClient.d" -MT"mainOobClient.d" -o "mainOobClient.o" "../mainOobClient.cpp"
g++ -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -O3 -g3 -Wall -c -fmessage-length=0 -std=c++0x -v -MMD -MP -MF"oobClientClass.d" -MT"oobClientClass.d" -o "oobClientClass.o" "../oobClientClass.cpp"
Invoking: GCC C++ Linker
g++ -L/usr/local/lib -o "MTVS_oobClient" ./mainOobClient.o ./oobClientClass.o -lbotan-1.10
Complete Build Output:
Build of configuration Debug for project MTVS_oobClient
make all
Building file: ../mainOobClient.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -O3 -g3 -Wall -c -fmessage-length=0 -std=c++0x -v -MMD -MP -MF"mainOobClient.d" -MT"mainOobClient.d" -o "mainOobClient.o" "../mainOobClient.cpp"
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
Finished building: ../mainOobClient.cpp
Building file: ../oobClientClass.cpp
Invoking: GCC C++ Compiler
g++ -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -O3 -g3 -Wall -c -fmessage-length=0 -std=c++0x -v -MMD -MP -MF"oobClientClass.d" -MT"oobClientClass.d" -o "oobClientClass.o" "../oobClientClass.cpp"
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFmainOobClient.d' '-MTmainOobClient.d' '-o' 'mainOobClient.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/cc1plus -quiet -v -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -MMD mainOobClient.d -MFmainOobClient.d -MP -MTmainOobClient.d -MQ mainOobClient.o -dD -D_GNU_SOURCE ../mainOobClient.cpp -D_FORTIFY_SOURCE=2 -quiet -dumpbase mainOobClient.cpp -mtune=generic -march=i686 -auxbase-strip mainOobClient.o -g3 -O3 -Wall -std=c++0x -version -fmessage-length=0 -fstack-protector -o /tmp/ccLIYQkV.s
Finished building: ../oobClientClass.cpp
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
Building target: MTVS_oobClient
Invoking: GCC C++ Linker
g++ ./mainOobClient.o ./oobClientClass.o -lbotan-1.10 -L/usr/local/lib -o "MTVS_oobClient"
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/i386-linux-gnu"
ignoring nonexistent directory "/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../../../i686-linux-gnu/include"
ignoring duplicate directory "/usr/include/c++/4.5.2"
as it is a non-system directory that duplicates a system directory
Finished building target: MTVS_oobClient
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/botan-1.10
/usr/include/c++/4.5
/usr/include/c++/4.5/i686-linux-gnu
/usr/include/c++/4.5/backward
/usr/local/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed
/usr/include/i386-linux-gnu
/usr/include
End of search list.
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0c5cb630517b5952f4898dfa56d7e8e5
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFmainOobClient.d' '-MTmainOobClient.d' '-o' 'mainOobClient.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
as -V -Qy --32 -o mainOobClient.o /tmp/ccLIYQkV.s
GNU assembler version 2.21.0 (i686-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.21.0.20110327
COMPILER_PATH=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/
LIBRARY_PATH=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../:/lib/:/usr/lib/:/usr/lib/i386-linux-gnu/
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFmainOobClient.d' '-MTmainOobClient.d' '-o' 'mainOobClient.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFoobClientClass.d' '-MToobClientClass.d' '-o' 'oobClientClass.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/cc1plus -quiet -v -I/usr/include/c++/4.5.2 -I/usr/local/include/botan-1.10 -MMD oobClientClass.d -MFoobClientClass.d -MP -MToobClientClass.d -MQ oobClientClass.o -dD -D_GNU_SOURCE ../oobClientClass.cpp -D_FORTIFY_SOURCE=2 -quiet -dumpbase oobClientClass.cpp -mtune=generic -march=i686 -auxbase-strip oobClientClass.o -g3 -O3 -Wall -std=c++0x -version -fmessage-length=0 -fstack-protector -o /tmp/ccTuqeWw.s
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/i386-linux-gnu"
ignoring nonexistent directory "/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../../../i686-linux-gnu/include"
ignoring duplicate directory "/usr/include/c++/4.5.2"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/botan-1.10
/usr/include/c++/4.5
/usr/include/c++/4.5/i686-linux-gnu
/usr/include/c++/4.5/backward
/usr/local/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed
/usr/include/i386-linux-gnu
/usr/include
End of search list.
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0c5cb630517b5952f4898dfa56d7e8e5
../oobClientClass.cpp: In member function ‘void oobClientClass::authenticateTransaction()’:
../oobClientClass.cpp:126:29: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result
../oobClientClass.cpp:164:63: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result
../oobClientClass.cpp:59:6: warning: ‘confirmationChoice’ may be used uninitialized in this function
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFoobClientClass.d' '-MToobClientClass.d' '-o' 'oobClientClass.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
as -V -Qy --32 -o oobClientClass.o /tmp/ccTuqeWw.s
GNU assembler version 2.21.0 (i686-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.21.0.20110327
COMPILER_PATH=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/
LIBRARY_PATH=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/:/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../:/lib/:/usr/lib/:/usr/lib/i386-linux-gnu/
COLLECT_GCC_OPTIONS='-I/usr/include/c++/4.5.2' '-I/usr/local/include/botan-1.10' '-O3' '-g3' '-Wall' '-c' '-fmessage-length=0' '-std=c++0x' '-v' '-MMD' '-MP' '-MFoobClientClass.d' '-MToobClientClass.d' '-o' 'oobClientClass.o' '-shared-libgcc' '-mtune=generic' '-march=i686'
**** Build Finished ****
The error is coming at run-time. You need to specify the rpath for the binary at build time - Where you have the:
-L/usr/local/lib
You also need:
-Wl,-rpath=/usr/local/lib
This instructs ld to use this path when trying to find the library at run-time. Your LD_LIBRARY_PATH is probably being overridden by the launcher of eclipse, which is why the variable is not being used.
Alternatives:
Make sure that /usr/local/lib is in the /etc/ld.so.conf, and that ldconfig has been run after installing the library.
Link to the .a, using the command line:
g++ -o "MTVS_oobClient" ./mainOobClient.o ./oobClientClass.o -L/usr/local/lib -Wl,-Bstatic -lbotan-1.10 -Wl,-Bdynamic
or using:
g++ -o "MTVS_oobClient" ./mainOobClient.o ./oobClientClass.o /usr/local/lib/libbotan-1.10.a
... both should have the same effect
Since the program build ends correctly, it is clear that it's a run-time problem due to the fact that the program can't find the Shared Library.
I looked for other people with same run-time issue and found out the solution (that I'll briefly sum up) thanks to another SO question.
What I did was to build the dynamically-linked executable, that wishes to be linked against libbotan-1.10.so.0 at execution time. The linking during the build phase was done with command line option -L/usr/local/lib.
There are a few options to make botan (or any other library) available at run-time:
Create a symlink to botan in a directory listed in /etc/ld.so.conf (or /lib or /usr/lib)
Copy botan to a directory listed in /etc/ld.so.conf (or /lib or /usr/lib) (defaults)
Add the directory containing botan to /etc/ld.so.conf
Set LD_LIBRARY_PATH=/usr/local/lib before running your executable.
Recompile the program statically. (It will work, but don't bother.)
After any of the first 3, rerun ldconfig so the linker cache is updated. (You can then run ldconfig -v to verify it's resolvable.)
Note those aren't steps, they're options. You only need to do 1 of them.
Updating the linker cache with ldconfig made it work for me.