in reply to Failing to Autogenerate config in Inline.PM

Does it work if you don't specify a DIRECTORY (it should make an _Inline directory in the current directory)? One reason it may fail to generate is if it fails when calling an Inline::XX module's register() method. Notably, make sure you don't have Inline::Config installed on your machine (this is old and may cause trouble).
  • Comment on Re: Failing to Autogenerate config in Inline.PM

Replies are listed 'Best First'.
Re: Re: Failing to Autogenerate config in Inline.PM
by sierrathedog04 (Hermit) on Jul 04, 2001 at 02:17 UTC
    No, Inline::Config is not installed, because when I try to use 'Inline::Config' I get an error message saying that the file could not be found in @INC.

    In answer to your helpful questions, if I do not specify any directory in my script then I then get the same error message as I did when I specified .Inline/. The error message says that it cannot autogenerate a config file in .Inline/. (.Inline/ is the default according to my reading of perldoc)

    If I remove the .Inline directory and I do not specify a directory then the error message says "Couldn't find an appropriate directory for Inline to use". Which is interesting, because I thought it would create such a directory for me, but it does not.

    Thanks for your help. Getting recalcitrant modules to run is a lot of work.

      Well, it works for me under 5.6.1 if I create the .Inline directory first. This may be a 5.005 problem. Can you run the following (with appropriate paths):

      use strict; use Inline (Config => DIRECTORY => '/home/ned/.Inline',); use Inline 'C'; greet('Ingy'); greet(42); __END__ __C__ void greet(char* name) { printf("Hello %s!\n", name); }

      On my system, it writes a config file in /home/ned/.Inline/config that looks like:

      version : 0.42 languages : % C : C Foo : Foo c : C foo : Foo types : % C : compiled Foo : interpreted modules : % C : Inline::C Foo : Inline::Foo suffixes : % C : so Foo : foo
        Thank you very much BikeNomad. I ran your script, and I got the same error message as before, saying that the autogeneration of the config failed.

        It is reasonably apparent that I am dealing with either a 5.005 problem or a circa 1997 NCR MP-RAS Unix problem.

        I am not even certain that XS or Swig would work, assuming that I had the time and skills to coerce them to do so.

        Therefore: PLAN B. Instead of calling C from Perl, I will have Perl write its input to a special file. A C program called with backticks will read the input and print the output.

        Not the most elegant way to do things, but the best option now that the Inline.pm/MP-RAS/5.005 combination has proven to be a big problem.