You are not logged in.

#1 2009-01-31 16:45:27

G_Syme
Member
Registered: 2007-01-04
Posts: 83

[Solved] rednotebook segmentation fault

I'm the maintainer of rednotebook in AUR and am trying to upgrade it from version branch 4.x to 5.x.
The author has changed the interface from wypython to pygtk and now also uses gtkhtml and gtkmozembed.

pkgname=rednotebook
pkgver=0.5.3
pkgrel=1
pkgdesc="A simple desktop diary"
arch=('i686' 'x86_64')
url="http://rednotebook.sourceforge.net"
license=('GPL')
#depends=('wxpython>=2.8.8.1' 'python-yaml')     # deps of the old 4.x branch.
depends=('gnome-python-extras' 'pygtk' 'python-yaml' 'libgtkhtml')    # deps of the new 5.x branch.
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz)
md5sums=('4421d2b72eda7fa287558b513dc825cf')

build() {
  cd "$srcdir"/$pkgname-$pkgver
  python setup.py install --root="$pkgdir" --prefix=/usr || return 1
}

The package builds successfully, but the program exits with a segmentation fault on startup:

$ rednotebook
AppDir: /usr/lib/python2.6/site-packages/rednotebook
BaseDir: /usr/lib/python2.6/site-packages
zsh: segmentation fault  rednotebook

The author has listed the following requirements in the README:
  - Python (2.5) (www.python.org)
  - PyYaml (3.05) (www.yaml.org)
  - pyGTK (2.13) (www.pygtk.org)
  - python-gtkhtml2 (2.19.1)
  - python-gtkmozembed

and the required packages on a debian-based distro:
  - python-yaml
  - python-gtk2
  - python-gtkhtml2
  - python-gnome2-extras

There are no packages like python-gtkhtml2 and python-gtkmozembed in the Arch repos, but their content seems to be included in the gnome-python-extras package:

pacman -Ql gnome-python-extras| egrep "(gtkhtml|gtkmozembed)"
gnome-python-extras /usr/lib/python2.6/site-packages/gtk-2.0/gtkhtml2.so
gnome-python-extras /usr/lib/python2.6/site-packages/gtk-2.0/gtkmozembed.so
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/class-gtkmozembed.html
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/gtkmozembed-class-reference.html
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/index.html
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/index.sgml
gnome-python-extras /usr/share/gtk-doc/html/pygtkmozembed/pygtkmozembed.devhelp
gnome-python-extras /usr/share/pygtk/2.0/defs/gtkhtml2.defs
gnome-python-extras /usr/share/pygtk/2.0/defs/gtkmozembed.defs

My system is up-to-date, but AFAICT I still suspect a python-binding to be broken or something like that.

There are still 3 packages which are build against python 2.5, namely libxslt, musicbrainz and tunepimp, but after a temporal removal via pacman -Rd, the error message of rednotebook is still the same, so those packages don't seem to be the problem.

Any idea how to procede?

Last edited by G_Syme (2009-02-03 10:49:29)


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#2 2009-01-31 16:59:44

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: [Solved] rednotebook segmentation fault

here is the code that creates segfault:

print 'AppDir:', filesystem.appDir
baseDir = os.path.abspath(os.path.join(filesystem.appDir, '../'))
print 'BaseDir:', baseDir
if baseDir not in sys.path:
    print 'Adding BaseDir to sys.path'
    sys.path.insert(0, baseDir)

zsh: segmentation fault  rednotebook

There is something wrong with the linking. Can you compile with -lm option? I will try compiling your PKGBUILD and see if I get segfault.

Results:

AppDir: /usr/lib/python2.6/site-packages/rednotebook
BaseDir: /usr/lib/python2.6/site-packages
Segmentation fault

tracing down source of error:

 python -m trace -t redNotebook.py > output.txt

Last edited by ahcaliskan (2009-01-31 17:44:17)

Offline

#3 2009-01-31 18:05:29

ahcaliskan
Member
From: Sweden
Registered: 2008-10-29
Posts: 174

Re: [Solved] rednotebook segmentation fault

gnome-python-extras /usr/lib/python2.6/site-packages/gtk-2.0/gtkhtml2.so

I checked out debian package contents for python-gtkhtml2, and gtkhtml2.so is located in both python.2.4 and python.2.5 directory, but is not found in python.2.6 directory. Same with python-gtkmozembed. The only difference is that gtkmozembed.so in arch is 15kb smaller in size.

Python-yaml files are messy, debian have files in /usr/share/pyshared/yaml/(except for /usr/lib/python2.6/site-packages/_yaml.so), while AUR package contents are in /usr/lib/python2.6/site-packages/yaml/(except for _yaml.so).

These files are missing in debian libyaml package.
libyaml /usr/lib/libyaml.a
libyaml /usr/lib/libyaml.la
libyaml /usr/lib/libyaml.so

Debian package control:

Depends: python, python-gtk2, python-yaml, python-gtkhtml2, python-gnome2-extras, python-glade2
Recommends: texlive-latex-base, texlive-latex-recommended

Python-glade2 provide glade.so which is in pygtk package. Maybe python 2.5 could solve the issue.

Last edited by ahcaliskan (2009-01-31 18:39:06)

Offline

#4 2009-01-31 21:53:58

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: [Solved] rednotebook segmentation fault

ahcaliskan wrote:

[...]
Python-yaml files are messy, debian have files in /usr/share/pyshared/yaml/(except for /usr/lib/python2.6/site-packages/_yaml.so), while AUR package contents are in /usr/lib/python2.6/site-packages/yaml/(except for _yaml.so).

These files are missing in debian libyaml package.
libyaml /usr/lib/libyaml.a
libyaml /usr/lib/libyaml.la
libyaml /usr/lib/libyaml.so
[...]

At least the libyaml.la file is not needed, because it is a platform-independent library format which is later converted by libtool to system specific library format, which is *.so in our case. Concerning libyaml.a, I'm not sure if it is needed or not. But as the author of rednotebook even provides debian instructions/packages, I'm pretty confident that rednotebook will run with debian.

IMHO I don't think libyaml or python-yaml are the problem, because the old 4.x branch of rednotebook (which already used python-yaml) still compiles and runs fine on my system.


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

#5 2009-02-03 10:48:58

G_Syme
Member
Registered: 2007-01-04
Posts: 83

Re: [Solved] rednotebook segmentation fault

Problem now solved with rednotebook 5.4 smile

Changelog wrote:

The Fedora gtkmozembed bug has been fixed (LP:320492)


The courageous enter dark caves alone.
The clever send in the courageous first.
The cleverest wait behind the clever.

Offline

Board footer

Powered by FluxBB