Hello,
I'm trying to switch from Linux to FreeBSD, but am unable to compile one of our custom software.
After compiling many files, it eventually halts when trying to compile a file containing some pthread code:
Is PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP a Linux specific feature, or do I simply not setup/inform the compiler in FreeBSD correctly what to use / where to look for it?
I'm trying to switch from Linux to FreeBSD, but am unable to compile one of our custom software.
After compiling many files, it eventually halts when trying to compile a file containing some pthread code:
Code:
Building file: ../feedProcessor.cpp
Invoking: GCC C++ Compiler
g++7 -I/usr/local/pgsql/include -O0 -g3 -Wall -std=c++14 -c -fmessage-length=0 -MMD -MP -MF"feedProcessor.d" -MT"feedProcessor.o" -o "feedProcessor.o" "../feedProcessor.cpp"
../feedProcessor.cpp: In constructor 'feedProcessor::feedProcessor(wqueue<std::__cxx11::basic_string<char>*>&, webApi*, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string, std::__cxx11::string)':
../feedProcessor.cpp:20:47: error: 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' was not declared in this scope
pthread_rwlockattr_setkind_np(&lock_attribs, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmake: *** [subdir.mk:47: feedProcessor.o] Error 1