jermp / pthash

Fast and compact minimal perfect hash functions in C++.
MIT License
190 stars 25 forks source link

Compile issue on OSX (building on bioconda) #4

Closed rob-p closed 1 year ago

rob-p commented 1 year ago

Hi @jermp,

I'm trying to put piscem up on bioconda, and the linux build works fine. The OSX build, however, gives this error (https://dev.azure.com/bioconda/bioconda-recipes/_build/results?buildId=24063&view=logs&j=1b052f1d-4456-52f0-9d43-71c4c5bd734d&t=edc48dcd-1fc2-5e3b-7036-7be9cea00123&l=597). It seems to be a stricter rule for conversions in clang than g++. Any chance of fixing this upstream?

Thanks! Rob

jermp commented 1 year ago

Hi @rob-p, I do not think that is the error causing the job to fail. I extensively tested PTHash on macOS x.

The error is due to parallel_hashmap/phmap_base.h:5152:38 (not from PTHash): https://dev.azure.com/bioconda/bioconda-recipes/_build/results?buildId=24063&view=logs&j=1b052f1d-4456-52f0-9d43-71c4c5bd734d&t=edc48dcd-1fc2-5e3b-7036-7be9cea00123&l=637

It seems bioconda is testing an environment older than macOS 10.12, while current versions are >= 12...

rob-p commented 1 year ago

Ahh, pthash is simply causing a warning I guess:

usr/local/miniconda/envs/bioconda/conda-bld/piscem_1668195908755/work/piscem-cpp/include/../external/pthash/include/utils/bucketers.hpp:18:41: warning: implicit conversion from 'unsigned long long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Wimplicit-const-int-float-conversion]
19:51:55 BIOCONDA INFO (ERR)           static const uint64_t T = 0.6 
jermp commented 1 year ago

Yes, just a warning, not an error. The error is here: parallel_hashmap/phmap_base.h:5152:38: shared_mutex. I suspect the bioconda system is using an outdated version of clang. Even the warning is strange (for example, I do not have that warning on two different mac) and I always compile with -Wall -Wextra: https://github.com/jermp/pthash/blob/master/CMakeLists.txt#L29.

jermp commented 1 year ago

Hi @rob-p, can I close this issue given that it is not related to PTHash?