1. [ libui ] can't open .so [[ solved libui now works ]]
- Posted by _tom (admin) Sep 12, 2019
- 1345 views
- Last edited Sep 13, 2019
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
2. Re: [ libui ] can't open .so
- Posted by Icy_Viking Sep 12, 2019
- 1359 views
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.
3. Re: [ libui ] can't open .so
- Posted by _tom (admin) Sep 13, 2019
- 1337 views
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
4. Re: [ libui ] can't open .so
- Posted by _tom (admin) Sep 13, 2019
- 1345 views
I'm making the same mistake on an i5 laptop. The 64bit libui demos run. I can't load the .so individually.
_tom
5. Re: [ libui ] can't open .so
- Posted by ghaberek (admin) Sep 13, 2019
- 1336 views
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:
- Put any additional libraries (e.g. libui.so) you want to use in your Euphoria bin directory.
- Edit your ~/.profile file and add export LD_LIBRARY_PATH=/usr/local/euphoria-4.1.0-Linux-x64/bin to the end.
- Log out and back in for the changes to take effect.
-Greg
6. Re: [ libui ] can't open .so
- Posted by _tom (admin) Sep 13, 2019
- 1334 views
Thanks Greg.
The demos work!
- source of libui .so/.dll
https://github.com/andlabs/libui
- Euphoria files
https://github.com/ghaberek/libui-euphoria
After you explained the problem I did the following:
I made a directory containing three essential files.
- make a directory "foo"
- copy controlgallery.ex to "foo"
- copy libui.so.0 to "foo"
- the .so is downloaded from the github site
- 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
7. Re: [ libui ] can't open .so
- Posted by euphoric (admin) Sep 13, 2019
- 1274 views
Is libui abandonware?
8. Re: [ libui ] can't open .so
- Posted by ghaberek (admin) Sep 14, 2019
- 1277 views
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
9. Re: [ libui ] can't open .so
- Posted by irv Sep 15, 2019
- 1192 views
How to get libui on Linux? apt search libui returns a couple of dozen hits, which one is the one to install?
10. Re: [ libui ] can't open .so
- Posted by ghaberek (admin) Sep 15, 2019
- 1242 views
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