1. Euphoria 2.3 and Linking to GTK
- Posted by Travis Beaty <travisbeaty at arn.net> Jun 16, 2001
- 469 views
Howdy y'all! A couple of months ago, I had brought to light a problem with accessing the gtk library with Euphoria in Linux. It turned out, as I recall, that there was something about the way the .so files were compiled which prevented Euphoria from loading them via define_c_func(). So, Mr. Craig: does 2.3 address and/or fix this problem? I am anxious to wrap GTK and begin producing applications in Euphoria for XWindow in Linux. No pressure, just a question! Travis Beaty Claude, Texas.
2. Re: Euphoria 2.3 and Linking to GTK
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 17, 2001
- 445 views
Travis Beaty writes: > So, Mr. Craig: does 2.3 address and/or fix this problem? > I am anxious to wrap GTK and begin producing applications > in Euphoria for XWindow in Linux. In 2.3, unless I discover a problem with it, I will have an open_dll() for Linux that uses the RTLD_GLOBAL flag. You can help test it for me by using my_open_dll below to open your GTK library: --------------------------------- include dll.e include machine.e constant RTLD_LAZY = #0001, RTLD_GLOBAL = #0100 -- The current Euphoria open_dll fails (returns 0) puts(1, "using current open_dll ...\n") ? open_dll("libgtk.so") -- so try rolling your own open_dll ... integer my_open_dll atom dl, name dl = open_dll("libdl.so") my_open_dll = define_c_func(dl, "dlopen", {C_POINTER, C_UINT}, C_POINTER) name = allocate_string("libgtk.so") puts(1, "using my_open_dll ...\n") ? c_func(my_open_dll, {name, or_bits(RTLD_LAZY, RTLD_GLOBAL)}) ------------------------------ On my machine, the regular open_dll() fails to open libgtk.so, but my_open_dll succeeds. I didn't go any further with it, such as linking C functions. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
3. Re: Euphoria 2.3 and Linking to GTK
- Posted by Travis Beaty <travisbeaty at arn.net> Jun 17, 2001
- 434 views
Howdy Mr. Craig! On 17 Jun 2001, at 16:55, Robert Craig wrote: > You can help test it for me by using > my_open_dll below to open your GTK library: Okay, I'm a little confused. Do you want me to test this now with 2.2, or with 2.3 when it comes out? Travis Beaty Claude, Texas.
4. Re: Euphoria 2.3 and Linking to GTK
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 17, 2001
- 429 views
Travis Beaty writes: > Okay, I'm a little confused. Do you want me to test this > now with 2.2, or with 2.3 when it comes out? Run it now on your machine. It should print 0, then print some large number. You can then use my_open_dll in place of Euphoria's open_dll, in order to open the GTK library that you were having trouble with. my_open_dll does the same thing as Euphoria 2.2's open_dll, but it adds the RTLD_GLOBAL flag. In 2.3 I plan to change open_dll to use that flag, unless you discover some problem with it. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
5. Re: Euphoria 2.3 and Linking to GTK
- Posted by Mike Hurley <mikehurley.1 at worldnet.att.net> Jun 17, 2001
- 448 views
In 2.3 I plan to > change open_dll to use that flag just wondering... why wasn't it done like that in the first place? also...one other thing... how does the system access libdl.so if it contains the function that opens dynamic libraries on linux? Mike Hurley ICQ: 119924419
6. Re: Euphoria 2.3 and Linking to GTK
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 17, 2001
- 451 views
Mike Hurley writes: >> In 2.3 I plan to >> change open_dll to use that flag > > just wondering... > why wasn't it done like that in the first place? I didn't think the flag was necessary, and open_dll worked fine on the .so's that I tried. It turns out that there are some .so's that need it. I'm still wondering if there is any downside to using it. > also...one other thing... > how does the system access libdl.so if it > contains the function that opens > dynamic libraries on linux? exu always links immediately with libdl.so at start-up. The Euphoria example code links with it again via open_dll. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
7. Re: Euphoria 2.3 and Linking to GTK
- Posted by Travis Beaty <travisbeaty at arn.net> Jun 18, 2001
- 469 views
Good morning/afternoon/evening, y'all! I've tested the following snippet in Linux-Mandrake 8.0, and found that in the case of both open_dll() and my_open_dll() returned 0. However, since I am still quite unfamiliar with Linux, this may not be a problem with Euphoria, but rather a problem with my configuration. Could other Linux users test this as well to confirm or dispute my results? Thanks, Travis Beaty Claude, Texas. > You can help test it for me by using > my_open_dll below to open your GTK library: > > --------------------------------- > > include dll.e > include machine.e > > constant RTLD_LAZY = #0001, > RTLD_GLOBAL = #0100 > > -- The current Euphoria open_dll fails (returns 0) > puts(1, "using current open_dll ...\n") > ? open_dll("libgtk.so") > > -- so try rolling your own open_dll ... > > integer my_open_dll > atom dl, name > > dl = open_dll("libdl.so") > my_open_dll = define_c_func(dl, "dlopen", {C_POINTER, C_UINT}, C_POINTER) > > name = allocate_string("libgtk.so") > > puts(1, "using my_open_dll ...\n") > ? c_func(my_open_dll, {name, or_bits(RTLD_LAZY, RTLD_GLOBAL)}) >
8. Re: Euphoria 2.3 and Linking to GTK
- Posted by Irv Mullins <irvm at ellijay.com> Jun 18, 2001
- 447 views
On Monday 18 June 2001 09:31, Travis Beaty wrote: > I've tested the following snippet in Linux-Mandrake 8.0, and found that in > the case of both open_dll() and my_open_dll() returned 0. However, since I > am still quite unfamiliar with Linux, this may not be a problem with > Euphoria, but rather a problem with my configuration. > > Could other Linux users test this as well to confirm or dispute my results? > I tried with the latest Mandrake 8.0, and got same results. First of all, open_dll("libdl.so") returns zero. I can't find a libdl.so anywhere on my computer. There is no link named libgtk.so, either, just a libgtk-1.2.so.0 which points to libgtk-1.2.so.0.9.1 After I created a link named libgtk.so pointing to libgtk-1.2.so.0.9.1, it still didn't work. Regards, Irv
9. Re: Euphoria 2.3 and Linking to GTK
- Posted by Mike Hurley <mikehurley.1 at worldnet.att.net> Jun 18, 2001
- 441 views
> I've tested the following snippet in Linux-Mandrake 8.0 doesn't Rob use RedHat? Perhaps that's why. Mike Hurley 119924419
10. Re: Euphoria 2.3 and Linking to GTK
- Posted by Brendon Sly <bwsly at infoscience.otago.ac.nz> Jun 18, 2001
- 443 views
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<< > Good morning/afternoon/evening, y'all! > I've tested the following snippet in Linux-Mandrake 8.0, and found tha= t=20 in the > case of both open_dll() and my_open_dll() returned 0. However, since = I=20 am > still quite unfamiliar with Linux, this may not be a problem with=20 Euphoria, but > rather a problem with my configuration. > Could other Linux users test this as well to confirm or dispute my=20= results? I ran the snippet on my 'getting a bit old and patched by now' RedHat 6.= 2=20 server and got 0 returned by both 'open_dll' and 'my_open_dll'.=20 I did check that both 'libdl.so' and 'libgtk.so' exist and they're both = links but they point to libraries that do exist ('libdl.a' and=20 'libgtk-1.2.so.0.5.1' respectively). I don't have access to any other linux 'flavour' other than RedHat, I=20= don't know if that would enter into it. Just speculating. Brendon :|
11. Re: Euphoria 2.3 and Linking to GTK
- Posted by Robert Craig <rds at RapidEuphoria.com> Jun 18, 2001
- 459 views
Brendon Sly writes: > I ran the snippet on my 'getting a bit old and patched by now' > RedHat 6.2 server and got 0 returned by both > 'open_dll' and 'my_open_dll'. I'm using an even older Red Hat 5.2. > I did check that both 'libdl.so' and 'libgtk.so' exist > and they're both links but they point to libraries > that do exist ('libdl.a' and 'libgtk-1.2.so.0.5.1' respectively). ".a" means static library. open_dll only opens dynamic libraries (.so). On my system, libdl.so and libgtk.so are both located in /usr/lib. They are both links to other files. I'm a bit surprised that no one other than me can link with them. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com