So basically RubyNumberTheory require the NArray gem, and it seems it requires some native compilation tools and probably some additional configuration. So on a Fedora 29, here is what was tried
$ gem install narray
Building native extensions. This could take a while...
ERROR: Error installing narray:
ERROR: Failed to build gem native extension.
[…]
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
I did installed a few packages, through dnf like gcc ruby-devel rubygems
and group install "C Development Tools and Libraries"
and even some more unexpected arm-none-eabi-newlib
. Actually, the header seems well installed on the system
$ whereis stdint.h
stdint: /usr/include/stdint.h
Even with environment variable set as following:
export LIBRARY_PATH=/usr/include
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/include
The gem still won't install, telling stdint.h wasn't found. What else could be attempted?
Looking in the
mkmf.log
file, it appeared the system was lackingredhat-hardened-cc1
, so a simplesudo dnf install redhat-rpm-config
fixed that.