libnetconf2 icon indicating copy to clipboard operation
libnetconf2 copied to clipboard

session_server.c:495:50: error: use of undeclared identifier 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP'

Open dliu2223 opened this issue 7 years ago • 2 comments

Hi,

Trying to build under macOS Sierra 10.12.6, tried master & the macosx branch, both failed, please help.

Thanks

David

-- Found Threads: TRUE -- Looking for pthread_spin_lock -- Looking for pthread_spin_lock - not found -- Looking for pthread_mutex_timedlock -- Looking for pthread_mutex_timedlock - not found -- Found OpenSSL: /usr/lib/libcrypto.dylib (found version "1.0.2p") -- Found Doxygen: /usr/local/bin/doxygen (found version "1.8.14") found components: doxygen missing components: dot -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Found CMocka: /usr/local/lib/libcmocka.dylib (Required is at least version "1.0.0") -- valgrind executable not found! Disabling memory leaks tests -- Configuring done -- Generating done -- Build files have been written to: /Users/david/dev/yang/libnetconf2/build C02SQ0ZRG8WL:build david$ pwd /Users/david/dev/yang/libnetconf2/build C02SQ0ZRG8WL:build david$ make Scanning dependencies of target netconf2 [ 2%] Building C object CMakeFiles/netconf2.dir/src/io.c.o [ 4%] Building C object CMakeFiles/netconf2.dir/src/log.c.o [ 6%] Building C object CMakeFiles/netconf2.dir/src/messages_client.c.o [ 8%] Building C object CMakeFiles/netconf2.dir/src/messages_server.c.o [ 10%] Building C object CMakeFiles/netconf2.dir/src/session.c.o [ 12%] Building C object CMakeFiles/netconf2.dir/src/session_client.c.o [ 14%] Building C object CMakeFiles/netconf2.dir/src/session_server.c.o /Users/david/dev/yang/libnetconf2/src/session_server.c:495:13: warning: implicit declaration of function 'pthread_rwlockattr_setkind_np' is invalid in C99 [-Wimplicit-function-declaration] if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) { ^ /Users/david/dev/yang/libnetconf2/src/session_server.c:495:50: error: use of undeclared identifier 'PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP' if (pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) == 0) { ^ 1 warning and 1 error generated. make[2]: *** [CMakeFiles/netconf2.dir/src/session_server.c.o] Error 1 make[1]: *** [CMakeFiles/netconf2.dir/all] Error 2 make: *** [all] Error 2

dliu2223 avatar Oct 19 '18 01:10 dliu2223

Hi David, unfortunately, libnetconf2 is not possible to compile on MacOS, there are several other problems in addition to this one (which can be fixed, other cannot without substantial effort).

Regards, Michal

michalvasko avatar Oct 19 '18 06:10 michalvasko

Hi Michal,

Thanks for the quick reply, will try to build under ubuntu, assume it should be OK.

David

On Oct 18, 2018, at 11:33 PM, Michal Vasko [email protected] wrote:

Hi David, unfortunately, libnetconf2 is not possible to compile on MacOS, there are several other problems in addition to this one (which can be fixed, other cannot without substantial effort).

Regards, Michal

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/CESNET/libnetconf2/issues/104#issuecomment-431259363, or mute the thread https://github.com/notifications/unsubscribe-auth/ARvfCWTQgchzqBYCGGSYJeSxFUE8MeBkks5umXIjgaJpZM4Xvfj9.

dliu2223 avatar Oct 22 '18 16:10 dliu2223