[Gambas-user] Problem with PATH to shared library - part 2

craf prog at ...2177...
Wed Mar 31 23:26:00 CEST 2010


-----Mensaje original-----
De: Benoît Minisini <gambas at ...1...>
Reply-to: mailing list for gambas users
<gambas-user at lists.sourceforge.net>
Para: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Asunto: Re: [Gambas-user] Problem with PATH to shared library - part 2
Fecha: Wed, 31 Mar 2010 22:41:15 +0200


> Hello.
> 
> I forgot in the previous mail indicate the steps I have done:
> 
> First run the command $ ldd gbr2 to see if there were dependency
> problems, which I produced the following result:
> 
> $ Ldd gbr2
> linux-gate.so.1 => (0xb770d000)
> libm.so.6 => / lib/tls/i686/cmov/libm.so.6 (0xb76db000)
> libdl.so.2 => / lib/tls/i686/cmov/libdl.so.2 (0xb76d7000)
> libpthread.so.0 => / lib/tls/i686/cmov/libpthread.so.0 (0xb76be000)
> libffi.so.5 => not found
> libc.so.6 => / lib/tls/i686/cmov/libc.so.6 (0xb756f000)
> / Lib/ld-linux.so.2 (0xb770e000)
> 
> This tells me they can not find the shared library libffi.so.5, for
> which issued the command:
> 
> $ Tree opt
> 
>  my_project/
> 
> |-- gambas2
> |
> |   |-- bin
> |   |
> |   |   |-- gbr2
> |   |   
> |   |   `-- gbx2
> |   |
> |   |-- lib
> |   |
> |   |   `-- gambas2
> |   |   
> |   |       |-- gb.draw.la
> |   |       |-- gb.draw.so
> |   |       |-- gb.draw.so.0
> |   |       |-- gb.draw.so.0.0.0
> |   |       |-- gb.form.component
> |   |       |-- gb.form.gambas
> |   |       |-- gb.gtk.component
> |   |       |-- gb.gtk.ext.component
> |   |       |-- gb.gtk.ext.la
> |   |       |-- gb.gtk.ext.so
> |   |       |-- gb.gtk.ext.so.0
> |   |       |-- gb.gtk.ext.so.0.0.0
> |   |       |-- gb.gtk.gambas
> |   |       |-- gb.gtk.la
> |   |       |-- gb.gtk.so
> |   |       |-- gb.gtk.so.0
> |   |       |-- gb.gtk.so.0.0.0
> |   |       |-- gb.so
> |   |       |-- gb.so.0
> |   |       
> |   |       `-- gb.so.0.0.0
> |   
> |   `-- library_shared
> |   
> |       |-- lib
> |       |
> |       |   |-- ld-2.9.so
> |       |   |-- ld-linux.so.2
> |       |   |-- libgcc_s.so.1
> |       |   |-- libpcre.so.3
> |       |   |-- libpcre.so.3.12.1
> |       |   |-- libselinux.so.1
> |       |   |-- libz.so.1
> |       |   |-- libz.so.1.2.3.3
> |       |   
> |       |   `-- tls
> |       |   
> |       |       `-- i686
> |       |       
> |       |           `-- cmov
> |       |           
> |       |               |-- libc-2.9.so
> |       |               |-- libc.so.6
> |       |               |-- libdl-2.9.so
> |       |               |-- libdl.so.2
> |       |               |-- libm-2.9.so
> |       |               |-- libm.so.6
> |       |               |-- libpthread-2.9.so
> |       |               
> |       |               `-- libpthread.so.0
> |       
> |       `-- usr
> |       
> |           `-- lib
> |           
> |               |-- libX11.so.6
> |               |-- libX11.so.6.2.0
> |               |-- libXau.so.6
> |               |-- libXau.so.6.0.0
> |               |-- libXcomposite.so.1
> |               |-- libXcomposite.so.1.0.0
> |               |-- libXcursor.so.1
> |               |-- libXcursor.so.1.0.2
> |               |-- libXdamage.so.1
> |               |-- libXdamage.so.1.1.0
> |               |-- libXdmcp.so.6
> |               |-- libXdmcp.so.6.0.0
> |               |-- libXext.so.6
> |               |-- libXext.so.6.4.0
> |               |-- libXfixes.so.3
> |               |-- libXfixes.so.3.1.0
> |               |-- libXi.so.6
> |               |-- libXi.so.6.0.0
> |               |-- libXinerama.so.1
> |               |-- libXinerama.so.1.0.0
> |               |-- libXrandr.so.2
> |               |-- libXrandr.so.2.2.0
> |               |-- libXrender.so.1
> |               |-- libXrender.so.1.3.0
> |               |-- libatk-1.0.so.0
> |               |-- libatk-1.0.so.0.2609.1
> |               |-- libcairo.so.2
> |               |-- libcairo.so.2.10800.6
> |               |-- libdirect-1.0.so.0
> |               |-- libdirect-1.0.so.0.1.0
> |               |-- libdirectfb-1.0.so.0
> |               |-- libdirectfb-1.0.so.0.1.0
> |               |-- libexpat.so.1
> |               |-- libexpat.so.1.5.2
> |               |-- libffi.so.5- - - - - - - - - - - - - > ¡THERE HERE!
> |               |-- libffi.so.5.0.8
> |               |-- libfontconfig.so.1
> |               |-- libfontconfig.so.1.3.0
> |               |-- libfreetype.so.6
> |               |-- libfreetype.so.6.3.20
> |               |-- libfusion-1.0.so.0
> |               |-- libfusion-1.0.so.0.1.0
> |               |-- libgdk-x11-2.0.so.0
> |               |-- libgdk-x11-2.0.so.0.1600.1
> |               |-- libgdk_pixbuf-2.0.so.0
> |               |-- libgdk_pixbuf-2.0.so.0.1600.1
> |               |-- libgio-2.0.so.0
> |               |-- libgio-2.0.so.0.2000.1
> |               |-- libglib-2.0.so.0
> |               |-- libglib-2.0.so.0.2000.1
> |               |-- libgmodule-2.0.so.0
> |               |-- libgmodule-2.0.so.0.2000.1
> |               |-- libgobject-2.0.so.0
> |               |-- libgobject-2.0.so.0.2000.1
> |               |-- libgtk-x11-2.0.so.0
> |               |-- libgtk-x11-2.0.so.0.1600.1
> |               |-- libpango-1.0.so.0
> |               |-- libpango-1.0.so.0.2400.1
> |               |-- libpangocairo-1.0.so.0
> |               |-- libpangocairo-1.0.so.0.2400.1
> |               |-- libpangoft2-1.0.so.0
> |               |-- libpangoft2-1.0.so.0.2400.1
> |               |-- libpixman-1.so.0
> |               |-- libpixman-1.so.0.13.2
> |               |-- libpng12.so.0
> |               |-- libpng12.so.0.27.0
> |               |-- libstdc++.so.6
> |               |-- libstdc++.so.6.0.10
> |               |-- libxcb-render-util.so.0
> |               |-- libxcb-render-util.so.0.0.0
> |               |-- libxcb-render.so.0
> |               |-- libxcb-render.so.0.0.0
> |               |-- libxcb.so.1
> |               |-- libxcb.so.1.1.0
> |               |-- libz.so.1
> |               
> |               `-- libz.so.1.2.3.3
> 
> `-- my_project.gambas
> 
> 
> This shows me that the library is located at:
> 
> /opt/my_project/gambas2/library_shared/usr/lib
> 
> Then try to add the path of the libraries in the ld.so.conf file,
> leaving this way:
> 
> include /etc/ ld.so.conf.d / *. conf
> /opt/my_project/gambas2/library_shared

