https://github.com/nim-lang/Nim/issues/16926
Well it seems that Mr. Wh1teDuke is the only one who wants to use GTK on a 32 bit system, and I don't know how urgent it is for him, but still I would like to fix his issue.
Unfortunately I can not reproduce it on my 64 bit system. I tried with -i386 switch, but that compiles fine. Is the only option to verify it to buy real 32 bit hardware?
Or can we guess a cast that may work? Other solution is of course using distinct int32 constants instead of enums, but that would be a larger code changes and would be inconsistent with all other code then.
Hi!
You can reproduce it on your system by using a 32 bits compiler maybe?
I solved many 32 bit issue by using a 32 bit compiler in a separated folder. Then I compile with this switch :
nim c --gcc.path=C:Users<me>Desktop....mingw32bin --cpu:i386 something.nim
Here I got the compiler:
reproduce it on your system by using a 32 bits compiler
Yes, initially I had the hope that I could reproduce it with --compileOnly:on and --cpu:i386 but that works fine on my 64 bit box.
I was going to delete my 64 bit Nim and install a 32 bit version, but that is a lot of work and I may still not be able to reproduce the issue.
And I initially assumed that I should be able to get the same issue when I use a 64 bit enum on my box and set a enum value to low(int64). But for that I get no issue again.
So maybe only real solution for a test is to buy on ebay a 20 years old 32 bit hardware. (I had that 15 years ago, but never assumed that I would need it again.)
So maybe only real solution for a test is to buy on ebay a 20 years old 32 bit hardware.
You can also ask the bug reporter for further help. Or do nothing, it's open source, some bugs can be "won't fix".
Or do nothing
Yes, indeed my plan is to just ignore "strange" requests whenever possible. But I generally fail. I failed to refuse to add libnice and gstreamer, and same for webkitgtk and libhandy. I have still no idea why people need that. And starting using oldgtk3 after five years on 32 bit hardware is a bit strange too, but maybe people have reasons for that?
I have Raspberry Pi 3 and I installed Arch linux following ARMv7 Installation on this page: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3 But this machine doesn't has gtk3 or gtk4.
When I run nimble install gintro on it, I got same error /tmp/gintrosalewski/gobject.nim(641, 46) Error: invalid order in enum 'DEPRECATED'
I changed GParamFlags type in /tmp/gintrosalewski/gobject.nim to following code:
type
GParamFlags* {.size: sizeof(cint), pure.} = enum
DEPRECATED = (1.cint shl 31)
READABLE = 1 shl 0, WRITABLE = 1 shl 1,
CONSTRUCT = 1 shl 2, CONSTRUCT_ONLY = 1 shl 3,
LAX_VALIDATION = 1 shl 4, STATIC_NAME = 1 shl 5,
STATIC_NICK = 1 shl 6, STATIC_BLURB = 1 shl 7,
EXPLICIT_NOTIFY = 1 shl 30
Then, I ran following commands and didn't get any errors.
$ cd /tmp/gintrosalewski/
$ nim c gen.nim
$ mkdir nim_gi
$ ./gen 1
Great! Then I will update oldgtk3 with your solution.
I think I suggested a very similar solution to Mr. Wh1teDuke, see
https://github.com/StefanSalewski/oldgtk3/issues/2#issuecomment-772800265
but it was not working for him. Strange.
So maybe only real solution for a test is to buy on ebay a 20 years old 32 bit hardware.
Or there might be some easier and more practical solutions, such as:
I have Raspberry Pi 3 and I installed Arch linux following ARMv7 Installation on this page: https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3
which you can buy for a symbolic price at every electronic store.
symbolic price
I don't know details about the various Raspberry Pi: Are the recent gadgets not all 64 bit? Well I may install an 32 bit OS on 64 bit hardware, but maybe what Mr. White got was a issue of true 32 bit hardware. And the other issue of Raspberry Pi is RAM: Old devices may have only a few GB which may be too less to compile gcc (I am using Gentoo Linux currently) ?
Well maybe next year I will have more spare time and then buy a Raspberry Pi or a RISC-V for playing...
Surely you don't need to buy any "real" 32-bit hardware. A free tool like Virtualbox will happily emulate a 32-bit x86 CPU while running on your modern 64-bit system.
Finding install media for a 32-bit Linux system may be more difficult these days ...