apgmera compilation failed

For scripts to aid with computation or simulation in cellular automata.
Post Reply
Ohhhhhhhhh
Posts: 146
Joined: August 19th, 2021, 5:56 am

apgmera compilation failed

Post by Ohhhhhhhhh »

This might also go to bugs & errors? I don't know. I guess I will post it again in that forum.
"./recompile.sh" just keeps failing and here are the details:
Device: a PC Lenovo Legion Y9000P IAX10H
OS: Windows 11 25H2 26200.8875
There is no primarily known issue I encountered with CPU, GPU or memory. No crashdown or anything stuck.
I cloned apgmera in its newest version which seems to be broken (pipeline failed?), both on a Windows folder and on a Cygwin folder. After download completes, I ran compilation as according to the instructions: "./recompile.sh" and "bash recompile.sh" both tried, but there is the following error:

Code: Select all

: invalid optionne 2: set: -
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
recompile.sh: line 3: $'\r': command not found
chmod: cannot access '*.sh'$'\r': No such file or directory
recompile.sh: line 5: $'\r': command not found
recompile.sh: line 7: $'true\r': command not found
recompile.sh: line 8: $'true\r': command not found
'.  Stop. No rule to make target 'clean
recompile.sh: line 10: $'\r': command not found
recompile.sh: line 12: $'true\r': command not found
recompile.sh: line 13: $'\r': command not found
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
recompile.sh: line 20: $'\r': command not found
recompile.sh: line 24: syntax error near unexpected token `elif'
'ecompile.sh: line 24: `elif [ "${symmarg:0:1}" = "H" ]; then
Above using bash and

Code: Select all

: invalid optionne 2: set: -
set: usage: set [-abefhkmnptuvxBCEHPT] [-o option-name] [--] [-] [arg ...]
recompile.sh: line 3: $'\r': command not found
chmod: cannot access '*.sh'$'\r': No such file or directory
recompile.sh: line 5: $'\r': command not found
recompile.sh: line 7: $'true\r': command not found
recompile.sh: line 8: $'true\r': command not found
'.  Stop. No rule to make target 'clean
recompile.sh: line 10: $'\r': command not found
recompile.sh: line 12: $'true\r': command not found
recompile.sh: line 13: $'\r': command not found
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
grep: warning: stray \ before -
recompile.sh: line 20: $'\r': command not found
recompile.sh: line 24: syntax error near unexpected token `elif'
'ecompile.sh: line 24: `elif [ "${symmarg:0:1}" = "H" ]; then
Using "./", which are basically the same.
I am new to Linux and generally systems like that. I had a Windows 10 PC and used to use Cygwin for downloading and running certain code in Linux environment, but however I add certain components in Cygwin setup (already have list of plugins to install: git, make, gcc-g++, python, python 3 and a few others negligible), the errors are completely the same in text. I only read the docs from https://gitlab.com/apgoucher/apgmera and asked Gemini about a few trivial things, it said the "pipeline failed" text tells that the code collapsed or didn't match certain standards.
Question:
1. What should I do? In particular, can I still use this version downloaded in my laptop? If not, how can I use apgmera (or other applicable resources?) to contribute to the Hatsya Catalogue?
2. I searched for similar problems & solutions on the Forums and one result popped out here: https://conwaylife.com/forums/viewtopic ... 36#p173636
Would the advice to use WSL2 be useful? What else should I provide to you, or can I do or search to solve this issue?
Thank you very much for reading until here. I will close all related topics (including the one in bugs & errors) if this turned out to be trivial and is clearly solved.
This is a block of text that can be added to posts you make. There is a 255 character limit.

something useless:

Code: Select all

#CXRLE Pos=-8,-6
x = 11, y = 10, rule = B3/S23
5bo$6bo$4b3o$9b2o$9b2o3$3o$2bo$bo!
amling
Posts: 1255
Joined: April 2nd, 2020, 9:47 pm

Re: apgmera compilation failed

Post by amling »

Ohhhhhhhhh wrote: August 2nd, 2026, 6:20 am "./recompile.sh" just keeps failing and here are the details:
I have no particular knowledge about apgmera, or Windows, but my read of that error, as a general software problem solver, is that that file (recompile.sh) has DOS/Windows line ends and thus when interpreted faithfully by bash does a bunch of terrible things that make no sense (mostly spew errors about strings containing CRs). I see that file came from the repo, and I assume that the checked in version has UNIX line ends although I'm stuck on my cell phone at the moment and can't so easily verify. Also unfortunately I have little idea why it would be mangled that way on your computer or how it is intended to be checked out on Windows. I know git has some line end translation features and that is my best guess, but I have no idea how they are configured or how to figure out if they are enabled (unhelpfully) in your checkout.
Ohhhhhhhhh
Posts: 146
Joined: August 19th, 2021, 5:56 am

Re: apgmera compilation failed

Post by Ohhhhhhhhh »

amling wrote: August 2nd, 2026, 9:11 pm
Ohhhhhhhhh wrote: August 2nd, 2026, 6:20 am "./recompile.sh" just keeps failing and here are the details:
DOS/Windows line ends
Thanks for your reply, I now realized that it really is because of line ending issues. I did not do any modification so maybe the contributors submitted their edits with Win/other OS and did not check endline. I will try some changes before end of today.
This is a block of text that can be added to posts you make. There is a 255 character limit.

something useless:

Code: Select all

#CXRLE Pos=-8,-6
x = 11, y = 10, rule = B3/S23
5bo$6bo$4b3o$9b2o$9b2o3$3o$2bo$bo!
Post Reply