Page 1 of 22

apgsearch v4.0

Posted: August 19th, 2017, 11:04 am
by calcyman
The following new features have been added (since 3.x):
  • Better object separation for non-B0 life-like rules;
  • Support for B0 rules (to a certain extent);
  • Support for generations rules;
  • HashLife-based period detection and higher maximum oscillator/spaceship period (1000000);
  • Extra symmetries: 1x256, 2x128, 4x64.
It's in the usual place, namely https://gitlab.com/apgoucher/apgmera.

The first time you run recompile.sh, it will initialise and clone the git submodule 'lifelib' before proceeding as usual.

Please let me know of any bugs or limitations (in particular, can someone please confirm whether it works on Cygwin?).

Re: apgsearch v4.0

Posted: August 19th, 2017, 12:05 pm
by muzik
OMG YES

Let's see if I remember how to set this baby up just like I did with 3.0.


EDIT: Wouldn't it be better to name it something other than "apgmera", so I can keep both 3.x and 4.x? You did say that the former runs slightly faster, so I want to continue to use that where possible.

Re: apgsearch v4.0

Posted: August 19th, 2017, 12:14 pm
by Apple Bottom
calcyman wrote:Please let me know of any bugs or limitations (in particular, can someone please confirm whether it works on Cygwin?).
Excellent -- will try this as soon as I'm home!

Re: apgsearch v4.0

Posted: August 19th, 2017, 2:44 pm
by drc
There's a bit of an issue with separation, seen here and here.
Also this:

Code: Select all

$ ./recompile.sh --rule 12/34/3
Downloading lifelib...
fatal: Not a git repository (or any of the parent directories): .git
I downloaded gcc-g++, git, and make, as well as those recommended files. Anything missing?

Re: apgsearch v4.0

Posted: August 19th, 2017, 3:37 pm
by calcyman
drc wrote:There's a bit of an issue with separation, seen here and here.
Yes, I haven't adapted the careful separation routines to handle multistate rules yet.
Also this:

Code: Select all

$ ./recompile.sh --rule 12/34/3
Downloading lifelib...
fatal: Not a git repository (or any of the parent directories): .git
I downloaded gcc-g++, git, and make, as well as those recommended files. Anything missing?
How did you download the repository? Try:

Code: Select all

git clone --recursive https://gitlab.com/apgoucher/apgmera.git
if the script can't download lifelib automatically.

Re: apgsearch v4.0

Posted: August 19th, 2017, 3:43 pm
by drc
calcyman wrote:How did you download the repository? Try:

git clone --recursive https://gitlab.com/apgoucher/apgmera.git

if the script can't download lifelib automatically.
I downloaded it as a .zip from the gitlab link.

