[riot-users] Segmentation fault on example

Ludwig Ortmann ludwig.ortmann at fu-berlin.de
Fri Feb 14 17:02:18 CET 2014


Hi Victor,

I don't know what's wrong there.. As the support for your Ubuntu
version is running out shortly I won't look into it.

Maybe you can upgrade your Ubuntu to 13.10, Saucy Salamander. I know
it's working there.

Otherwise I can only do some wild guessing now - maybe there are some
CFLAGS in your environment (env / echo $CFLAGS)?
Does the binary really use the correct libraries (ldd bin/native/*elf)?

You could also rebuild with "CFLAGS=-g make -B clean all" and run in gdb
("make debug", gdb command: "run") and investigate the segfault (gdb
command: "bt full").

Cheers, Ludwig

On Fri, Feb 14, 2014 at 01:03:17AM -0800, Victor Pangaldus wrote:
> Hi Ludwig,
> 
> Output of 
> $ uname -srvmio
> Linux 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 GNU/Linux
> $ gcc --version
> gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
> Copyright (C) 2012 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.
> $ /lib/i386-linux-gnu/libc.so.6
> GNU C Library (Ubuntu EGLIBC 2.15-0ubuntu20.1) stable release version 2.15, by Roland McGrath et al.
> Copyright (C) 2012 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.
> Compiled by GNU CC version 4.6.3 20120918 (prerelease).
> Compiled on a Linux 3.5.7 system on 2013-01-28.
> Available extensions:
>         crypt add-on version 2.1 by Michael Glad and others
>         GNU Libidn by Simon Josefsson
>         Native POSIX Threads Library by Ulrich Drepper et al
>         BIND-8.2.3-T5B
> libc ABIs: UNIQUE IFUNC
> For bug reporting instructions, please see:
> <http://www.debian.org/Bugs/>.
> 
> I also tried again, this time, I use virtual machine running linux, and it works without segmentation fault. 
> 
> Thanks.
> 
> Regards,
> 
> 
> 
> 
> 
> 
> On Thursday, 13 February 2014 3:53 PM, Ludwig Ortmann <ludwig.ortmann at fu-berlin.de> 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


More information about the users mailing list