[riot-users] Segmentation fault on example

Victor Pangaldus fong_wen_long at yahoo.com
Tue Feb 18 16:33:54 CET 2014


Hi Ludwig,

I am going to take your suggestion to use newer distro since I have no problem with that yet.

in case you are still interested, below are some info related to your last email:
* I have no CFLAGS set on my environment.
* output of ldd bin/native/*elf is:
        linux-gate.so.1 =>  (0xf7716000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76e7000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf76de000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7533000)
        /lib/ld-linux.so.2 (0xf7717000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7518000)
* I added the "CFLAGS=-g make -B clean all"on themakefile, rebuild it and run it on gdb. Here is the output of bt full:
     (gdb) bt full
    #0  0x00000000 in ?? ()
    No symbol table info available.
    #1  0x0804a970 in calloc ()
    No symbol table info available.
    #2  0x555a23ae in ?? () from /lib/i386-linux-gnu/libdl.so.2
    No symbol table info available.
    #3  0x555a1de4 in dlsym () from /lib/i386-linux-gnu/libdl.so.2
    No symbol table info available.
    #4  0x0804917b in startup ()
    No symbol table info available.
    #5  0x0804b962 in __libc_csu_init ()
    No symbol table info available.
    #6  0x555c946a in __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
    No symbol table info available.
    #7  0x08048ca1 in _start ()
    No symbol table info available.

Thanks.
Regards,





On Monday, 17 February 2014 8:00 PM, Janos Kutscherauer <janos.kutscherauer at fu-berlin.de> wrote:
 
One more info:
my native GCC version is
$gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3

Cheers
Janos



On 02/17/2014 07:08 PM, Janos Kutscherauer wrote:
> 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
>
> _______________________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20140218/31c77c46/attachment.html>


More information about the users mailing list