| Summary: | app-misc/tmux-1.7 segfaults when entering copy mode | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Ivan Iraci <ivanhoe> |
| Component: | Current packages | Assignee: | Alex Alexander (RETIRED) <wired> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | shell-tools |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Ivan Iraci
2012-10-16 09:36:10 UTC
ok, we need a full backtrace. please do:
1)FEATURES="nostrip" CFLAGS="-g3" CXXFLAGS="${CFLAGS}" emerge tmux
2)gdb /usr/bin/tmux
3)run (to start it)
4)bt after segfaults.
$ gdb /usr/bin/tmux GNU gdb (Gentoo 7.5 p1) 7.5 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/tmux...done. (gdb) run Starting program: /usr/bin/tmux warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". protocol version mismatch (client 7, server 6) [Inferior 1 (process 23674) exited with code 01] (gdb) No, wait, there was a tmux-1.6 session running. Running tmux-1.7 in gdb inhibits the segfault. $ gdb /usr/bin/tmux GNU gdb (Gentoo 7.5 p1) 7.5 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /usr/bin/tmux...done. (gdb) run Starting program: /usr/bin/tmux warning: Could not load shared library symbols for linux-vdso.so.1. Do you need "set solib-search-path" or "set sysroot"? [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [exited] [Inferior 1 (process 12240) exited normally] (gdb) No, it's not gdb.
tmux-1.7 works perfectly if built with:
FEATURES="nostrip" CFLAGS="-g3" CXXFLAGS="${CFLAGS}" emerge tmux
That's what I have in make.conf:
CFLAGS="-Os -mtune=core2 -march=core2 -pipe -D__STDC_CONSTANT_MACROS"
CXXFLAGS="${CFLAGS}"
Any other software, tmux-1.6 included, works fine with this CFLAGS.
The -Os flag is the problem it seems. Until this gets fixed upstream or in the official ebuild, two solutions are:
1. Modify the ebuild, adding
inherit flag-o-matic
to the top of the file and inserting
replace-flags -Os -O2
into src_prepare()
2. Create a file /etc/portage/env/app-misc/tmux-1.7 containing
CFLAGS=`echo "${CFLAGS}" | sed 's/-Os/-O2/'`
fixed in 1.7-r2, cheers :) |