Error compiling apgsearch v5.0

Has something gone haywire? Let us know about it!
Post Reply
User avatar
creeperman7002
Posts: 299
Joined: December 4th, 2018, 11:52 pm

Error compiling apgsearch v5.0

Post by creeperman7002 » February 22nd, 2020, 1:01 am

I followed the steps in the tutorial for compiling and using apgsearch. When I tried to enter ./recompile.sh, this error popped up:

Code: Select all

$ ./recompile.sh
rm -f *.o */*.o *.op */*.op *.gdca */*.gcda *.profraw *.profdata apgluxe
echo Clean done
Clean done
Skipping updates; use --update to update apgluxe automatically.
Downloading lifelib...
Submodule 'lifelib' (https://gitlab.com/apgoucher/lifelib.git) registered for path 'lifelib'
Cloning into '/home/YouWIllNeverKnow/apgmera/lifelib'...
Submodule path 'lifelib': checked out '3749afe4a8fd293721781a9fd949d14c1dcd0050'
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
which: no python3 in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Users/YouWIllNeverKnow/AppData/Local/Microsoft/WindowsApps)
Using  to configure lifelib...
./recompile.sh: line 87: /cygdrive/c/Users/YouWIllNeverKnow/AppData/Local/Microsoft/WindowsApps/python3: Permission denied
Any ideas on how to fix this?
B2n3-jn/S1c23-y is an interesting rule. It has a replicator, a fake glider, an OMOS and SMOS, a wide variety of oscillators, and some signals. Also this rule is omniperiodic.
viewtopic.php?f=11&t=4856

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Error compiling apgsearch v5.0

Post by wildmyron » February 22nd, 2020, 2:09 am

It looks like you don't have any version of Python installed. When you installed Cygwin did you check which extra packages to install? For apgmera you need git, make, python2 or python3, and gcc-g++. You can install extra packages by running the installer again.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
creeperman7002
Posts: 299
Joined: December 4th, 2018, 11:52 pm

Re: Error compiling apgsearch v5.0

Post by creeperman7002 » February 22nd, 2020, 11:27 am

wildmyron wrote:
February 22nd, 2020, 2:09 am
It looks like you don't have any version of Python installed. When you installed Cygwin did you check which extra packages to install? For apgmera you need git, make, python2 or python3, and gcc-g++. You can install extra packages by running the installer again.
When this error popped up, I installed python2, but the error is persisting.
B2n3-jn/S1c23-y is an interesting rule. It has a replicator, a fake glider, an OMOS and SMOS, a wide variety of oscillators, and some signals. Also this rule is omniperiodic.
viewtopic.php?f=11&t=4856

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Error compiling apgsearch v5.0

Post by wildmyron » February 22nd, 2020, 9:47 pm

I think I know what's happening now: I previously read about this issue and just remembered. What's happening is that Windows has installed two dummy python executables which are used to open the Python installers from the Windows store [1]. The recompile.sh script detects the python3.exe "shim" as an installed python3, but of course the rest of the process fails when it tries to use it. The build process preferentially uses python3 so it never gets to see your actual python2 install.

To resolve this you can either:
- install python3 in Cygwin and make sure it's earlier on the Path than the shim (which it should be),
- follow the advice in this stack overflow post to disable the shims https://stackoverflow.com/a/58773979 , or
- wait for apgoucher to provide a work around in the recompile.sh script


[1] https://devblogs.microsoft.com/python/p ... 19-update/
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
creeperman7002
Posts: 299
Joined: December 4th, 2018, 11:52 pm

Re: Error compiling apgsearch v5.0

Post by creeperman7002 » February 22nd, 2020, 10:17 pm

I tried the 1st option and it worked, but I now have this error:

Code: Select all

g++ -c -Wall -Wextra -pedantic -O3 -pthread -flto -march=native --std=c++11  main.cpp -o main.o
In file included from /usr/include/wchar.h:6:0,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/cwchar:44,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/bits/postypes.h:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iosfwd:40,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ios:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/ostream:38,
                 from /usr/lib/gcc/x86_64-pc-cygwin/7.4.0/include/c++/iostream:39,
                 from main.cpp:1:
/usr/include/sys/reent.h:14:10: fatal error: stddef.h: No such file or directory
 #include <stddef.h>
          ^~~~~~~~~~
compilation terminated.
make: *** [makefile:81: main.o] Error 1
EDIT: I installed gcc-core (and made sure the version is the same as gcc-g++) and apgsearch works perfectly.
Last edited by creeperman7002 on February 23rd, 2020, 6:40 pm, edited 1 time in total.
B2n3-jn/S1c23-y is an interesting rule. It has a replicator, a fake glider, an OMOS and SMOS, a wide variety of oscillators, and some signals. Also this rule is omniperiodic.
viewtopic.php?f=11&t=4856

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Error compiling apgsearch v5.0

Post by wildmyron » February 23rd, 2020, 10:58 am

Sorry, I can't help you with that one. That seems like a pretty standard header, I can't imagine why it would be missing / not found by the compiler.

Searching for that error message led me to https://stackoverflow.com/questions/316 ... 3#32410193
That may be relevant, but if you have a fresh Cygwin install I don't see how you could end up in that state.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

Post Reply