[Push] Push3 in C++

Maarten mkeijzer at xs4all.nl
Thu Aug 12 18:29:50 EDT 2004


On Thursday 12 August 2004 23:58, John Truesdale wrote:
> Hi Maarten, Lee, pushers and spammers galore:
>
> 2) Compile times and memory usage for this code are a little
> high. Compile time on a xeon (2.8Ghz-2Gb) was about 20 minutes. 
> Memory usage by gcc with default optimization was around 200 Mb. 
> Maarten says the autoconf stuff could use a little work and I may
> start there just to cut the build time down.  

I'm still looking into the double build that goes on. It seems that 
on the linux platform it builds two types of object files, one for 
the shared library and one for the static one. Not sure if there's 
an easy workaround for that. Will look at source code optimizations 
though.

> 3) The examples directory contain some test executables but they
> require a configuration file (test.config) which is missing. 
> Hopefully you can help out here Maarten.  Even if you have a
> sample config file that is probably enough to get me going.

(have sent the files through personal email). 

Woops, forgot to include these in the distribution. Apparently 
didn't test it properly. I've just uploaded a new release that 
fixes these problems.

> 4) The test directory contains a pushtest executable but again no
> driver to run tests of basic push functionality.  Is there
> something similar to the run_tests.sh that you provided with
> previous versions?

Again an oversight in the distribution. You should now be able to 
say: 'make check' for testing the thing. If all goes well you won't 
see a thing happening (pushtest will execute a push program and 
quit silently when the top of the boolean stack is true at the end 
of execution. Kind of like an assert). 

> 5) When I build the executables, autoconf/libtool is placing a
> wrapper script into the directory and putting the executable in a
> .libs directory.  The wrapper script says
>
> # pushgp_int - temporary wrapper script for .libs/pushgp_int
> # Generated by ltmain.sh - GNU libtool 1.5a (1.1240 2003/06/26
> 06:55:19) #
> # The pushgp_int program cannot be directly executed until all
> the libtool # libraries that it depends on are installed.
>
>    Maarten, do you know what its talking about.  What libraries
> need to be installed?  I installed the push libraries updated my
> LD_LIBRARIES_PATH and tried to rebuild some of the executables
> but it keeps generating the wrapper files.  What am I missing?

It expects the stuff to be installed through 'make install'. With 
'configure --prefix=/some/location' you can determine where it 
installs it (and luckily, also 'make uninstall' works). 

This is caused by the difficulties of having shared libraries. For 
debugging, what I usually do is run the true executable found in:

examples/.libs/pushgp_int

and set my LD_LIBRARY_PATH to 

src/.libs

That usually does the trick. After the stuff is installed the 
wrapper is no longer necessary/used.

> 6)  What is the status of the boost files in the distribution? 
> Ideally it would be nice to link to a boost library.

It's a fairly recent boost distribution (I took it from my debian 
unstable box). Given the license of boost I can incorporate it this 
way. Actually way too much is included as I only need the 
shared_ptr. But you know with c++, this includes that and that 
includes this again, so I just added most of it. I will keep the 
thing up to date with the moving target that is the boost library. 
I just assumed that most people wouldn't have it installed, and 
didn't like them having to hunt it down. I hate it when that 
happens.....

> 7)  Thank you Lee and Maarten for putting the code out there. 
> Hopefully I'll be able to contribute.

Thanks for this, this already helps a lot.

-Maarten-





More information about the Push mailing list