gofer icon indicating copy to clipboard operation
gofer copied to clipboard

Run Gofer directly from Docker

Open codepitbull opened this issue 3 years ago • 5 comments

Not sure you are interested in this. I wanted to reproduce some stuff rom a a paper which was using Gofer. Since Gofer doesn't build on Mac OS X I decided to package it into a container. This allows executing Gofer on any platform. The build is a multi-stage build, so the results are pretty compact.

https://gist.github.com/codepitbull/ad1cfdc6a53da532c28af337414fd796

Using this you get Gofer on all OSs with a working Docker-installation.

Might be worth adding to your docs or even provide a dedicated container from the central Docker-registry.

Feel free to do whatever you feel like. If you have questions just leave them here :)

Cheers, and thanks for your work :)

codepitbull avatar Sep 04 '21 22:09 codepitbull

Thanks for the docker heads up. Will come back to it a bit later. For now a quickie re mac building.

A colleague told me that mac had been compiled a few months ago

Can you change in the src/prelude.h file as follows: Make #define NETBSD 1 // line 46 and everything else 0. in particular #define LINUX 0 // line 38

And build

Let me know if it works/doesnt?

rusimody avatar Sep 05 '21 13:09 rusimody

I tried what you suggested. Enabled NETBSD and disabling LINUX on my Mac OS X 10.15.7. Running make in src-dir causes the following errors:

gcc -c -O builtin.c In file included from builtin.c:52: ./prims.c:1583:9: error: implicit declaration of function 'access' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (access(s,0)!=0) /* can't find file */ ^ ./prims.c:1620:9: error: implicit declaration of function 'access' is invalid in C99 [-Werror,-Wimplicit-function-declaration] if (access(s,0)!=0) /* can't find file? */

codepitbull avatar Sep 07 '21 16:09 codepitbull

Sorry for long gap. I fixed the implicit declaration of function 'access' a few months ago (on my Linux box) but forgot about this pending bug -- I really dont have access(!) to a Mac. It seems the same issue -- just that on Linux it shows as a warning and you seem to get an error.

Would you mind checking out again?

rusimody avatar Jul 07 '22 06:07 rusimody

About your docker work: First thanks for the work!!

At first attempt it seems to work. But I wonder isn't there duplication? Do you really need emacs, git twice?

[This is my first use of docker so you can assume I know nothing!]

rusimody avatar Jul 07 '22 13:07 rusimody

I tried compiling it on mac ( M1 Macbook pro ) and it successfully compiled using the gcc from brew ( mac os by default uses clang).

ItsTalha0 avatar Apr 13 '23 18:04 ItsTalha0