[riot-users] Segmentation fault on example

Janos Kutscherauer janos.kutscherauer at fu-berlin.de
Mon Feb 17 19:08:57 CET 2014


Hi Ludwig,

i am having the same problem as reported below by Victor.

I did:
$ git clone https://github.com/RIOT-OS/RIOT.git
$ cd RIOT/examples/hello-world
$ make -B clean all
$ make term
/home/***/RIOT/examples/hello-world/bin/native/hello-world.elf
make: *** [term] Segmentation fault (core dumped)

A couple of weeks ago (before the announcement of release 2014.01), i 
already had a go on RIOT, and i am pretty sure - yet without proof! - 
that i was able to run the hello world example on the native build. Now 
i did a git clone again.

My system is:
- Ubuntu 12.04.4 LTS, x86/32bit
- As cross compiler i use the binaries from 
https://launchpad.net/gcc-arm-embedded, version gcc-arm-none-eabi-4_8-2013q4

For the versions i'm not so sure, so i try to give some hints:

GCC-Version:
$ cd
  ./gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20131129 
(release) [ARM/embedded-4_8-branch revision 205641]
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

For the libc, i really don't know(, also not much about it!). When i run 
as proposed in 
http://stackoverflow.com/questions/9705660/check-glibc-version-for-a-particular-gcc-compiler 
to find out the version,
$ gcc glibc-version.c -o glibc-version
$ ./glibc-version
GNU libc version: 2.15

But, compiling it with the cross-compiler (above), doesn't work
$ ~/gcc-arm-none-eabi-4_8-2013q4/arm-none-eabi/bin/gcc glibc-version.c 
-o glibc-version
gcc: error trying to exec 'cc1': execvp: No such file or directory

and also
$ ~/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc glibc-version.c 
-o glibc-version
glibc-version.c:3:30: fatal error: gnu/libc-version.h: No such file or 
directory
  #include <gnu/libc-version.h>
                               ^
compilation terminated.

Looks like either
- i don't have libc ready for cross-compiling...?
- Don't know how to use my cross-compiler...


Do you have any suggestions?

Thanks,
Janos





On 02/13/2014 03:53 PM, Ludwig Ortmann wrote:
> Hi Victor,
>
> which versions of gcc, libc and Linux are you using, and on which
> architecture are you running it?
>
> With current master I don't have any trouble with:
>      cd examples/hello-world
>      make -B clean all
>      make term
>
> Cheers, Ludwig
>
> On Thu, Feb 13, 2014 at 06:42:49AM -0800, Victor Pangaldus wrote:
>> Hi all,
>>
>>
>> I recently found RIOT OS and decide to give it a try. However, I got segmentation fault when I tried to run the example. Here is the step I take:
>> * clone the RIOT source
>>    git clone https://github.com/RIOT-OS/RIOT.git
>> * compile the example for linux machine (I already have the GCC toolchains installed)
>>    cd examples/hello-world
>>   make
>> * run theexample (the .elf file)
>>
>>   ./bin/native/hello-world.elf
>>   Segmentation fault
>> I also tried other example (default) without luck. Is there
>> something that I miss? I have not changed anything on the makefile,
>> and I check that the BOARD is native, which is the correct target
>> (according to the RIOT wiki)  if I want to run it on linux machine.
>>
>>
>> Thanks.
>> Regards,
>> _______________________________________________
>> users mailing list
>> users at riot-os.org
>> http://lists.riot-os.org/mailman/listinfo/users
> _______________________________________________
> users mailing list
> users at riot-os.org
> http://lists.riot-os.org/mailman/listinfo/users



More information about the users mailing list