[Gambas-user] Error on installing last svn

ron ronstk at ...239...
Sat Sep 8 23:46:32 CEST 2007


On Saturday 08 September 2007 21:55, Benoit Minisini wrote:
> On samedi 08 septembre 2007, ron wrote:
> > On Saturday 08 September 2007 20:06, Benoit Minisini wrote:
...
> > kde-config --version
> > Qt: 3.3.6
> > KDE: 3.5.5
> > kde-config: 1.0
> >
> > Ron
> >
> 
> The crash occurs inside the ld.so library. But gbi does not use it directly, 
> it relies of the GNU libtool package. So there are three possibilites:
> 1) A bug in ld.so.
> 2) A bug in libtool that makes ld.so crash.
> 3) A bug somewhere else that corrupts the memory and make ld.so crash.
> 
> The ast fix removed the use of libtool on Linux, by using dl*() API directly. 
> But Laurent told that it changes nothing. So libtool seems to not be the 
> problem.
> 
> I asked him to try with valgrind to see if there is memory corruption.
> 
> I tried to pass some new flags to the dlopen() API that loads the shared 
> library too. Maybe it could change something.
> 
> Let's see...
> 
OK, I just did try some others (svn 556)

root at ...1311...:/home/ron/src/gambas2-svn/trunk# make install 
make[3]: Leaving directory `/media/hdb4/dsk_all/home/ron/src/gambas2-svn/trunk/gb.qt.kde/src/html'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/media/hdb4/dsk_all/home/ron/src/gambas2-svn/trunk/gb.qt.kde/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/media/hdb4/dsk_all/home/ron/src/gambas2-svn/trunk/gb.qt.kde'
make: *** [install-recursive] Error 1
root at ...1311...:/home/ron/src/gambas2-svn/trunk# 
=============
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.qt.kde.html
gb.qt.kde.html
Loading native component: /usr/local/lib/gambas2/gb.qt.kde.html.so
Segmentation fault
----------------
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.qt.kde
gb.qt.kde
gbi2: warning: component gb.qt.kde not found
----------------
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.qt
gb.qt
Loading native component: /usr/local/lib/gambas2/gb.qt.so
Including gb.draw
Loading native component: /usr/local/lib/gambas2/gb.draw.so
Loading gambas component: /usr/local/lib/gambas2/gb.qt.gambas
----------------
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.draw
gb.draw
Loading native component: /usr/local/lib/gambas2/gb.draw.so
----------------
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.gtk
gb.gtk
Loading native component: /usr/local/lib/gambas2/gb.gtk.so
Including gb.draw
Loading native component: /usr/local/lib/gambas2/gb.draw.so
Loading gambas component: /usr/local/lib/gambas2/gb.gtk.gambas
----------------
root at ...1311...:/home/ron/src/gambas2-svn/trunk# gbi2 -v gb.qt.kde.html
gb.qt.kde.html
Loading native component: /usr/local/lib/gambas2/gb.qt.kde.html.so
Segmentation fault

Is it right to assume in 'gb.qt.kde.html.so' is something wrong?

Uhmm 
/usr/local/lib/gambas2/gb.qt.kde.html.so
what if I add some mesages?
cd source/main/src/gbc/gbi.c

...
static bool analyze_native_component(const char *path)
...
fprintf(stderr, "For include: %s\n", path);
	include = lt_dlsym(lib, LIB_INCLUDE);
fprintf(stderr, "After include: %s\n", path);
	if (include)
	{
		if (_verbose)
			fprintf(stderr, "Including %s\n", *include);
		analyze(*include, TRUE);
	}

fprintf(stderr, "After if (include) : %s\n", path);
  desc = lt_dlsym(lib, LIB_CLASS);

fprintf(stderr, "Before if (desc) : %s\n", path);
  if (desc)
  {
...


make 
make install
gbi2 -v gb.qt.kde.html


root at ...1311...:/home/ron/src/gambas2-svn/trunk/main/gbc# gbi2 -v gb.qt.kde.html
gb.qt.kde.html
Loading native component: /usr/local/lib/gambas2/gb.qt.kde.html.so
After Loading native component: /usr/local/lib/gambas2/gb.qt.kde.html.so
For include: /usr/local/lib/gambas2/gb.qt.kde.html.so
After include: /usr/local/lib/gambas2/gb.qt.kde.html.so
After if (include) : /usr/local/lib/gambas2/gb.qt.kde.html.so
Before if (desc) : /usr/local/lib/gambas2/gb.qt.kde.html.so
Before if (lt_dlclose) : /usr/local/lib/gambas2/gb.qt.kde.html.so
Segmentation fault

analyze_native_component is called in 
  static void analyze(const char *comp, bool include)

  placing in this function anywhere 'fprintf(stderr, "analize: %s\n", path);'

root at ...1311...:/home/ron/src/gambas2-svn/trunk/main/gbc# gbi2 -v gb.qt.kde.html
gb.qt.kde.html
Segmentation fault

 ??? not called 'analyze_native_component(const char *path)' anymore?

================

root at ...1311...:/home/ron/src/gambas2-svn/trunk/main/gbc# strace gbi2 -v gb.qt.kde.html
execve("/usr/local/bin/gbi2", ["gbi2", "-v", "gb.qt.kde.html"], [/* 43 vars */]) = 0
brk(0)                                  = 0x8053000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7efb000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 4
fstat64(4, {st_mode=S_IFREG|0644, st_size=89836, ...}) = 0
mmap2(NULL, 89836, PROT_READ, MAP_PRIVATE, 4, 0) = 0xb7ee5000
close(4)                                = 0

Checking the /etc directory:
/etc/ld.so.nohwcap nowhere?
/etc/ld.so.cache exists 83kbyte
/etc/ld.so.conf exists
/etc/ld.so.hwcappkgs exists

/etc/ld.so.conf contains:
  include /etc/ld.so.conf.d/*.conf
  /usr/X11R6/lib

/etc/ld.so.conf.d contains:
  no *.conf
  i486-linux-gnu:
    # Multiarch support
    /lib/i486-linux-gnu
    /usr/lib/i486-linux-gnu

/etc/ld.so.hwcappkgs contains:
  libc6 2.4-1ubuntu12.3
  libc6-i686 2.4-1ubuntu12.3
  libc6-i686 2.4-1ubuntu12.3
  libc6-i686 2.4-1ubuntu12.3

Ron




More information about the User mailing list