From gambas at ...1... Sun Sep 5 12:32:12 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Sun, 5 Sep 2010 12:32:12 +0200 Subject: [Gambas-devel] Installer In-Reply-To: <1283104555.4672.5.camel@...658...> References: <1283104555.4672.5.camel@...658...> Message-ID: <201009051232.12541.gambas@...1...> > Hi. > > Do not know if this is the appropriate channel to communicate. If not, > please let me know and write to the user list. > > At this point I still have the evidence to make a Windows-style > installer, which includes all shared libraries, components and > executable. > > Following the kind indications of Benoit, I have managed to create > installers for GTK, QT and shell scripts. > > All this is slow as I try on in each of the distributions are known and > date of support. > > For example, the script file (exe.sh) to run a console program is as > follows: > > #-------------------------------------------------------------------------- > -- #!/bin/sh > export PATH=/home/User/Desktop/Installer/gambas2/bin:"$PATH" > export > LD_LIBRARY_PATH=/home/User/Desktop/Installer/gambas2/lib_shared/usr/lib > export GB_DIR=/home/User/Desktop/Installer/gambas2 > exec /home/User/Desktop/Installer/console.gambas > #-------------------------------------------------------------------------- > ---- > > The tree of the installed folder is as follows: > > ------------------------------------------------------------------------- > . > > |-- Installer > | > | |-- exe.sh > | |-- gambas2 > | | > | | |-- bin > | | | > | | | |-- gbr2 -> /home/User/Desktop/Installer/gambas2/bin/gbx2 > | | | > | | | `-- gbx2 > | | | > | | |-- lib > | | | > | | | `-- gambas2 > | | | > | | | |-- gb.so > > -> /home/User/Desktop/Installer/gambas2/lib/gambas2/gb.so.0.0.0 > > | | | |-- gb.so.0 > > -> /home/User/Desktop/Installer/gambas2/lib/gambas2/gb.so.0.0.0 > > | | | `-- gb.so.0.0.0 > | | > | | `-- lib_shared > | | > | | `-- usr > | | > | | `-- lib > | | > | | |-- libffi.so.5 > > -> /home/User/Desktop/Installer/gambas2/lib_shared/usr/lib/libffi.so.5.0.10 > > | | `-- libffi.so.5.0.10 > | > | `-- console.gambas > > --------------------------------------------------------------------------- > -- > > The file gbr2 was compiled with 2.10.1 GLIBC in Ubuntu 9.10. > > If I run the script, runs smoothly on any computer with GBLIC version > 2.10.1. > > Now, if I run the program in Ubuntu 10.4, an error is generated due to > the incompatibility of GLIBC. (This uses the version 2.11 of glibc) > > --------------------------------------------------------------------------- > ---------- gbr2: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not > found (required by gbr2) > --------------------------------------------------------------------------- > ---------- > > Searching the Internet, I found a possible solution. here the link: > > --------------------------------------------------------------- > http://www.novell.com/coolsolutions/feature/11775.html > --------------------------------------------------------------- > > I have tried to do what follows, but there are some problems: > > According to step 3 of the tutorial: > > Create a wrapper script to set up the appropriate environment variables > and start the program: > > ------------------------------------------------------------------------- > % cd $prefix/bin > % mv zoo zoo.exec > % cat > zoo << EOF > #! /bin/bash > prefix=/opt/compat-env/zoo > LD_LIBRARY_PATH="$prefix/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" > export LD_LIBRARY_PATH > $prefix/lib/ld-linux.so.2 ${0}.exec "$@" > EOF > % chmod 755 zoo > ------------------------------------------------------------------------- > > The executable (.exec) begins with the indication of the path of the > library ld-linux.so.2 > > This should work if the executable is compiled and not interpreted. > > If replacement .exec by console.gambas , I get an error ELF. > > This is due to be gbr2 and not console.gambas which is called with > ld-linux.so.2 > > I apologize for such a long email.I appreciate any suggestions > > Regards. > > Cristian Abarz?a > I don't know why the program is running that way: "$prefix/lib/ld-linux.so.2 ..." Maybe you can try: - Running it directly, provided that ld-linux.so.2 is already located in your $prefix/lib directory. - Or running "gbr2 .gambas" instead of running ".gambas" directly. It should do the same thing. Regards, -- Beno?t Minisini From prog at ...657... Wed Sep 8 02:16:04 2010 From: prog at ...657... (craf) Date: Tue, 07 Sep 2010 20:16:04 -0400 Subject: [Gambas-devel] Installer In-Reply-To: <201009051232.12541.gambas@...1...> References: <1283104555.4672.5.camel@...658...> <201009051232.12541.gambas@...1...> Message-ID: <1283904964.18636.31.camel@...658...> Hi. Thanks Benoit for the tips, I learned things that did not know. Gradually I approach the solution. 1)I checked that file depends gbr2, yielding the following results: $ldd gbr2 libm.so.6 libdl.so.2 libpthread.so.0 libffi.so.5 libc.so.6 /lib/ld-linux.so.2 2)Copy this link and files which point, in a folder called libraries: The full path is as follows: |-- Installer | |-- exe.sh | |-- gambas2 | | |-- bin | | | |-- gbr2 -> /home/user/Desktop/Installer/gambas2/bin/gbx2 | | | `-- gbx2 | | |-- lib | | | `-- gambas2 | | | |-- gb.draw.so -> /home/user/Desktop/Installer/gambas2/lib/gambas2/gb.draw.so.0.0.0 | | | |-- gb.draw.so.0 -> /home/user/Desktop/Installer/gambas2/lib/gambas2/gb.draw.so.0.0.0 | | | |-- gb.draw.so.0.0.0 | | | |-- gb.so -> /home/user/Desktop/Installer/gambas2/lib/gambas2/gb.so.0.0.0 | | | |-- gb.so.0 -> /home/user/Desktop/Installer/gambas2/lib/gambas2/gb.so.0.0.0 | | | `-- gb.so.0.0.0 | | |-- lib_shared | | | `-- usr | | | `-- lib | | | |-- libffi.so.5 -> /home/user/Desktop/Installer/gambas2/lib_shared/usr/lib/libffi.so.5.0.10 | | | `-- libffi.so.5.0.10 | | `-- libraries | | |-- ld-2.11.1.so | | |-- ld-linux.so.2 -> ld-2.11.1.so | | |-- libc-2.11.1.so | | |-- libc.so.6 -> libc-2.11.1.so | | |-- libdl-2.11.1.so | | |-- libdl.so.2 -> libdl-2.11.1.so | | |-- libm-2.11.1.so | | |-- libm.so.6 -> libm-2.11.1.so | | |-- libthread_db-1.0.so | | `-- libthread_db.so.1 -> libthread_db-1.0.so | `-- console.gambas 3)Edit the file exe.sh to add the new library path: #!/bin/sh export PATH=/home/user/Desktop/Installer/gambas2/bin:"$PATH" export LD_LIBRARY_PATH=/home/user/Desktop/Installer/gambas2/lib_shared/usr/lib export GB_DIR=/home/user/Desktop/Installer/gambas2 $GB_DIR/libraries/ld-linux.so.2 /home/user/Desktop/Installer/gambas2/bin/gbr2 console.gambas I run and do not get the message: gbr2: /lib/tls/i686/cmov/libc.so.6: version `GLIBC_2.11' not > found (required by gbr2) but get the following: /home/user/Desktop/Installer/gambas2/libraries: error while loading shared libraries: /home/user/Desktop/Installer/gambas2/libraries: cannot read file data: Error 21 I searched online and found that we can pass a path to the libraries to file ld-linux.so.2. Example: $GB_DIR/libraries/ld-linux.so.2 --library-path /PATH/LIBRARIES/ /PATH/gbr2 console.gambas This does not work. Any light on the matter, I appreciate it. Regards. Cristian Abarz?a F. From prog at ...657... Fri Sep 10 21:14:00 2010 From: prog at ...657... (craf) Date: Fri, 10 Sep 2010 15:14:00 -0400 Subject: [Gambas-devel] Problems with GLIBC Message-ID: <1284146040.5241.65.camel@...658...> Hi Benoit. I've been shooting in the dark during this last month due to GLIBC. If I compile in Ubuntu 10.04 gbx2 and run in Ubuntu 9.04,I have the problem that ld-linux.so not find the version 2.11. In other distributions (eg Fedora) also the same thing happens. The main problem for example in Ubuntu, is that there is no more variable LD_LIBRARY_PATH. It indicates that it is better to create an entry in ld.so.conf when installed programs that require special routes shared libraries. Others say it is giving the path to compile the libraries at the time of linking. I found this site where they explain how to bind an older version of glibc to an executable. http://www.eall.com.br/blog/?p=66 The variable GB_DIR, what is its scope? I wonder if you could tell me if my point is feasible, or am I just flying blind. Please, do not bother for my questions so basic. ;=) Regards. Cristian Abarzua F. From gambas at ...1... Mon Sep 13 11:24:49 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 13 Sep 2010 11:24:49 +0200 Subject: [Gambas-devel] Problems with GLIBC In-Reply-To: <1284146040.5241.65.camel@...658...> References: <1284146040.5241.65.camel@...658...> Message-ID: <201009131124.50020.gambas@...1...> > Hi Benoit. > > I've been shooting in the dark during this last month due to GLIBC. > > If I compile in Ubuntu 10.04 gbx2 and run in Ubuntu 9.04,I have the > problem that ld-linux.so not find the version 2.11. > > In other distributions (eg Fedora) also the same thing happens. Do you have an error message? > > The main problem for example in Ubuntu, is that there is no more > variable LD_LIBRARY_PATH. Where did you read that? I see it in my Ubuntu 10.04 there. Type "man ld.so". > > It indicates that it is better to create an entry in ld.so.conf when > installed programs that require special routes shared libraries. > > Others say it is giving the path to compile the libraries at the time of > linking. > > I found this site where they explain how to bind an older version of > glibc to an executable. > http://www.eall.com.br/blog/?p=66 What does not work with the solution explained on that site? It seems perfect... > > The variable GB_DIR, what is its scope? What do you mean by "scope"? GB_DIR is an environmental variable that tells the interpreter where Gambas is installed, and so where it must look for the components libraries. The IDE uses it too indirectly to search for other Gambas files (control icons, component and class descriptions). Regards, -- Beno?t Minisini From gambas at ...1... Mon Sep 13 11:34:39 2010 From: gambas at ...1... (=?utf-8?q?Beno=C3=AEt_Minisini?=) Date: Mon, 13 Sep 2010 11:34:39 +0200 Subject: [Gambas-devel] Installer In-Reply-To: <1283904964.18636.31.camel@...658...> References: <1283104555.4672.5.camel@...658...> <201009051232.12541.gambas@...1...> <1283904964.18636.31.camel@...658...> Message-ID: <201009131134.39703.gambas@...1...> > > but get the following: > > /home/user/Desktop/Installer/gambas2/libraries: error while loading > shared libraries: /home/user/Desktop/Installer/gambas2/libraries: cannot > read file data: Error 21 > > I searched online and found that we can pass a path to the libraries to > file ld-linux.so.2. > Example: > > $GB_DIR/libraries/ld-linux.so.2 > --library-path /PATH/LIBRARIES/ /PATH/gbr2 console.gambas > > This does not work. I do not see any relation between your error and the library path. What does "error 21" means exactly? This is what you must find. According to the OS documentation, error 21 means that it tries to read data from a directory instead of a file. -- Beno?t Minisini