Unfortunately it gives the same error, after the clone thing finished:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4
$ git clone --recursive https://gitlab.com/apgoucher/apgmera.git
Cloning into 'apgmera'...
remote: Counting objects: 321, done.
remote: Compressing objects: 100% (185/185), done.
remote: Total 321 (delta 199), reused 226 (delta 136)
Receiving objects: 100% (321/321), 402.14 KiB | 2.50 MiB/s, done.
Resolving deltas: 100% (199/199), done.
Submodule 'lifelib' (https://gitlab.com/apgoucher/lifelib.git) registered for path 'lifelib'
Cloning into '/home/Daniel/apgmerav4/apgmera/lifelib'...
remote: Counting objects: 198, done.
remote: Compressing objects: 100% (125/125), done.
remote: Total 198 (delta 122), reused 131 (delta 73)
Receiving objects: 100% (198/198), 340.26 KiB | 2.45 MiB/s, done.
Resolving deltas: 100% (122/122), done.
Submodule path 'lifelib': checked out '9ccfb5615e1cbbb482986ede6918c38cfa3c84ac'

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4
$ ./recompile.sh --rule 12/34/3
Downloading lifelib...
fatal: Not a git repository (or any of the parent directories): .git

Re: apgsearch v4.0

Posted: August 19th, 2017, 3:54 pm
by calcyman
drc wrote:
calcyman wrote:How did you download the repository? Try:

git clone --recursive https://gitlab.com/apgoucher/apgmera.git

if the script can't download lifelib automatically.
I downloaded it as a .zip from the gitlab link.

Unfortunately it gives the same error, after the clone thing finished:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4
$ git clone --recursive https://gitlab.com/apgoucher/apgmera.git
Cloning into 'apgmera'...
remote: Counting objects: 321, done.
remote: Compressing objects: 100% (185/185), done.
remote: Total 321 (delta 199), reused 226 (delta 136)
Receiving objects: 100% (321/321), 402.14 KiB | 2.50 MiB/s, done.
Resolving deltas: 100% (199/199), done.
Submodule 'lifelib' (https://gitlab.com/apgoucher/lifelib.git) registered for path 'lifelib'
Cloning into '/home/Daniel/apgmerav4/apgmera/lifelib'...
remote: Counting objects: 198, done.
remote: Compressing objects: 100% (125/125), done.
remote: Total 198 (delta 122), reused 131 (delta 73)
Receiving objects: 100% (198/198), 340.26 KiB | 2.45 MiB/s, done.
Resolving deltas: 100% (122/122), done.
Submodule path 'lifelib': checked out '9ccfb5615e1cbbb482986ede6918c38cfa3c84ac'

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4
$ ./recompile.sh --rule 12/34/3
Downloading lifelib...
fatal: Not a git repository (or any of the parent directories): .git
It looks like you're trying to run ./recompile.sh from within /home/Daniel/apgmerav4, when you should be in the directory /home/Daniel/apgmerav4/apgmera (where you unpacked the repository). Maybe you tried changing the directory structure?

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:04 pm
by muzik
How exactly does one set up apgsearch again? I'm using the method that was detailed right about here (although obviously not installing cygwin etc. all over again, since it should still work with the existing setup), using the same link that was posted on said thread since it presumably always links to the newest version, which I would assume to be 4.0 since it's still apgmera, and it definitely downloads something with a different filename than v3.x which is promising. I don't get anything successful when I get to typing the "unzip apgmera.zip" bit.

Have I been stupid enough to miss an obvious crucial step, or is the existing apgsearch v3.x interfering?


EDIT: Unrelated and probably known of, but object separation could really use a bit of work here.

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:09 pm
by drc
calcyman wrote:It looks like you're trying to run ./recompile.sh from within /home/Daniel/apgmerav4, when you should be in the directory /home/Daniel/apgmerav4/apgmera (where you unpacked the repository). Maybe you tried changing the directory structure?
Okay, I tried changing the directory, and I got this:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./recompile.sh --rule 12/34/3
Skipping updates; use --update to update apgmera automatically.
Symmetry unspecified; assuming C1.
Configuring rule 12; symmetry C1
./recompile.sh: line 72: python: command not found
Sorry this is being difficult, I have no idea what's going on.

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:21 pm
by gmc_nxtman
Apologies for adding another customer to the conversation, but I followed all the above directions and am now getting this error:

Code: Select all

apgmera$ make
g++ -c -Wall -O3 -march=native --std=c++11 main.cpp -o main.o
main.cpp:25:10: fatal error: 'includes/params.h' file not found
#include "includes/params.h"

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:28 pm
by calcyman
gmc_nxtman wrote:Apologies for adding another customer to the conversation, but I followed all the above directions and am now getting this error:

Code: Select all

apgmera$ make
g++ -c -Wall -O3 -march=native --std=c++11 main.cpp -o main.o
main.cpp:25:10: fatal error: 'includes/params.h' file not found
#include "includes/params.h"
The command to build apgmera (v3 and v4 alike) is ./recompile.sh rather than make.
drc wrote:Okay, I tried changing the directory, and I got this:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./recompile.sh --rule 12/34/3
Skipping updates; use --update to update apgmera automatically.
Symmetry unspecified; assuming C1.
Configuring rule 12; symmetry C1
./recompile.sh: line 72: python: command not found
Sorry this is being difficult, I have no idea what's going on.
That's better than the previous error; it means you need to re-run Cygwin's setup-x86_64 and include 'python' in the list of packages to install. Also include g++ again to make sure you have the latest version (Dave Greene had to do this to circumvent 'stoll is not a member of std' errors).

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:33 pm
by gmc_nxtman
calcyman wrote:
gmc_nxtman wrote:Apologies for adding another customer to the conversation, but I followed all the above directions and am now getting this error:

Code: Select all

apgmera$ make
g++ -c -Wall -O3 -march=native --std=c++11 main.cpp -o main.o
main.cpp:25:10: fatal error: 'includes/params.h' file not found
#include "includes/params.h"
The command to build apgmera (v3 and v4 alike) is ./recompile.sh rather than make.
I don't have any excuse for not remembering that :oops:

EDIT: Now it works. Thanks!

Re: apgsearch v4.0

Posted: August 19th, 2017, 4:37 pm
by calcyman
muzik wrote:How exactly does one set up apgsearch again? I'm using the method that was detailed right about here (although obviously not installing cygwin etc. all over again, since it should still work with the existing setup), using the same link that was posted on said thread since it presumably always links to the newest version, which I would assume to be 4.0 since it's still apgmera, and it definitely downloads something with a different filename than v3.x which is promising. I don't get anything successful when I get to typing the "unzip apgmera.zip" bit.
The method detailed on the apgmera homepage https://gitlab.com/apgoucher/apgmera is the official set of instructions, and doesn't require unzipping anything. To summarise:

1. (Re-)run your Cygwin setup (don't worry, it remembers your existing installation and only downloads/updates things as it needs to) and ensure 'g++', 'make', 'git', and 'python' are included.

2. Then run the following in a Cygwin terminal, to download apgmera, enter the directory, and compile it:

Code: Select all

git clone https://gitlab.com/apgoucher/apgmera.git
cd apgmera
./recompile.sh
If successful, you should get an ASCII-art picture of an eater2 and a couple of status lines from apgmera telling you its version. Then you can run it like so:

Code: Select all

./apgmera
gmc_nxtman wrote: I don't have any excuse for not remembering that :oops:

EDIT: Now it works. Thanks!
Wonderful! :)

Re: apgsearch v4.0

Posted: August 19th, 2017, 5:02 pm
by muzik
calcyman wrote:The method detailed on the apgmera homepage https://gitlab.com/apgoucher/apgmera is the official set of instructions, and doesn't require unzipping anything. To summarise:

1. (Re-)run your Cygwin setup (don't worry, it remembers your existing installation and only downloads/updates things as it needs to) and ensure 'g++', 'make', 'git', and 'python' are included.

2. Then run the following in a Cygwin terminal, to download apgmera, enter the directory, and compile it:

Code: Select all

git clone https://gitlab.com/apgoucher/apgmera.git
cd apgmera
./recompile.sh
If successful, you should get an ASCII-art picture of an eater2 and a couple of status lines from apgmera telling you its version. Then you can run it like so:

Code: Select all

./apgmera
I tried this, but it still says I'm on 3.28 and when I run the program with ./apgmera (.......) it still refuses B0 rules.

Re: apgsearch v4.0

Posted: August 19th, 2017, 5:28 pm
by drc
Hopefully this will be my last confusing error but this happens:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./recompile.sh --rule g3b34s12
Skipping updates; use --update to update apgmera automatically.
Symmetry unspecified; assuming C1.
Configuring rule g3b34s12; symmetry C1
Valid rulestring: g3b34s12
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
In file included from lifelib/avxlife/uli.h:4:0,
                 from lifelib/upattern.h:3,
                 from main.cpp:20:
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:18:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:19:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:34:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:35:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:48:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:49:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/sha256.cpp -o includes/sha256.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/md5.cpp -o includes/md5.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:157:2: error: ‘fd_set’ was not declared in this scope
  fd_set fds;
  ^
includes/happyhttp.cpp:158:12: error: ‘fds’ was not declared in this scope
  FD_ZERO( &fds );
            ^
includes/happyhttp.cpp:158:16: error: ‘FD_ZERO’ was not declared in this scope
  FD_ZERO( &fds );
                ^
includes/happyhttp.cpp:159:21: error: ‘FD_SET’ was not declared in this scope
  FD_SET( sock, &fds );
                     ^
includes/happyhttp.cpp:165:47: error: ‘select’ was not declared in this scope
  int r = select( sock+1, &fds, NULL, NULL, &tv);
                                               ^
includes/happyhttp.cpp:169:27: error: ‘FD_ISSET’ was not declared in this scope
  if( FD_ISSET( sock, &fds ) )
                           ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:333:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:868:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:928:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [makefile:45: includes/happyhttp.o] Error 1

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./apgmera -n 1000000 -k 07302002
-bash: ./apgmera: No such file or directory


Re: apgsearch v4.0

Posted: August 19th, 2017, 6:18 pm
by calcyman
muzik wrote:I tried this, but it still says I'm on 3.28 and when I run the program with ./apgmera (.......) it still refuses B0 rules.
Then do mv apgmera apgmera3 to rename your existing apgmera 3.28 into a directory called apgmera3 before running 'git clone'.
drc wrote:Hopefully this will be my last confusing error but this happens:

Code: Select all

g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:157:2: error: ‘fd_set’ was not declared in this scope
  fd_set fds;
  ^
includes/happyhttp.cpp:158:12: error: ‘fds’ was not declared in this scope
  FD_ZERO( &fds );
            ^
includes/happyhttp.cpp:158:16: error: ‘FD_ZERO’ was not declared in this scope
  FD_ZERO( &fds );
                ^
includes/happyhttp.cpp:159:21: error: ‘FD_SET’ was not declared in this scope
  FD_SET( sock, &fds );
                     ^
includes/happyhttp.cpp:165:47: error: ‘select’ was not declared in this scope
  int r = select( sock+1, &fds, NULL, NULL, &tv);
                                               ^
includes/happyhttp.cpp:169:27: error: ‘FD_ISSET’ was not declared in this scope
  if( FD_ISSET( sock, &fds ) )
                           ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:333:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:868:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:928:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [makefile:45: includes/happyhttp.o] Error 1

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./apgmera -n 1000000 -k 07302002
-bash: ./apgmera: No such file or directory

Okay, the problem is in the one part of the code which I didn't write.

Try inserting the line:

Code: Select all

#include <sys/select.h>
before the line:

Code: Select all

#include <sys/socket.h>
in includes/happyhttp.cpp and see if that changes anything.

Re: apgsearch v4.0

Posted: August 19th, 2017, 6:28 pm
by muzik
This does not look promising.

Code: Select all

$ ./recompile.sh
Downloading lifelib...
Submodule 'lifelib' (https://gitlab.com/apgoucher/lifelib.git) registered for path 'lifelib'
Cloning into 'lifelib'...
remote: Counting objects: 198, done.
remote: Compressing objects: 100% (125/125), done.
remote: Total 198 (delta 122), reused 131 (delta 73)
Receiving objects: 100% (198/198), 340.26 KiB | 0 bytes/s, done.
Resolving deltas: 100% (122/122), done.
Checking connectivity... done.
Submodule path 'lifelib': checked out '9ccfb5615e1cbbb482986ede6918c38cfa3c84ac'
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/sha256.cpp -o includes/sha256.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/md5.cpp -o includes/md5.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:157:2: error: ‘fd_set’ was not declared in this scope
  fd_set fds;
  ^
includes/happyhttp.cpp:158:12: error: ‘fds’ was not declared in this scope
  FD_ZERO( &fds );
            ^
includes/happyhttp.cpp:158:16: error: ‘FD_ZERO’ was not declared in this scope
  FD_ZERO( &fds );
                ^
includes/happyhttp.cpp:159:21: error: ‘FD_SET’ was not declared in this scope
  FD_SET( sock, &fds );
                     ^
includes/happyhttp.cpp:165:47: error: ‘select’ was not declared in this scope
  int r = select( sock+1, &fds, NULL, NULL, &tv);
                                               ^
includes/happyhttp.cpp:169:27: error: ‘FD_ISSET’ was not declared in this scope
  if( FD_ISSET( sock, &fds ) )
                           ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:333:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:868:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:928:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
makefile:45: recipe for target 'includes/happyhttp.o' failed
make: *** [includes/happyhttp.o] Error 1

And when i tried compiling it a second time:

Code: Select all

$ sh recompile.sh
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:157:2: error: ‘fd_set’ was not declared in this scope
  fd_set fds;
  ^
includes/happyhttp.cpp:158:12: error: ‘fds’ was not declared in this scope
  FD_ZERO( &fds );
            ^
includes/happyhttp.cpp:158:16: error: ‘FD_ZERO’ was not declared in this scope
  FD_ZERO( &fds );
                ^
includes/happyhttp.cpp:159:21: error: ‘FD_SET’ was not declared in this scope
  FD_SET( sock, &fds );
                     ^
includes/happyhttp.cpp:165:47: error: ‘select’ was not declared in this scope
  int r = select( sock+1, &fds, NULL, NULL, &tv);
                                               ^
includes/happyhttp.cpp:169:27: error: ‘FD_ISSET’ was not declared in this scope
  if( FD_ISSET( sock, &fds ) )
                           ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:333:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:868:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:928:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
makefile:45: recipe for target 'includes/happyhttp.o' failed
make: *** [includes/happyhttp.o] Error 1

No charm the third time:

Code: Select all

$ bash recompile.sh
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:157:2: error: ‘fd_set’ was not declared in this scope
  fd_set fds;
  ^
includes/happyhttp.cpp:158:12: error: ‘fds’ was not declared in this scope
  FD_ZERO( &fds );
            ^
includes/happyhttp.cpp:158:16: error: ‘FD_ZERO’ was not declared in this scope
  FD_ZERO( &fds );
                ^
includes/happyhttp.cpp:159:21: error: ‘FD_SET’ was not declared in this scope
  FD_SET( sock, &fds );
                     ^
includes/happyhttp.cpp:165:47: error: ‘select’ was not declared in this scope
  int r = select( sock+1, &fds, NULL, NULL, &tv);
                                               ^
includes/happyhttp.cpp:169:27: error: ‘FD_ISSET’ was not declared in this scope
  if( FD_ISSET( sock, &fds ) )
                           ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:333:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:868:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:928:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
includes/happyhttp.cpp: In function ‘bool happyhttp::datawaiting(int)’:
includes/happyhttp.cpp:173:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
makefile:45: recipe for target 'includes/happyhttp.o' failed
make: *** [includes/happyhttp.o] Error 1


Re: apgsearch v4.0

Posted: August 19th, 2017, 6:55 pm
by calcyman
muzik wrote:This does not look promising.
This is the same error as drc; does the change suggested in my previous post work? (Or, for simplicity, run 'git stash' followed by 'git pull' in the directory to pull that change from the remote repository.)

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:06 pm
by drc
None of those worked. I still get the same error after doing both of those in both the ./apgmerav4 and ./apgmerav4/apgmera directories.

EDIT: Log:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmerav4/apgmera
$ ./recompile.sh --rule g3b34s12
Skipping updates; use --update to update apgmera automatically.
Symmetry unspecified; assuming C1.
Configuring rule g3b34s12; symmetry C1
Valid rulestring: g3b34s12
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Rule integer:     3096
Rule circuit:     [-031-124-244-560]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
In file included from lifelib/avxlife/uli.h:4:0,
                 from lifelib/upattern.h:3,
                 from main.cpp:20:
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:18:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:19:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:34:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:35:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:48:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:49:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:334:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:869:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:929:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
make: *** [makefile:45: includes/happyhttp.o] Error 1

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:08 pm
by muzik
I tried the drc fix and am still not having a good time:

Code: Select all

$ sh recompile.sh
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:334:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:869:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:929:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
makefile:45: recipe for target 'includes/happyhttp.o' failed
make: *** [includes/happyhttp.o] Error 1

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:14 pm
by calcyman
muzik wrote:I tried the drc fix and am still not having a good time:

Code: Select all

$ sh recompile.sh
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:334:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:869:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:929:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
makefile:45: recipe for target 'includes/happyhttp.o' failed
make: *** [includes/happyhttp.o] Error 1
Great, that's down to just one unresolved import. Insert this just before '#include <sys/select.h>' in includes/happyhttp.cpp:

Code: Select all

#include <strings.h>

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:23 pm
by drc
I have reinstalled it like calcyman said:
calcyman wrote:The method detailed on the apgmera homepage https://gitlab.com/apgoucher/apgmera is the official set of instructions, and doesn't require unzipping anything. To summarise:

1. (Re-)run your Cygwin setup (don't worry, it remembers your existing installation and only downloads/updates things as it needs to) and ensure 'g++', 'make', 'git', and 'python' are included.

2. Then run the following in a Cygwin terminal, to download apgmera, enter the directory, and compile it:

Code: Select all

git clone https://gitlab.com/apgoucher/apgmera.git
cd apgmera
./recompile.sh
If successful, you should get an ASCII-art picture of an eater2 and a couple of status lines from apgmera telling you its version. Then you can run it like so:

Code: Select all

./apgmera
Now there's no double directory thing but the same errors happen:

Code: Select all

RCTESTW7+Daniel@RCTESTW7 ~/apgmera
$ ./recompile.sh
Downloading lifelib...
Submodule 'lifelib' (https://gitlab.com/apgoucher/lifelib.git) registered for path 'lifelib'
Cloning into '/home/Daniel/apgmera/lifelib'...
Submodule path 'lifelib': checked out '3862753c1ff603b707d7540fc78b1565aab76768'
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/sha256.cpp -o includes/sha256.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/md5.cpp -o includes/md5.o
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 includes/happyhttp.cpp -o includes/happyhttp.o
includes/happyhttp.cpp: In member function ‘void happyhttp::Connection::request(const char*, const char*, const char**, const unsigned char*, int)’:
includes/happyhttp.cpp:334:44: error: ‘strcasecmp’ was not declared in this scope
    if( 0==_stricmp( name, "content-length" ) )
                                            ^
includes/happyhttp.cpp: In member function ‘void happyhttp::Response::BeginBody()’:
includes/happyhttp.cpp:869:44: error: ‘strcasecmp’ was not declared in this scope
  if( trenc && 0==_stricmp( trenc, "chunked") )
                                            ^
includes/happyhttp.cpp: In member function ‘bool happyhttp::Response::CheckClose()’:
includes/happyhttp.cpp:929:42: error: ‘strcasecmp’ was not declared in this scope
   if( conn && 0==_stricmp( conn, "close" ) )
                                          ^
make: *** [makefile:45: includes/happyhttp.o] Error 1

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:25 pm
by muzik
Seems to be working like a charm for me now.

EDIT: Nnnnooope. Generations searching doesnt seem to be very healthy. It still seems to search fine, but this error right here appears:

Code: Select all

$ ./apgmera -k censored -n 10000 --rule g7b3s23
apgmera v4.01: Rule b3s23 does not match desired rule g7b3s23.
Skipping updates; use --update to update apgmera automatically.
Symmetry unspecified; assuming C1.
Configuring rule g7b3s23; symmetry C1
Valid rulestring: g7b3s23
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Valid symmetry: C1
Success!
g++ -c -Wall -O3 -march=native -fopenmp -DUSE_OPEN_MP --std=c++11 main.cpp -o main.o
In file included from lifelib/avxlife/uli.h:4:0,
                 from lifelib/upattern.h:3,
                 from main.cpp:20:
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:18:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:19:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:34:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:35:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
lifelib/avxlife/lifelogic/iterators_all.h: In function ‘int apg::iterate_var_32_28(int, uint32_t*, uint32_t*, uint32_t*, uint32_t*)’:
lifelib/avxlife/lifelogic/iterators_all.h:48:18: warning: unused variable ‘e’ [-Wunused-variable]
         uint32_t e[32];
                  ^
lifelib/avxlife/lifelogic/iterators_all.h:49:13: warning: unused variable ‘bis’ [-Wunused-variable]
         int bis = apg::best_instruction_set();
             ^
g++ -fopenmp main.o includes/sha256.o includes/md5.o includes/happyhttp.o -o apg

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:28 pm
by calcyman
drc: Did you try the '#include <strings.h>' fix? It seems to be working for muzik.

Thanks, by the way, for helping to track down the Cygwin compatibility issues.

Re: apgsearch v4.0

Posted: August 19th, 2017, 7:32 pm
by drc
calcyman wrote:drc: Did you try the '#include <strings.h>' fix? It seems to be working for muzik.

Thanks, by the way, for helping to track down the Cygwin compatibility issues.
Yes, I inserted '#include <strings.h>' between '#include <sys/types.h>' and '#include <sys/select.h>' in happyhttp.cpp

I also tried 'sys/strings.h' in place of 'strings.h' to no avail.