I finally managed to build a 64-bit version of JudyFor the record, I finally managed to build a static 64-bit library, too. (Credit to
BrowserUk and
oiskuu.)
oiskuu suggested that my problems with non-constant expressions arose because the compiler chose not to fold constant expression where undefined behaviour is involved - and that I should use
(Word_t)0x100 instead.
Doing that allowed the build to proceed, and 'make check' passed its tests.
However, I was still seeing a number of "left shift count >= width of type" warnings, and I don't know how thorough the test suite (which completes very quickly) is.
I therefore don't have a lot of confidence that the library is going to behave reliably in the real world.
With the Judy-0.41 patches that anonymonk posted I was able to successfully build the module on 32-bit perls.
However, the Judy module that I built against the 64-bit library loaded ok, but kept crashing during the running of its test suite.
In Judy.xs, I changed the hard coded "long" casts to "long long" casts. That got rid of lots of warnings during the build, but the crashing persisted.
The generated Judy.c file still contained some casts to "unsigned long int" , but I couldn't immediately find what was generating those casts - at which point I totally lost interest.
Cheers,
Rob