Programs built using buildroot g++ complier for MIPS32 platformresults in segmentation fault
Jayashree Krishnaswamy
jkrishnaswamy at merunetworks.com
Thu Dec 15 05:50:58 UTC 2005
Hi Garrett,
Thanks for your reply.
I tried a crude approach of removing valarray.cpp and building uClibc++. I was able to build the library
successfully.
But, the segmentation fault still exists.
Here is a gdb trace when the program crashed.
# ./gdb new
dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "mips-linux-uclibc"...
(gdb) r
Starting program: /root/new
Program received signal SIGSEGV, Segmentation fault.
0x00448620 in basic_filebuf (this=0x1000e690) at streambuf:584
584 streambuf: No such file or directory.
in streambuf
(gdb) bt
#0 0x00448620 in basic_filebuf (this=0x1000e690) at streambuf:584
#1 0x0044799c in stdio_filebuf (this=0x1000e690, __f=0x10006560, __mode=16,
__size=0) at stdio_filebuf.h:147
#2 0x00400858 in std::ios_base::Init::_S_ios_create (__sync=144) at new:92
#3 0x00400ee4 in Init (this=0x1000e690)
at /home/jkrishnaswamy/meru-depot/meru/devel/odmap/src/jaya/mips_uclibc_broot_pkg/buildroot/toolchain_build_mips/gcc-3.3.5/libstdc++-v3/src/ios.cc:228
#4 0x004545d4 in __static_initialization_and_destruction_0 (
__initialize_p=1, __priority=65535) at iostream:77
#5 0x0045465c in global constructors keyed to _ZThn8_NSdD0Ev_home_jkrishnaswamy_meru_depot_meru_devel_odmap_src_jaya_mips_uclibc_broot_pkg_buildroot_toolchain_build_mips_gcc_3.3.5_libstdc___v3_src_io_inst.ccuLF2J7 ()
at locale_facets.h:210
#6 0x0046344c in __do_global_ctors_aux ()
#7 0x00400120 in _init ()
Previous frame inner to this frame (corrupt stack?)
(gdb) q
The program is running. Exit anyway? (y or n) y
#
#
Thanks,
Jayashree
-----Original Message-----
From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org]On
Behalf Of Garrett Kajmowicz
Sent: Thursday, December 15, 2005 10:35 AM
To: uclibc at uclibc.org
Subject: Re: Programs built using buildroot g++ complier for MIPS32
platformresults in segmentation fault
On December 14, 2005 11:03 pm, Jayashree Krishnaswamy wrote:
> Hi,
> 1) I downloaded buildroot snapshot from uclibc.org.
> Was able to successfully build g++/gcc 3.3.5 cross compiler for MIPS32
> target running linux 2.4.25. I wrote a small program cout << "Hello World"
> and tried to build it using g++ compiler. The build was successful, but the
> program crashed on the MIPS target with segmentation fault.
I'm glad to hear that you were able to get the library installed. However,
I'm nervous about segfaults on your flatform.
> 2) I also downloaded uClibc++-0.1.12.tbz2 as it had support for MIPS
> platform. I followed the instructions in INSTALL document to build
> uClibc++. I was unable to build uClibc++ , found compile errors as
> mentioned below:-
<snip>
What I find interesting is that all of the functions that you are building
against with which you are having problems use double. All of the undefined
functions should be part of the C or POSIX spec. Is it possible that they
are unimplemented on your platform? The include of math.h by <cmath> should
provide the required functionality.
The implementation of <cmath> is largely a copy of the GNU cmath header as it
deals with glibc specific issues. Perhaps I'll rewrite that myself, but I
doubt that will help much. The functions which are being complained about
are supposed to be exported by the C library (as opposed to the float
wrappers for double data types).
Can somebody else on the list answer if uClibc support full double precision
math on MIPS?
Unfortunately, I do not personally have the facilities with which to test
uClibc++ on MIPS - I only have a x86 machine. Somebody once tested it and
told me that it worked, so I've listed it in the arch list for testing
purposes.
- Garrett
_______________________________________________
uClibc mailing list
uClibc at uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc
More information about the uClibc
mailing list