Comments (13)
in msys2, pacman -Syu update system
pacman -S mingw-w64-i686-libffi
then in cmd :gem install fiddle
irb(main):001:0> require 'fiddle'
=> false
irb(main):002:0> p Fiddle::VERSION
"1.0.8"
=> "1.0.8"
then
D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:67: warning: already initialized constant Fiddle::RTLD_GLOBAL
D:/Ruby25/lib/ruby/2.5.0/fiddle.rb:53: warning: previous definition of RTLD_GLOBAL was here
D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:68: warning: already initialized constant Fiddle::RTLD_LAZY
D:/Ruby25/lib/ruby/2.5.0/fiddle.rb:54: warning: previous definition of RTLD_LAZY was here
D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:69: warning: already initialized constant Fiddle::RTLD_NOW
D:/Ruby25/lib/ruby/2.5.0/fiddle.rb:55: warning: previous definition of RTLD_NOW was here
D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:61:in initialize': Exec format error (Fiddle::DLError) from D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:61:in
new'
from D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle.rb:61:in dlopen' from D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle/import.rb:86:in
block in dlload'
from D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle/import.rb:77:in collect' from D:/Ruby25/lib/ruby/gems/2.5.0/gems/fiddle-1.0.8/lib/fiddle/import.rb:77:in
dlload'
from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui/ffi.rb:78:in <module:FFI>' from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui/ffi.rb:74:in
module:LibUI'
from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui/ffi.rb:73:in <top (required)>' from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui.rb:28:in
require_relative'
from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui.rb:28:in <module:LibUI>' from D:/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/lib/libui.rb:6:in
<top (required)>'
from D:/Ruby25/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in require' from D:/Ruby25/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:135:in
rescue in require'
from D:/Ruby25/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:39:in require' from D:/ruby-lab/guis/libui.rb:1:in
from libui.
At first glance, it may be a Fiddle problem.
- Can you call Fiddle?
require 'fiddle'
- If it does, what version of Fiddle do you have?
require 'fiddle'
p Fiddle::VERSION
The VERSION constant was added recently, so it may not exist. It means that it is prior to 1.0.0.
from libui.
How did you install Ruby on Windows?
RubyInstaller?
from libui.
I install ruby with RubyInstaller.
irb(main):001:0> require 'fiddle'
=> false
gem install fiddle
Fetching: fiddle-1.0.8.gem (100%)
Temporarily enhancing PATH for MSYS/MINGW...
Installing required msys2 packages: mingw-w64-i686-libffi
错误:无法打开文件 /var/lib/pacman/local/mingw-w64-i686-gnutls-3.6.13-2/desc: No such file or directory
Building native extensions. This could take a while...
from libui.
Thanks.
Sorry, It doesn't seem to be a fiddle problem.
It seems that libui.dll cannot be loaded. LibUI problem.
First, we need to find out if libui.dll exists.
/Ruby25/lib/ruby/gems/2.5.0/gems/libui-0.0.8/vendor/libui.dll
Check the file size and make sure the file is not corrupt.
from libui.
from libui.
Only the 64bit version is packed in the Gem. (´-ω-`)
Other versions are distributed on the libui site.
If you replace it, it might work.
https://github.com/andlabs/libui/releases/tag/alpha4.1
from libui.
Thank you
from libui.
Now I can reproduce the issue.
Ruby | libui.dll | work? |
---|---|---|
Ruby+Devkit 2.5.9-1 (x86) | libui-alpha4.1-windows-amd64-shared.zip | Not work |
Ruby+Devkit 2.5.9-1 (x86) | libui-alpha4.1-windows-386-shared.zip | OK |
Thank you for your report.
If there are no further problems, please close it.
from libui.
Updates
Added a task to the Rakefile to download the 32-bit libui shared library.
rake vendor:all_x64 # Download libui.so, libui.dylib, and libui.dll to...
rake vendor:linux_x64 # Download libui.so for Linux to vendor directory
rake vendor:linux_x86 # Download libui.so for Linux to vendor directory
rake vendor:mac_x64 # Download libui.dylib for Mac to vendor directory
rake vendor:windows_x64 # Download libui.dll for Windows to vendor directory
rake vendor:windows_x86 # Download libui.dll for Windows to vendor directory
So, you can install it as follows
rake vendor:windows_x86
rake install
from libui.
Oddly enough I re-installed the Win10 laptop and I ran into the exact same issue.
The strange thing is that prior to the re-installation, that issue did not happen.
Right now I am a bit confused how this error shows up. I don't recall what I did
different prior to the reinstall; always installed via "gem install libui".
Note that require 'fiddle' and Fiddle::VERSION works. But require 'libui' fails
with a "No such file or directory" Fiddle::DLError.
Is there some path issue perhaps? I can start "irb" from cmd.exe just fine
and "ruby -v" shows the most recent ruby version (which is ruby 3.0.3).
from libui.
@rubyFeedback
Please tell us a little more about your environment.
Did you use RubyInstaller to install Ruby, and is Ruby really a 64-bit version?
Obviously using a 32bit version of Ruby will cause problems, but other causes are less clear and need to be investigated.
from libui.
One way to tell 64bit Ruby from 32bit Ruby is to use
ruby -e "puts 1.size"
If it is 4, it is 32-bit, and if it is 8, it is 64-bit.
from libui.
Related Issues (20)
- Adding more than one area underneath a grid makes only the first area show up (Mac) HOT 2
- Small bug (I think) in examples/ directory, at the file called draw_text.rb HOT 2
- Addition of another example? Basic colour table - see Andy's example in glimmer-libui-dsl HOT 1
- Turing Pattern HOT 2
- Examples: could an example be added for LibUI.new_scrolling_area? HOT 5
- [Possible bug or strange behaviour] On 2nd run the libui window is black HOT 8
- libui-ng HOT 8
- ARM64/AARCH64 Support HOT 26
- Exe wont start (Fiddle::DLError) Windows 11 Notebook HOT 14
- Glimmer DSL for LibUI Wins Fukuoka Ruby 2022 Special Award HOT 1
- libui-ng - "beta" ffi for it, for "early testing"? HOT 6
- Warning message when running LibUI::FFI.uiInit on Mac HOT 2
- Example for Parent and Child Windows HOT 8
- [Question] Field Edit sign restriction visible in GUI? HOT 1
- libui-ng related methods: how to use it? HOT 1
- Organising on https://github.com/kojix2 ? HOT 3
- Custom toplevel methods: aiming to enhance LibUI HOT 2
- Two things about libui-ng: one is a build failure with "rake"; the other is a suggestion HOT 2
- Table Selection API HOT 12
- Question: Why choose `fiddle` rather than `ffi`? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libui.