Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError while installing through nimble #24

Open
zetashift opened this issue Feb 27, 2018 · 10 comments
Open

OSError while installing through nimble #24

zetashift opened this issue Feb 27, 2018 · 10 comments

Comments

@zetashift
Copy link

I'm on Windows 10, and while using the command nimble install gintro I'm getting the following error:

preparing gintro nimgrab.nim(35) nimgrab nimgrab.nim(16) syncDownload urldownloader.nim(413) downloadToFile oserr.nim(110) raiseOSError Error: unhandled exception: The specified protocol is unknown. [OSError]

@StefanSalewski
Copy link
Owner

zetashift: update your Putty client

@StefanSalewski
Copy link
Owner

As it still seems not to work for you:

Try if a plain command like

exec("nimgrab 'https://raw.githubusercontent.com/StefanSalewski/oldgtk3/master/oldgtk3/gobject.nim' gobject.nim")

works for you. If it does not work, maybe try with other download files.

Generally that should work.

If we do not get that working, we have a bunch of possible solutions:

  • Add the needed files from oldgtk3 to gintro package

  • Download full oldgtk3 with a git clone command.

  • Require full oldgtk3 from nimble before install.

But the main question is, if after a successfully download gintro would work at all for Windows. I will investigate this issue further if someone is really interested of USING gintro on Windows, that is creating a larger GTK3 application.

@zetashift
Copy link
Author

zetashift commented Feb 28, 2018

I figured it out! Removing the single quotation marks around the 'https://raw.githubusercontent.com/StefanSalewski/oldgtk3/master/oldgtk3/gobject.nim' (and the others)
in gintro.nimble fixed it for nimgrab and wget. Now I'm just getting libglib-2.0.0.dll missing error but that's just a dependency I haven't installed yet.

Thank you :D

@zetashift
Copy link
Author

Alright so far:

  1. Remove the quotation marks from the download url
  2. Install msys2 and run: pacman -S mingw-w64-x86_64-gtk3 then run: pacman -S mingw-w64-x86_64-python3-gobject to get the other required dlls's.

Now I get the following error:

Remaining delayed methods: 0
Typelib file for namespace 'GtkSource' (any version) not found

** (gen.exe:2016): CRITICAL **: g_irepository_get_dependencies: assertion 'typelib != NULL' failed
Traceback (most recent call last)
gen.nim(1717)            gen
gen.nim(1400)            main
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
stack trace: (most recent call last)
C:\Users\rskar\Documents\workspace\gintro\gintro.nimble(74) installBefore
C:\Users\rskar\Documents\workspace\gintro\gintro.nimble(62) prep

@StefanSalewski
Copy link
Owner

Great.

GtkSource is for GtkSourceView, which is used for editors like GEdit, Aporia, NEd...

It may be that you have to install it separately for your Windows GTK, maybe there is a separate package. But most people should not need GtkSource, basic examples should work without it.

So generally you could skip/remove line 1717 (main("GtkSource")) from file gen.nim.

Unfortunately I don't know how you can do it locally now -- with the older package variant it was easier, because that used "nimble prepare" followed by "nimble install" both executed from inside gintro directory. That was available for nearly one year, but no one has tried. Now it is gone, sorry.

@zetashift
Copy link
Author

gtk

It worked holy snap!

So after the previous steps I commented line 1717 out and then I had to copy-paste the .nimble from the gintro folder to my /AppData/Local/Temp folder.
Then I had to copy-paste the gintro folder(containing all the relevant nim files) to my /.nimble/pkgs/gintro-0.4.0/

All the examples work. Thanks again for your time :D.

@StefanSalewski
Copy link
Owner

Great.

I have just created a nimgrab issue about the single quotes. It was a bit strange that it worked fine for Linux. I should be able to push a updated gintro.nimble without the quotes in a few days, then a plain "nimble install gintro" should work.

Can you tell us how you have installed the GTK libs for your Windows 10?

And what was special with package GtkSource?

I would like to add that information to tutorial.

@zetashift
Copy link
Author

For the GTK libs I did according these instructions(https://www.gtk.org/download/windows.php):
Install MSYS2
In the msys2 cmd I entered:
pacman -S mingw-w64-x86_64-gtk3
Then for some other necessary depencies(girepository.dll) you need to do:
pacman -S mingw-w64-x86_64-python3-gobject

I'm not sure about the GtkSource error, as I don't know that much about GTK.

@StefanSalewski
Copy link
Owner

Thanks for that info.

From GTK maling list I just got these additional info:

Yes they already found MSYS2 which contains the packages:
https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gtksourceview3/

I will try to add this info to tutorial and fix nimble script in the next days.

@gavr123456789
Copy link

I think the full installation instructions for Windows should be added to the Readme.
It is enough to install 2 packages: glade(will get gtk3 as dependence) and gobject introspection(python not needed)
Also you can install git from msys(needed for nimble)

�pacman -S mingw-w64-x86_64-gobject-introspection
pacman -S mingw-w64-x86_64-glade  
pacman -S git

Then you need to add 2 path to env
image

C:\msys64\mingw64\bin // for libs
C:\msys64\usr\bin // for git (git is not mingw64 package)

All works ^^
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants