hpclab / rankeval

Official repository of RankEval: An Evaluation and Analysis Framework for Learning-to-Rank Solutions.
http://rankeval.isti.cnr.it/
Mozilla Public License 2.0
88 stars 11 forks source link

support for build with Xcode? #13

Closed paulperry closed 5 years ago

paulperry commented 5 years ago

Mac OSX Xcode supports OpenMP per this post https://iscinumpy.gitlab.io/post/omp-on-high-sierra/ . I tried it by setting the following env variables:

export CC='clang -Xpreprocessor '
export CXX='clang++ -Xpreprocessor '

and I got pretty far, were it not for this error:

clang -Xpreprocessor -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/paulperry/anaconda3/include -arch x86_64 -I/Users/paulperry/anaconda3/include -arch x86_64 -I./rankeval/analysis -I/Users/paulperry/anaconda3/include/python3.6m -I/Users/paulperry/anaconda3/lib/python3.6/site-packages/numpy/core/include -c ./rankeval/analysis/_efficient_feature_impl.cpp -o build/temp.macosx-10.7-x86_64-3.6/./rankeval/analysis/_efficient_feature_impl.o -fopenmp -O3 -w -std=c++11
    ./rankeval/analysis/_efficient_feature_impl.cpp:90:27: error: no matching constructor for initialization of 'std::vector<TreeNode>'
        std::vector<TreeNode> queue = { root };
                              ^       ~~~~~~~~

Where this might fix it: https://stackoverflow.com/questions/26144299/compiler-error-when-constructing-a-vector-of-pairs

But before I go mucking with the code I wondered if anyone else has gone down this path and succeeded. Thx

paulperry commented 5 years ago

I was able to build with the following flags:

CC=clang -Xpreprocessor -stdlib=libc++ 
CXX=clang++ -Xpreprocessor -stdlib=libc++ 

per this answer: https://stackoverflow.com/questions/14864967/no-matching-constructor-for-initialization-of-vectorstring-with-clang-3-2

I'm able to import it into a notebook and now to see if it truly runs.

paulperry commented 5 years ago

Seems to be working.

strani commented 5 years ago

Thank you Paul.