Please give a brief summary of your issue:
Only with Ruby versions 3.2.x, getting warning about undefining the allocator for
Please describe your issue and provide steps to reproduce it:
When initializing the SDK we see this warning. Example script:
# frozen_string_literal: true require '/usr/local/PDFNetC/Lib/PDFNetRuby' PDFNetRuby::PDFNet.Initialize(ENV.fetch('PDFTRON_LICENSE_KEY'))
/usr/local/PDFNetC/Lib/PDFNetRuby.so: warning: undefining the allocator of T_DATA class swig_runtime_data
It looks like this is an issue in Swig which was brought up in this GitHub issue 2257 and possibly fixed. The warning is apparently set up as a way to help Ruby C extension developers meet requirements by telling them to either explicitly define their own allocator for
T_DATA objects, or undefined it.
I’ve tested compiling the latest development version from Swig and I do indeed see this warning disappear. The issue with this is that we don’t think it’s a good idea to go this route for our production deployments since it’s not an official “stable” release.
One thing we did notice is that Ruby 3.1.x doesn’t output this warning. But I think Ruby 3.1.x is just silently happy with it according to the description in the GitHub issue mentioned above.
My question is, does the Apryse developers suggest continuing to use Ruby 3.2 and ignoring this warning for now, or do you think we should use Ruby 3.1.x?
Otherwise, what is the newest version of Ruby that is officially suggested/supported? Your documentation states 2.6+, but my team would highly prefer to stick to version 3.x. Ideally 3.2.x, but we can work with 3.1.x if that’s the better supported option. Appreciate any thoughts and suggestions about this.
As an aside, I created a separate topic about our app crashing due to memory allocation errors. I wasn’t certain that these are related, but since this warning is about memory allocation I mention it here in case these issues share the same root cause.
Please provide a link to a minimal sample where the issue is reproducible: