crichardson332 / homebrew-crich_brews

Homebrew tap
0 stars 0 forks source link

Missing rapidxml #1

Closed jharrison closed 5 years ago

jharrison commented 5 years ago

I followed your instructions on my mac and make got the following error:

[ 30%] Building CXX object src/CMakeFiles/scrimmage-core.dir/parse/ConfigParse.cpp.o
/Users/jharrison/code/scrimmage/scrimmage/src/parse/ConfigParse.cpp:47:10: fatal error: 'rapidxml/rapidxml.hpp' file not found
#include <rapidxml/rapidxml.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/scrimmage-core.dir/parse/ConfigParse.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/scrimmage-core.dir/all] Error 2
crichardson332 commented 5 years ago

This is a known issue, as rapidxml unfortunately is not available via homebrew and the core repository doesn't have a build system.

I'm going to fork the rapidxml repo in github and tag v1.13, then create a viable homebrew formula for it so it can be brew install'd. I'll let you know when this is available.

crichardson332 commented 5 years ago

I found a better solution that involves using the rapidxml bundled with Boost, and I created a pull request in scrimmage core. If it gets merged then you'll only need to update your master branch and build again. I'll let you know if that happens.

jharrison commented 5 years ago

While I wait, can you tell me where to copy the rapidxml hpp files to get up and going?

crichardson332 commented 5 years ago

Sure, you can just download a zip file with the headers here:

https://sourceforge.net/projects/rapidxml/files/latest/download

In there you'll find four .hpp files, which you can just copy to a rapidxml folder in /usr/local/include:

$ mkdir /usr/local/include/rapidxml
$ cd /path/to/rapidxml/zip/file
$ cp rapidxml*.hpp /usr/local/include/rapidxml

Now try building scrimmage again and you should be good.

jharrison commented 5 years ago

It works now. Thanks!

jharrison commented 5 years ago

Found a snag. There's a difference between the BSD and GNU versions of readlink. This results in the following error when trying to run generate-plugin.sh:

readlink: illegal option -- f
usage: readlink [-n] [file ...]

See also: https://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac

crichardson332 commented 5 years ago

Yeah, this is another known issue. I'm glad you're opening issues for these so we can knock them out finally.

This quick (and very dirty) solution to this is to edit the generate-plugin.sh script and change every instance of readlink to greadlink. This will execute the GNU version of readlink instead of the BSD one. You'll need to run brew install coreutils before this to make GNU utils available.

We've been planning on converting all these bash scripts to python scripts that are cross platform, but in the meantime you can try this quick solution.

crichardson332 commented 5 years ago

rapidxml v1.13 is now available as a homebrew package. This issue should now be resolved.