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

gofer: init at 2.30a #100171

wants to merge 1 commit into
base: master

gofer: init at 2.30a #100171

wants to merge 1 commit into from


Copy link

@siraben siraben commented Oct 10, 2020

It builds but running the executable complains about lack of standard prelude, which has to be placed according in a location analogous to /usr/local/lib/Gofer.

You will need a directory which is available to all Gofer users on
your system to store prelude files etc.  You can choose this to be
whatever you like.  I'll just call it $GOFLIB here.  On Unix systems,
I usually use /usr/local/lib/Gofer or a subdirectory of my home
directory, Gofer/lib.  On DOS systems, I suggest C:\GOFER\LIB.
$ ./result/bin/gofc hello.hs    
Gofer->C Version 1.03 (2.30b)  Copyright (c) Mark P Jones 1992-1995

Reading script file "standard.prelude":
ERROR "standard.prelude": Unable to open file
Aborting compilation
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits
@ofborg ofborg bot added the 6.topic: golang label Oct 10, 2020
@siraben siraben force-pushed the siraben:gofer-init branch from e9b4c8f to a668d61 Oct 10, 2020
Copy link
Contributor Author

@siraben siraben commented Oct 12, 2020

Note that goferc doesn't work since it's a shell script has hardcoded paths.

$ ./result/bin/goferc hello.hs 
./result/bin/goferc: line 34: /usr/local/lib/Gofer/gofc: No such file or directory
[Compiling with gcc]
clang: error: no such file or directory: './hello.c'
clang: error: no such file or directory: '/usr/local/lib/Gofer/runtime.o'
error: /Applications/
@siraben siraben force-pushed the siraben:gofer-init branch from a668d61 to 0ee3ad1 Oct 12, 2020
Copy link
Contributor Author

@siraben siraben commented Oct 12, 2020

I'm not entirely sure how to go about doing this, but the tar.gz file that is downloaded has the following directory structure. Nix seems to cd into the src directory, but files such as standard.prelude need to be copied into $out/lib for the goferc executable to work.

├── [1.2K]  Readme
├── [4.2K]
├── [ 29K]  cc.prelude
├── [1.2K]  demos
├── [1.1K]  docs
├── [ 288]  docsrc
├── [4.1K]  gofer.el
├── [740K]  gofer230a.tar.gz
├── [1.6K]
├── [2.1K]
├── [1.0K]  min.prelude
├── [ 27K]  nofloat.prelude
├── [ 192]  scripts
├── [ 19K]  simple.prelude
├── [1.3K]  src
└── [ 27K]  standard.prelude

 862K used in 5 directories, 11 files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.