Installing GPdata 3.0

GPdata is based on Andy Singleton, 1994 GPQUICK Version 2. GPQUICK was written for 16 bit C microsoft windows and Unix. GPdata updates it to 32 bit Unix computers with gcc 2. It needs help to run with 64 bit Linux and gcc 4.

The chosen example is evolving a stack from "Genetic Programming and Data Structures".

Download GPdata-3.0.tar.gz and GPdata-3.0_stack.tar.gz.

GPdata-3.0_stack.tar contains patches which enable the stack example to run under 32 bit GCC 4.1.2. This page describes the patches (The stack example patches can be obtained directly from GPdata-3.0_stack.tar). As yet the patches do not work under 64 bit Linux

gunzip GPdata-3.0.tar.gz
tar xvf GPdata-3.0.tar
gunzip GPdata-3.0_stack.tar.gz
tar xvf GPdata-3.0_stack.tar
Follow instructions in README.stack etc

GCC 4

Error message: ln: creating symbolic link `prob.h' to `stack.h': File exists

GPdata-3.0.tar.gz contains several benchmarks. Each one has its own compilation include library, generically these are all referred to as prob.h The kit assumes you will point prob.h to the .h for your problem (stack.h in this example). It starts being set to point to max.h

Work around

rm prob.h
Then use
ln -s stack.h prob.h

Compiling

Error message: make: cxx: Command not found

Work around

Edit stack.make to set CC to the name of your c++ compiler. E.g.:
CC 	= g++
gcc and /usr/opt/gcc/295/bin/gcc may compile sources but cause the linker to complain it cannot find the C++ stream I/O functions (see).

Error message: pch.h:18:23: error: strstream.h: No such file or directory

gcc changed far too much between 2.95 and 4.1.2

Work around

Remove or comment out strstream.h E.g.:
//#include <strstream.h>

Error message: chrome.h:344: ANSI C++ forbids declaration `operator >' with no type

Work around

Insert BOOL before operator >

/tmp/cco8EWB2.s: Assembler messages:
/tmp/cco8EWB2.s:47: Error: suffix or operands invalid for `push'

Work around

Name clash ? Incompatibility between gcc 2.95 and Centos 5 assembler? Try gcc 4.1

Excessive messages: /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated.

Work around

Add -Wno-deprecated to compilation options in stack.make E.g.:
CFLAGS 	= -O5 -Wno-deprecated

chrome.cxx:361: error: name lookup of 't' changed for new ISO 'for' scoping

Even though the compiler says it will provide a sensible default, it does not compile the code.

Work around

Edit chrome.cxx Similarly edit stats.cc

error: invalid conversion from 'const hashchain* const' to 'hashchain*'

Work around

Edit edit stats.cc

undefined reference to `std::basic_ostream

The linker gives far to many error messages and each is too long. Under tea shell pipe stderr into more to prevent first error messages scrolling off the screen.
make -f stack.make | & more

Work around

Link with C++ compiler g++. (See above or.)

Running

Segmentation fault

This seems to be a 64 versus 32 bit problem.

Work around

Remove all intermediate files (i.e. .o) and recompile in a 32 bit machine.
make -f stack.make


W.B.Langdon 12 August 2011