Closed pradermecker closed 11 years ago
This is an issue with hruby.
You might try to get it (cabal unpack hruby), tweak the pathes (just edit what's in cbits1.8 and hruby.cabal), and reinstall it (cabal install -p). Please let me know how it went if you try this !
If you do not wish to try, or it doesn't work, please let me know how you installed ruby 2.0 so that I have a chance to get the paths right next week.
Well somehow it is not that simple at least with archlinux
.
The difficulties is in the shim.h
file. ruby.h
is located at /usr/include/ruby-2.0.0
but if I use this path, I have got an exception because inside ruby.h
there is another include to ruby/config.h
. It fails because the config.h
file is actually located at /usr/include/ruby-2.0.0/x86_64-linux/ruby/config.h
I guess I can make a symlink to make it work but it does not feel right given there has been a bug about this that had been rejected a while a ago: http://bugs.ruby-lang.org/issues/show/2317
There must be a less hackish way to do this ?
It seems that the "right way" is to run some ruby program (mkmf.rb) that should know where the files are. It doesn't seem to work for me however :
» ruby /usr/lib/ruby/1.8/mkmf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
You might be able to add the correct path in the cabal file using
cc-options: -I/usr/include/ruby-2.0.0/x86_64-linux/ruby
I will try to install arch linux to check this.
Ok Ruby 2 is not compatible without modifications in hruby ... this will unfortunately be fixed only next week ...
next week is fine by me. Thanks !
I changed a ton of things during lunch. Would you mind giving it a try ?
For ruby 2, you need to compile hruby like this :
cabal install -p -f ruby20
It builds !
How can I test it further ? I have only one exec called ReadArgsEx
. Should I use an ghci session ?
I had wondered also what the module provides beyond puppet parser validate
on the validation front (I know it can give valuable information about the config graph).
Thanks for your help.
Well it can do tons of things, which I'd be happy tell you about. The big use cases (at least, that's what I do daily) are :
You can find me on #haskell if you need more responsive help !
BTW, I don't think the ReadArgsEx is something from these packages, you should have a "puppetresources" executable once you build language-puppet.
That's weird. I am building this with cabal-dev
. There is no language-puppet in cabal-dev/bin
Weird ... are you sure you did checkout de "beta" branch before building ?
Oups it slipped my mind ;-)
I will have to figure out how to test this exactly as my catalogs rely on hiera and custom fact to pull up the correct config for a node (maybe a dedicated wm where I can safely tweak the local facts). I will give it a go and let you know.
Thanks for your help
I unfortunately do not support Hiera yet, and custom facts are "hard" to add (you have to add stuff in Facter.hs).
You can collect those facts through the PuppetDB connection though.
As for Hiera, I do not use it, so I have no idea how this really works. For a while the documentation was ... sketchy. This will come however.
hruby does not allow me to test
language-puppet
(the beta branch) with ruby 2.xI don't know what is involved to make hruby 2.0 compliant.