I need to run my project on a Raspberry Pi 3. Simply copying the binary over there doesn’t work, because it’s ARM and 32-bit. So I then installed Cabal on my development machine (was using Stack), did cabal new-build
and tested that the binary works properly, and used cabal freeze
(do I need to use new-freeze
here or does it not matter?) to generate a dependency lock file. I copied the project and the freeze file onto Raspberry Pi, installed Cabal there, increased swap memory size to 2GB, and ran cabal new-build
. After a whole day, it managed to build. But trying to run the executable with cabal new-run project-name
or ./project-name
gives the following:
hideout-backend-exe: unknown RTS option: -N
hideout-backend-exe:
hideout-backend-exe: Usage: <prog> <args> [+RTS <rtsopts> | -RTS <args>] ... --RTS <args>
hideout-backend-exe:
hideout-backend-exe: +RTS Indicates run time system options follow
hideout-backend-exe: -RTS Indicates program arguments follow
hideout-backend-exe: --RTS Indicates that ALL subsequent arguments will be given to the
hideout-backend-exe: program (including any of these RTS flags)
hideout-backend-exe:
hideout-backend-exe: The following run time system options are available:
hideout-backend-exe:
hideout-backend-exe: -? Prints this message and exits; the program is not executed
hideout-backend-exe: --info Print information about the RTS used by this program
hideout-backend-exe:
hideout-backend-exe: -K<size> Sets the maximum stack size (default: 80% of the heap)
hideout-backend-exe: Egs: -K32k -K512k -K8M
hideout-backend-exe: -ki<size> Sets the initial thread stack size (default 1k) Egs: -ki4k -ki2m
hideout-backend-exe: -kc<size> Sets the stack chunk size (default 32k)
hideout-backend-exe: -kb<size> Sets the stack chunk buffer size (default 1k)
hideout-backend-exe:
hideout-backend-exe: -A<size> Sets the minimum allocation area size (default 1m) Egs: -A20m -A10k
hideout-backend-exe: -AL<size> Sets the amount of large-object memory that can be allocated
hideout-backend-exe: before a GC is triggered (default: the value of -A)
hideout-backend-exe: -n<size> Allocation area chunk size (0 = disabled, default: 0)
hideout-backend-exe: -O<size> Sets the minimum size of the old generation (default 1M)
hideout-backend-exe: -M<size> Sets the maximum heap size (default unlimited) Egs: -M256k -M1G
hideout-backend-exe: -H<size> Sets the minimum heap size (default 0M) Egs: -H24m -H1G
hideout-backend-exe: -xb<addr> Sets the address from which a suitable start for the heap memory
hideout-backend-exe: will be searched from. This is useful if the default address
hideout-backend-exe: clashes with some third-party library.
hideout-backend-exe: -m<n> Minimum % of heap which must be available (default 3%)
hideout-backend-exe: -G<n> Number of generations (default: 2)
hideout-backend-exe: -c<n> Use in-place compaction instead of copying in the oldest generation
hideout-backend-exe: when live data is at least <n>% of the maximum heap size set with
hideout-backend-exe: -M (default: 30%)
hideout-backend-exe: -c Use in-place compaction for all oldest generation collections
hideout-backend-exe: (the default is to use copying)
hideout-backend-exe: -w Use mark-region for the oldest generation (experimental)
hideout-backend-exe: -I<sec> Perform full GC after <sec> idle time (default: 0.3, 0 == off)
hideout-backend-exe:
hideout-backend-exe: -T Collect GC statistics (useful for in-program statistics access)
hideout-backend-exe: -t[<file>] One-line GC statistics (if <file> omitted, uses stderr)
hideout-backend-exe: -s[<file>] Summary GC statistics (if <file> omitted, uses stderr)
hideout-backend-exe: -S[<file>] Detailed GC statistics (if <file> omitted, uses stderr)
hideout-backend-exe:
hideout-backend-exe:
hideout-backend-exe: -Z Don't squeeze out update frames on stack overflow
hideout-backend-exe: -B Sound the bell at the start of each garbage collection
hideout-backend-exe:
hideout-backend-exe: -h Heap residency profile (output file <program>.hp)
hideout-backend-exe: -i<sec> Time between heap profile samples (seconds, default: 0.1)
hideout-backend-exe:
hideout-backend-exe: -C<secs> Context-switch interval in seconds.
hideout-backend-exe: 0 or no argument means switch as often as possible.
hideout-backend-exe: Default: 0.02 sec.
hideout-backend-exe: -V<secs> Master tick interval in seconds (0 == disable timer).
hideout-backend-exe: This sets the resolution for -C and the heap profile timer -i,
hideout-backend-exe: and is the frequence of time profile samples.
hideout-backend-exe: Default: 0.01 sec.
hideout-backend-exe:
hideout-backend-exe: --install-signal-handlers=<yes|no>
hideout-backend-exe: Install signal handlers (default: yes)
hideout-backend-exe: -e<n> Maximum number of outstanding local sparks (default: 4096)
hideout-backend-exe: -xq The allocation limit given to a thread after it receives
hideout-backend-exe: an AllocationLimitExceeded exception. (default: 100k)
hideout-backend-exe:
hideout-backend-exe: -Mgrace=<n>
hideout-backend-exe: The amount of allocation after the program receives a
hideout-backend-exe: HeapOverflow exception before the exception is thrown again, if
hideout-backend-exe: the program is still exceeding the heap limit.
hideout-backend-exe:
hideout-backend-exe: RTS options may also be specified using the GHCRTS environment variable.
hideout-backend-exe:
hideout-backend-exe: Other RTS options may be available for programs compiled a different way.
hideout-backend-exe: The GHC User's Guide has full details.
hideout-backend-exe:
It doesn’t even look like an error, just some information. How can I solve this?
I’ve only had experience with Stack before. I tried to use Stack on Pi but Stack told me it only has binaries for 64 bit. So I had to use Cabal.
The program is supposed to be a Servant server.