Andreas Aardal Hanssen wrote:
Could you try this with gdb?
gdb bincimap-up
then on the command prompt:
run --version
when/if it crashes, go "bt" and post the output back to this list. You will probably have to compile Binc IMAP with debug info (-g) for this to
be most useful. That is - unstripped binaries.
Here is the output of the current binary:
# gdb bincimap-up
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...(no debugging symbols found)...Using host libth
read_db library "/lib/libthread_db.so.1".
(gdb) run --version
Starting program: /usr/bin/bincimap-up --version
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0804ed41 in std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::operat
or+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char, st
d::char_traits<char>, std::allocator<char> > const&) ()
(gdb) bt
#0 0x0804ed41 in std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::op
erator+<char, std::char_traits<char>, std::allocator<char> >(char const*, std::basic_string<char
, std::char_traits<char>, std::allocator<char> > const&) ()
Cannot access memory at address 0x8
(gdb)
FYI, here is the CCXXFLAGS that I use for all my compilation;
CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer -ftracer -fno-crossjumping -falign-functions=16 -falign-loops=16 -falign-jumps=16 -fno-align-labels -mfpmath=sse,387 -maccumulate-outgoing-args -fmove-all-movables -freduce-all-givs -fnew-ra"
CXXFLAGS="${CFLAGS}"
I've been told it's the best optimization flags.
I tried it with following option, however emerge seems to strip automatically and I don't know how to prohibit that:
# CXXFLAGS="-march=athlon-xp -g" emerge /usr/portage/net-mail/bincimap/bincimap-1.2.7_beta5.ebuild
:::
strip:
strip:
usr/bin/bincimapd
usr/bin/bincimap-up
:::
:::
So I don't see debugging symbols /w gdb but --version works:
# gdb bincimap-up
GNU gdb 6.0
Copyright 2003 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 "i686-pc-linux-gnu"...(no debugging symbols found)...Using host libth
read_db library "/lib/libthread_db.so.1".
(gdb) run --version
Starting program: /usr/bin/bincimap-up --version
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...Binc IMAP v1.2.7beta5
Program exited with code 0157. (gdb)
Also I was able to go through "3) Listing" on http://www.bincimap.org/bincimap-faq.html#q18
# When I try to create mailbox it gave me;
3 CREATE mailbox
3 NO CREATE failed: invalid mailbox name
So I guess this implies that my cxxflag is the culprit. What flags would have caused this? Since I have little memory (256M) and limited computing power (Athlon XP 1.5GHz), I still would like it to be optimized as possible. Thanks.
Seiji T.
