rperl icon indicating copy to clipboard operation
rperl copied to clipboard

Dockerized image on Docker Hub

Open symgryph opened this issue 6 years ago • 5 comments

https://hub.docker.com/r/symgryph/rperl/

symgryph avatar Jun 27 '18 02:06 symgryph

@symgryph Great work, thanks for posting this! Here are a few typos I found in your Docker page, please let me know when you have updated it:

"This is a Centos version of the RPERL compiler." should be "This is a CentOS version of the RPerl compiler."

"Centos version 7.5.1804" should be "CentOS version 7.5.1804"

"assuming you want to mount /home/myuser/perl/ as your directory to conver (mnt in the docker container)t:" should be "assuming you want to mount /home/myuser/perl/ as your directory to convert (mnt in the docker container):"

"Learning Rperl Document" should be "Learning RPerl Document"

wbraswell avatar Jun 27 '18 09:06 wbraswell

@Util Can you please do a brief check to see if this RPerl-in-CentOS Docker image works on your computer, and can successfully run the rperl -? command (at least)?

wbraswell avatar Jun 27 '18 09:06 wbraswell

On Jun 27, 2018, at 4:55 AM, William N. Braswell, Jr. [email protected] wrote:

@Util https://github.com/Util Can you please do a brief check to see if this RPerl-in-CentOS Docker image works on your computer, and can successfully run the rperl -? command (at least)?

@wbraswell SUMMARY: image is broken, and I want to contact symgryph to get the Dockerfile he used to build it.

I just got my Docker un-broken on the new laptop over the weekend, and "kicked the tires" on the new "RPerl-in-CentOS" Docker image.

rperl -? and rperl --version work as expected. However, the build is fragile, and cannot use built-in modules.

If I take a minimal working "hello world" RPerl program, and add the line: use File::Find; , I get the error: ERROR ECOCODE00, COMPILER, FIND DEPENDENCIES: File not found, 'sr/share/perl5/File/Find.pm', dying If I use a module that is installed in vendor_perl, like this: use Carp; , I get the error: ERROR ECOCODE00, COMPILER, FIND DEPENDENCIES: File not found, 'sr/share/perl5/vendor_perl/Carp.pm', dying

So, I think that something is wrong in @INC, like an embedded newline between '/u' and 'sr/'. I cannot inspect @INC, because when I add this code to a working minimal program: foreach my string $INC_directory (@INC) { print $INC_directory, "\n"; } , the RPerl parser dies with this error: Unexpected Token: @INC)

To best debug what is going wrong, I need the Dockerfile that was used to build the "RPerl-in-CentOS" Docker image I do not see that file in any branch of https://github.com/symgryph/rperl , nor is it referenced in https://hub.docker.com/r/symgryph/rperl/ . I can contact symgryph directly to ask him (cc'ing you of course), or you can continue to drive the discussion. How would you like to proceed?

— Bruce Gray

Util avatar Jul 02 '18 13:07 Util

@symgryph Please provide us with the Dockerfile as described above.

@Util RPerl is not meant to parse normal Perl code in the way you are attempting to use it, the RPerl grammar is very restrictive. If you want to use normal Perl syntax freely intermixed with RPerl syntax, then you can just run an RPerl program through the normal perl interpreter instead of the rperl compiler command. Your mixed-syntax code will be interpreted only, so the restrictive RPerl grammar will not come into play. Also, when run in compiled mode RPerl must compile all dependencies, so you can expect further RPerl grammar errors when including non-RPerl modules such as "File::Find" or basically any other Perl module which is not purposefully written using the restricted RPerl syntax. Again, this is easily side-stepped by simply running such code in interpreted mode only using perl instead of rperl. ... That being said, I believe you are correct about there being some odd error with @INC or other dependency directory mechanisms, because 'sr/share/perl5/vendor_perl/Carp.pm' sure seems like it should be '/usr/share/perl5/vendor_perl/Carp.pm'...

wbraswell avatar Jul 02 '18 17:07 wbraswell

@Util @symgryph I am now circling back to this issue, Bruce I need you to please make a pull request from your forked repo of RPerl back into this main repo, so that we can inherit your Dockerfiles as they are now.

wbraswell avatar Apr 27 '19 17:04 wbraswell