1. [ libui ] can't open .so [[ solved libui now works ]]

The libui 4.1 shared demos run using libui.so.0

But from neither

-- Euphoria 
 
include std/dll.e 
? open_dll( "libui.so.0" ) 
-->0 

nor

-- Phix 
? open_dll( "libui.so.0" ) 
--> 0 

can I load the same .so

_tom

new topic     » topic index » view message » categorize

2. Re: [ libui ] can't open .so

_tom said...

The libui 4.1 shared demos run using libui.so.0

But from neither

-- Euphoria 
 
include std/dll.e 
? open_dll( "libui.so.0" ) 
-->0 

nor

-- Phix 
? open_dll( "libui.so.0" ) 
--> 0 

can I load the same .so

_tom

I believe your error is coming from the .0, you should only need .so, like this

include std/dll.e 
 
atom lib 
lib = open_dll("libui.so") -- I don't think you need the .0 and that is probably what's causing the error.  
new topic     » goto parent     » topic index » view message » categorize

3. Re: [ libui ] can't open .so

Leaving out the trailing .0 did not help.

This is a netbook with an atom chip.

Another test I tried was with the WEE editor. The editor runs, therefore it must load scintilla32.so But,

include std/dll.e 
? open_dll( "scintilla32.so" ) 
-->0 

a similar failure to load the .so

_tom

new topic     » goto parent     » topic index » view message » categorize

4. Re: [ libui ] can't open .so

I'm making the same mistake on an i5 laptop. The 64bit libui demos run. I can't load the .so individually.

_tom

new topic     » goto parent     » topic index » view message » categorize

5. Re: [ libui ] can't open .so

Unfortunately, there are a few things going on here:

Problem 1: A typo

Yes, sorry, the ui.e library looks for libui.so.0 but the included file is named libui.so. My bad. Please rename one or the other. I will fix this in a future release.

Problem 2: Missing libraries

You may be missing a library that libui.so is linked to. Run ldd libui.so | grep 'not found' and see if anything is listed there.

However, if you're on Debian/Ubuntu/Mint this is unlikely to be a problem and libui should work out of the box.

Problem 3: Euphoria 4.1 is broken

The current Euphoria 4.1.0 build does not have its rpath set to include the local directory. This is a relatively simple fix and will be corrected when I release 4.2.

In a pinch, you can just run cd examples; LD_LIBRARY_PATH=../bin eui controlgallery.ex and it would work (assuming you fixed problem #1 above).

In the mean time, here's a more permanent solution I would recommend:

  1. Put any additional libraries (e.g. libui.so) you want to use in your Euphoria bin directory.
  2. Edit your ~/.profile file and add export LD_LIBRARY_PATH=/usr/local/euphoria-4.1.0-Linux-x64/bin to the end.
  3. Log out and back in for the changes to take effect.

-Greg

new topic     » goto parent     » topic index » view message » categorize

6. Re: [ libui ] can't open .so

Thanks Greg.

The demos work!

After you explained the problem I did the following:

I made a directory containing three essential files.

  1. make a directory "foo"
  2. copy controlgallery.ex to "foo"
  3. copy libui.so.0 to "foo"
  • the .so is downloaded from the github site
  1. copy ui.e to "foo"
  • edit line 129 to read
atom libui = open_dll( "./libui.so.0" ) 

The "trick" is ./ to signify a local file.

Thanks for a nifty gui. For sure include this in the next Euphoria release.

_tom

new topic     » goto parent     » topic index » view message » categorize

7. Re: [ libui ] can't open .so

Is libui abandonware?

new topic     » goto parent     » topic index » view message » categorize

8. Re: [ libui ] can't open .so

euphoric said...

Is libui abandonware?

Nope. All the recent changes are just on the "remodel" branch. Most recent commit was ~2 weeks ago?

https://github.com/andlabs/libui/commits/remodel

-Greg

new topic     » goto parent     » topic index » view message » categorize

9. Re: [ libui ] can't open .so

How to get libui on Linux? apt search libui returns a couple of dozen hits, which one is the one to install?

new topic     » goto parent     » topic index » view message » categorize

10. Re: [ libui ] can't open .so

irv said...

How to get libui on Linux? apt search libui returns a couple of dozen hits, which one is the one to install?

I don't think the developer(s) have done any work to make libui available via repos yet. Most of what you find via apt search are related to libuid. I was planning to bundle the shared library directly with Euphoria.

The last release of libui-euphoria includes the shared library: https://github.com/ghaberek/libui-euphoria/releases

If you want a newer build, you can get it directly from libui: https://github.com/andlabs/libui/releases

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu