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

failed to install on macos sonoma M2 #226

Open
laoshaw opened this issue Oct 22, 2023 · 2 comments
Open

failed to install on macos sonoma M2 #226

laoshaw opened this issue Oct 22, 2023 · 2 comments

Comments

@laoshaw
Copy link

laoshaw commented Oct 22, 2023

nimble install gintro. # nim 2.0.0, apple M2

<snip>
/private/var/folders/s_/v3wqtfwj5cnb1x38crn2yky00000gn/T/gintrosalewski/gen.nim(1462, 27) Error: type mismatch: got 'seq[string]' for 'split(hhh, {' ', '\t', '\v', '\r', '\n', '\f'}, -1)' but expected 'tuple'
stack trace: (most recent call last)
/private/var/folders/s_/v3wqtfwj5cnb1x38crn2yky00000gn/T/nimblecache-1939409414/nimscriptapi_184086596.nim(222, 29)
/private/var/folders/s_/v3wqtfwj5cnb1x38crn2yky00000gn/T/nimble_1085/githubcom_stefansalewskigintro/gintro.nimble(77, 7) installBefore
/private/var/folders/s_/v3wqtfwj5cnb1x38crn2yky00000gn/T/nimble_1085/githubcom_stefansalewskigintro/gintro.nimble(62, 7) prep
/Users/tester/.choosenim/toolchains/nim-2.0.0/lib/system/nimscript.nim(265, 7) exec
/Users/tester/.choosenim/toolchains/nim-2.0.0/lib/system/nimscript.nim(265, 7) Error: unhandled exception: FAILED: nim c gen.nim [OSError]
       Tip: 6 messages have been suppressed, use --verbose to show them.
nimscriptwrapper.nim(160) execScript

    Error:  Exception raised during nimble script execution
@StefanSalewski
Copy link
Owner

Thanks for reporting.

From the linenumber (1462) this seems to be the same issue that some others have reported as well in the last 12 months, e.g. #225. It is caused by a compiler change introduced after Nim 1.6.x, related to something like tuple unpacking. That was working fine for eight years, but then they broke it.

Note that a plain "nimble install gintro" does not work for recent GTK, we use typically "gintro install gintro@#head". But that is not related to your issue.

I do not assume that you intent to actually use gintro -- I guess MAC people do not like GTK? Gintro had very few users over all the years, and in the last three years number of users has drastically decreased, so it is basically zero. I think a few people who still like Nim and GTK are now using owkettle, another Nim GTK based GUI toolkit, which should be good enough at least for toy apps.

If you really should need Gintro: Ask THEM to fix it, or wait for Nim 3.0. Or install an old Nim 1.6.x, install Gintro, and then switch to Nim 2.0. Or, fork Gintro, fix that tiny unpacking issue by use of a temporary variable. Others have forked Gintro already without asking me for permission, so one more unofficial fork may not hurt. But please delete your fork when you do not need it any longer.

@laoshaw
Copy link
Author

laoshaw commented Oct 23, 2023

Thanks for the response, new to nim gui, and thanks for mentioning owkettle, just installed with nim2.

reason to use gtk4 on Mac is for cross platform GUI, for that gtk4 seems like a good option comparing to Qt(license complex), WxWidgets(smaller community) and Electronjs(bloated)

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

2 participants