Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build Xcode project #11

Open
theworkerant opened this issue Jul 17, 2014 · 5 comments
Open

Unable to build Xcode project #11

theworkerant opened this issue Jul 17, 2014 · 5 comments

Comments

@theworkerant
Copy link

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants