Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] wide-dhcpv6 crash when built in buildroot version 2014.05 using a cross toolchain arm-buildroot-linux-gnueabihf with gcc version 4.8.3
@ 2015-04-14 18:25 Srinivasan R
  2015-04-14 18:54 ` Gustavo Zacarias
  0 siblings, 1 reply; 3+ messages in thread
From: Srinivasan R @ 2015-04-14 18:25 UTC (permalink / raw)
  To: buildroot

Hi All,
I am using the latest version of buildroot (2014.05) for my project, I happen to port the wide-dhcpv6 package which I had in the previous version(buildroot-2010.05) to the current buildroot version(2014.05).

The wide-dhcpv6 in buildroot version(2014.05) is working good with the toolcahain "arm-none-linux-gnueabi" using the gcc version "4.3.3", when I port this package in to the latest version, initially I got the below build error.
Please note the current version used is "buildroot version 2014.05 using a cross toolchain arm-buildroot-linux-gnueabihf with gcc version 4.8.3"

In file included from dhcp6c.c:75:0:
./common.h:158:13: error: conflicting types for ?dprintf?
extern void dprintf __P((int, const char *, const char *, ...));

I browsed the net and added the line "cd $(WIDE_DHCPV6_DIR); perl -pi -e "s/dprintf/debug_printf/g" *.c *.h *.l;" in my "wide-dhcpv6.mk", with this fix I could able to generate the binary (dhcp6c) successfully.

When I run the binary (dhcp6c) in the board Atmel series, it gives me the segmentation fault.The application crashes even much before the main() function hits.

I used the gdb server to debug it the application, and I found that the "dhcp6c" crashes in the file "lex.yy.c" in the function yy_get_previous_state(). below is the stepping in to the function and crash output.
"(gdb) target remote 192.168.1.53:3646
Remote debugging using 192.168.1.53:3646
yy_get_previous_state () at lex.yy.c:1994
warning: Source file is more recent than executable.
1994 yy_current_state = (yy_start);
(gdb) b main
Breakpoint 1 at 0x8a0c: file dhcp6c.c, line 159.
(gdb) n
1990 {
(gdb)
1996 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
(gdb)
2004 while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
(gdb)
1996 for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
(gdb)
2014 }
(gdb)
yy_get_previous_state () at lex.yy.c:2014
2014 }
Could not insert single-step breakpoint at 0x0
(gdb)
yy_get_previous_state () at lex.yy.c:2014
2014 }
Could not insert single-step breakpoint@0x0
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x00000000 in ?? ()
(gdb) "
Since it crashes in lexical analyzer, I have no clue how to debug this issue, and I strongly have a belief that the problem might be related to toolchain. Also since my project deliveries are nearing I don't have much time to investigate this issue, can anybody help me to resolve this issue. Attached is my make file "wide-dhcpv6.mk" and build output log "wide-dhcpv6-20080615/config.log"

I believe the attached log file and the make file will have all the necessary information about the toolchain used and the configurations/rules used to built the application for your first level diagnostic. if any additional information is required I am could able to provide you very promptly.

Thanks in advance for help.

Regards,
Srini.
 
**********************************************************************
This e-mail is the property of Lantronix. It is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential, or otherwise protected from disclosure. Distribution or copying of this e-mail, or the information contained herein, to anyone other than the intended recipient is prohibited.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wide-dhcpv6.mk
Type: text/x-makefile
Size: 2350 bytes
Desc: wide-dhcpv6.mk
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150414/fb329af3/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 45385 bytes
Desc: config.log
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150414/fb329af3/attachment-0001.bin>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] wide-dhcpv6 crash when built in buildroot version 2014.05 using a cross toolchain arm-buildroot-linux-gnueabihf with gcc version 4.8.3
  2015-04-14 18:25 Srinivasan R
@ 2015-04-14 18:54 ` Gustavo Zacarias
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2015-04-14 18:54 UTC (permalink / raw)
  To: buildroot

On 04/14/2015 03:25 PM, Srinivasan R wrote:

> Hi All,
> I am using the latest version of buildroot (2014.05) for my project, I happen to port the wide-dhcpv6 package which I had in the previous version(buildroot-2010.05) to the current buildroot version(2014.05).

Hi.
Well, the package hasn't been ported to any modern package format, so
debugging an old (very old) package just thrown into a new buildroot
version is generally a no-go since the old style hasn't been accepted or
used for a long time.
Otherwise there are many things that could go wrong.
Also you don't specify the precise target or a defconfig to check.
I suggest you convert the package to a generic one (look at the manual),
try again and see if it still fails.
Alternatively if you're in such a rush you could use dibbler which is a
far more modern/maintained DHCPv6 client/server/relay.
Regards.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] wide-dhcpv6 crash when built in buildroot version 2014.05 using a cross toolchain arm-buildroot-linux-gnueabihf with gcc version 4.8.3
       [not found] <620A1A0EF5A8FD49AAB6076B610B85DD45C35001@LTX-EXCH03.int.lantronix.com>
@ 2015-04-15 12:23 ` Gustavo Zacarias
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2015-04-15 12:23 UTC (permalink / raw)
  To: buildroot

On 04/15/2015 08:27 AM, Srinivasan R wrote:

> Hi Gustavo Zacarias,
>   Thanks for reply,
> Can you please give me any link for the manual that gives the example of newer make file format that buildroot's latest version will accept?
> Meantime, the defconfig I am using is "toro_defconfig".
> 
> Regards,
> Srini.

Hi.
Please keep the list in cc@
There's no such thing as toro_defconfig in vanilla buildroot, so it's
either a fork/customized.
The documents are online, see:
http://www.buildroot.net/downloads/manual/manual.html#generic-package-reference
A quick generic package to use as sample could be eeprog, there are many
others, it depends on the complexity you're facing.
Regards.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-15 12:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <620A1A0EF5A8FD49AAB6076B610B85DD45C35001@LTX-EXCH03.int.lantronix.com>
2015-04-15 12:23 ` [Buildroot] wide-dhcpv6 crash when built in buildroot version 2014.05 using a cross toolchain arm-buildroot-linux-gnueabihf with gcc version 4.8.3 Gustavo Zacarias
2015-04-14 18:25 Srinivasan R
2015-04-14 18:54 ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox