This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Installing gcc-arm on OpenSUSE

Is it just me or are the install instructions for gcc-arm missing some information? I've downloaded gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2 and uncompressed it. The readme file in there states that all you have to do is add the bin directory to the $PATH. What could be easier? And yes that is easy. The problem with that is that whilst you can find the executable arm-none-eabi-gcc, as it's now in the PATH, the compiler can't find anything it needs to actually work. I can't think of a good analogy at the moment. :-(

So maybe this is the wrong forum for this question. Perhaps it's not even supported, but just in case it is, or somebody in here knows anything about it what are the "real" install instructions. Say for example you had a file containing the text:

#include <stdio.h>

void main(void)

{

}

How would you get that to compile? Actually lets make it even simpler and remove the include file, the linker will probably fall over if you ever got that far.

I usually use other processors but the 1Bitsy kickstarter was an easy in to ARM which I've always meant to have a look at. So that dev board is using an ARM Cortex-M4F so maybe we could try compile with "arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 main.c"

as: unrecognized option '-mcpu=cortex-m4'

Oops the tool chain is executing the wrong executable. Install instructions Fail! :-(

For the laugh lets try clone and make libopencm3 Oops can't find include files yet another fail :-(

It's just not my day.

Parents
  • Thanks for the '-v' option that shed a bit of light on my problem. When I executed that I got a bit of a mess:

    $ arm-none-eabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=arm-none-eabi-gcc
    COLLECT_LTO_WRAPPER=/usr/lib64/gcc/arm-suse-linux-gnueabi/6/lto-wrapper
    Target: arm-suse-linux-gnueabi
    Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++ --enable-checking=release --with-gxx-include-dir=/usr/include/c++/6 --enable-ssp --disable-libssp --disable-libvtv --disable-libmpx --disable-libcc1 --disable-plugin --with-bugurl=
    http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --with-default-libstdcxx-abi=gcc4-compatible --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-6 --program-prefix=arm-suse-linux-gnueabi- --target=arm-suse-linux-gnueabi --disable-nls --with-sysroot=/usr/arm-suse-linux-gnueabi --with-build-sysroot=/ --with-build-time-tools=/usr/arm-suse-linux-gnueabi/bin --with-arch=armv6zk --with-tune=arm1176jzf-s --with-float=hard --with-abi=aapcs-linux --with-fpu=vfp --disable-sjlj-exceptions --build=x86_64-suse-linux --host=x86_64-suse-linux
    Thread model: posix
    gcc version 6.2.1 20160826 [gcc-6-branch revision 239773] (SUSE Linux)

    That is outputting a lot of "arm-suse-linux-gnueabi" which led me to look at what I've got installed from the suse package manager. I had "cross-arm-gcc6" installed which for some reason is confusing things, so I removed that package. Then tried again with the "-v" option, which gave:

    $ arm-none-eabi-gcc -v
    bash: /usr/bin/arm-none-eabi-gcc: No such file or directory

    That's a strange output given that the executable is in the path:

    $ which arm-none-eabi-gcc
    /home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc

    so I'll try the '-v' with the executable explicitly defined:

    $ /home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=/home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc
    COLLECT_LTO_WRAPPER=/home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/lto-wrapper
    Target: arm-none-eabi
    Configured with: /tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native --libexecdir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/lib --infodir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --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-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/arm-none-eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-gmp=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors 6-2017-q1-update' --with-multilib-list=rmprofile
    Thread model: single
    gcc version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (GNU Tools for ARM Embedded Processors 6-2017-q1-update)

    That looks better but it's funny that I have to explicitly define the location of the executable that's never going to work with a Makefile. I'll keep banging at it. As you say it should be as simple as adding it to the PATH. Maybe I'll reboot this machine and add it into bashrc

Reply
  • Thanks for the '-v' option that shed a bit of light on my problem. When I executed that I got a bit of a mess:

    $ arm-none-eabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=arm-none-eabi-gcc
    COLLECT_LTO_WRAPPER=/usr/lib64/gcc/arm-suse-linux-gnueabi/6/lto-wrapper
    Target: arm-suse-linux-gnueabi
    Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++ --enable-checking=release --with-gxx-include-dir=/usr/include/c++/6 --enable-ssp --disable-libssp --disable-libvtv --disable-libmpx --disable-libcc1 --disable-plugin --with-bugurl=
    http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --with-default-libstdcxx-abi=gcc4-compatible --enable-version-specific-runtime-libs --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-6 --program-prefix=arm-suse-linux-gnueabi- --target=arm-suse-linux-gnueabi --disable-nls --with-sysroot=/usr/arm-suse-linux-gnueabi --with-build-sysroot=/ --with-build-time-tools=/usr/arm-suse-linux-gnueabi/bin --with-arch=armv6zk --with-tune=arm1176jzf-s --with-float=hard --with-abi=aapcs-linux --with-fpu=vfp --disable-sjlj-exceptions --build=x86_64-suse-linux --host=x86_64-suse-linux
    Thread model: posix
    gcc version 6.2.1 20160826 [gcc-6-branch revision 239773] (SUSE Linux)

    That is outputting a lot of "arm-suse-linux-gnueabi" which led me to look at what I've got installed from the suse package manager. I had "cross-arm-gcc6" installed which for some reason is confusing things, so I removed that package. Then tried again with the "-v" option, which gave:

    $ arm-none-eabi-gcc -v
    bash: /usr/bin/arm-none-eabi-gcc: No such file or directory

    That's a strange output given that the executable is in the path:

    $ which arm-none-eabi-gcc
    /home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc

    so I'll try the '-v' with the executable explicitly defined:

    $ /home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc -v
    Using built-in specs.
    COLLECT_GCC=/home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/arm-none-eabi-gcc
    COLLECT_LTO_WRAPPER=/home/john/Install/gcc-arm/gcc-arm-none-eabi-6-2017-q1-update/bin/../lib/gcc/arm-none-eabi/6.3.1/lto-wrapper
    Target: arm-none-eabi
    Configured with: /tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/src/gcc/configure --target=arm-none-eabi --prefix=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native --libexecdir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/lib --infodir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --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-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/install-native/arm-none-eabi --build=x86_64-linux-gnu --host=x86_64-linux-gnu --with-gmp=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-mpfr=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-mpc=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-isl=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-libelf=/tmp/jenkins-GCC-6-buildandreg-104_20170216_1487268972/build-native/host-libs/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors 6-2017-q1-update' --with-multilib-list=rmprofile
    Thread model: single
    gcc version 6.3.1 20170215 (release) [ARM/embedded-6-branch revision 245512] (GNU Tools for ARM Embedded Processors 6-2017-q1-update)

    That looks better but it's funny that I have to explicitly define the location of the executable that's never going to work with a Makefile. I'll keep banging at it. As you say it should be as simple as adding it to the PATH. Maybe I'll reboot this machine and add it into bashrc

Children