devosoft / avida

http://avida.devosoft.org
605 stars 113 forks source link

Unable to build Xcode project #11

Open theworkerant opened 10 years ago

theworkerant commented 10 years ago

Disclaimer, I'm a web developer and my experience with C language/Xcode anything is minimal. However, I'd like to be able to play around with this lovely project. Basically, I'm looking for the quickest way to launch this thing, any help would be appreciated.

FYI, the binary here didn't seem to work: http://avida.devosoft.org/ -- First a config not found error, then segmentation fault when opening from command line.

Anyways, here's what I've done. The script to build_avida seemed to go okay.

#!/bin/sh

git submodule init
git submodule update
mkdir -p cbuild
cd cbuild
cmake "$@" ../
make -j 10 install

But opening up the Xcode project and building resulted in an error.

Ld /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug/avida normal x86_64
    cd /Users/graham/Projects/AI/avida/avida-core
    export MACOSX_DEPLOYMENT_TARGET=10.9
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug -F/Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug -filelist /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Intermediates/Avida-Core.build/Debug/avida.build/Objects-normal/x86_64/avida.LinkFileList -mmacosx-version-min=10.9 -lavida-core -lapto -Xlinker -dependency_info -Xlinker /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Intermediates/Avida-Core.build/Debug/avida.build/Objects-normal/x86_64/avida_dependency_info.dat -o /Users/graham/Library/Developer/Xcode/DerivedData/Avida-Core-avsjthwnyrzdtsaeysabngnpeghe/Build/Products/Debug/avida

ld: library not found for -lapto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
anyaevostinar commented 10 years ago

Are you opening the XCode project in the top-level Avida directory or the avida-core directory? You need to open the top level project in order for the apto library to be linked properly.

I've tested the site's Mac binary and it seemed to run fine, were you using Windows?

If you aren't particularly attached to using the pure research tool, you can also download the educational version which has a nice GUI along with it: http://avida-ed.msu.edu/

theworkerant commented 10 years ago

Gotcha. I disabled Code Signing on everything to try and get it to build but still got linker errors like above even after opening the top level workspace file. About 64 of them.

Anyways I checked out the ED version, what are the major differences between it and the "real thing"?

ruppmatt commented 10 years ago

The education version of Avida provides limited functionality and a GUI interface. Additional features and many more configuration options are available in the console-based executable.

ruppmatt commented 8 years ago

Though months later, did this solve your problem? If not, make sure that you've set the target to build in XCode to "avida" (the topmost option with the black terminal-application) icon. The linker error (-lapto) refers to Avida's "standard library", which is built separately. Both using XCode with the target "avida" and building from the shell script (./build_avida) will create this library, create the the avida-core library, and then link them with the associated driver to form a working executable.

theworkerant commented 8 years ago

I gave up on this one... a while ago. Sorry can't be of help here.