>If the library is located in '/opt/my_project/gambas2/library_shared/usr/lib', 
>why do you write '/opt/my_project/gambas2/library_shared' only?

¡yes! it is as I have on file executable.sh.

#!/bin/sh
export PATH=/opt/my_project/gambas2/bin
export GB_DIR=/opt/my_project/gambas2
export LD_LIBRARY_PATH=/opt/my_project/gambas2/library_shared
exec /opt/my_project/my_project.gambas

> 
> Save the changes to the file and then running:
> 
> $ sudo ldconfig
> 
> But I keep throwing the mistake of missing the library libffi.so.5
> 
> Then I decide to modify the executable.sh, with the following:
> 
> #! /bin/sh
> export PATH = / opt/my_project/gambas2/bin

>The syntax is not correct, you should have no spaces inside the path, and 
>around the equal sign.

Sorry, bad, bad, google translator ;=p (In original code no spaces)

> GB_DIR export = / opt/my_project/gambas2

>The syntax of this line is not correct too. 'export' must come first.

again, Google translator (in original code no spaces)

> export LD_LIBRARY_PATH = / opt/my_project/gambas2/library_shared/lib: /
> opt/my_project/gambas2/library_shared/usr/lib

>same remark with spaces.

oops, again.sorry
> exec opt / my_project / my_project.gambas

>same remark with spaces.

bad, bad email redacted
> 
> But now gives me the message "Segmentation fault"
> 
> any idea?
> 

>Nope. But fix all the previous errors and try again!

The problem is that you can not find the path to that library in specific, can do what I'm trying to do?, Is that correct place LID_LIBRARY_PATH export?.

If I do could be the prelude to an installer.

Regards



More information about the User mailing list