Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider switching away from Inline::C #32

Open
cpansprout opened this issue Jun 3, 2017 · 4 comments
Open

Please consider switching away from Inline::C #32

cpansprout opened this issue Jun 3, 2017 · 4 comments

Comments

@cpansprout
Copy link

The problem with using Inline::C, rather than compiling the C code at installation time, is that multiple users all end up with their own copies of the compiled C code in their home folders. (And Inline does not have the courtesy to use a hidden file name beginning with a dot!) Also, if I happen to upgrade Inline::C, then JavaScript::Duktape recompiles its C code all over again, which can be quite annoying if I am actually trying to get some work done. :-)

@mamod
Copy link
Owner

mamod commented Jun 21, 2017

@cpansprout I tried to do that once using Inline::Module and InlineX::XS with no success, I'll see if I can do this in next version so I'll keep this open for now, thank you

As for compiling in a different folder have you tried setting PERL_INLINE_DIRECTORY environment to the location where you want the compiled sources to be located?

@jomo666
Copy link

jomo666 commented Jul 1, 2017 via email

@cpansprout
Copy link
Author

cpansprout commented Jul 29, 2017

It turns out that Inline is supposed to support compiling the code at install time. You just need to do use Inline::MakeMaker instead of ExtUtils::MakeMaker. (Interestingly, JavaScript::Duktape declares a configure dependency on Inline::MakeMaker but does not use it currently.) However, there is a snag:

Invalid version '2.2.1' for JavaScript::Duktape.
Must be of the form '#.##'. (For instance '1.23')
 at Makefile.PL line 5

Inline is far too restrictive when it comes to version numbers. I have reported the bug at ingydotnet/inline-pm#62.

@ricardobeat
Copy link

ricardobeat commented Aug 23, 2017

A major downside of Inline::C is that it requires a C compiler to be installed on the machine, even if it's a production server. If one uses system packages for installing precompiled dependencies, this is a very undesirable exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants