CESNET / netopeer2

NETCONF toolset
BSD 3-Clause "New" or "Revised" License
299 stars 188 forks source link

Compilation fails with: `unknown type name ‘pthread_rwlock_t’` #1379

Closed qupfer closed 1 year ago

qupfer commented 1 year ago

Hi, I want to use/build netopeer2 on almalinux 8.7. Works in the last months well, but currently not anymore.

[root@netopeer2 build]# make -j4
Consolidate compiler generated dependencies of target test_edit
Consolidate compiler generated dependencies of target serverobj
Consolidate compiler generated dependencies of target test_subscribe_param
Consolidate compiler generated dependencies of target test_parallel_sessions
[  8%] Built target test_edit
[  8%] Built target test_parallel_sessions
[  9%] Building C object CMakeFiles/serverobj.dir/src/netconf_monitoring.c.o
[ 14%] Built target test_subscribe_param
[ 15%] Building C object CMakeFiles/serverobj.dir/src/netconf_nmda.c.o
[ 16%] Building C object tests/CMakeFiles/test_yang_push.dir/np_test.c.o
[ 18%] Building C object tests/CMakeFiles/test_subscribe_filter.dir/np_test.c.o
In file included from /root/netopeer2/src/common.h:28,
                 from /root/netopeer2/src/netconf_monitoring.c:28:
/root/netopeer2/build/compat/compat.h:149:32: error: unknown type name ‘pthread_rwlock_t’; did you mean ‘pthread_cond_t’?
 int pthread_rwlock_clockrdlock(pthread_rwlock_t *rwlock, clockid_t clockid, const struct timespec *abstime);
                                ^~~~~~~~~~~~~~~~
                                pthread_cond_t
/root/netopeer2/build/compat/compat.h:153:32: error: unknown type name ‘pthread_rwlock_t’; did you mean ‘pthread_cond_t’?
 int pthread_rwlock_clockwrlock(pthread_rwlock_t *rwlock, clockid_t clockid, const struct timespec *abstime);
                                ^~~~~~~~~~~~~~~~
                                pthread_cond_t
make[2]: *** [CMakeFiles/serverobj.dir/build.make:104: CMakeFiles/serverobj.dir/src/netconf_monitoring.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 19%] Building C object tests/CMakeFiles/test_subscribe_filter.dir/test_subscribe_filter.c.o
make[1]: *** [CMakeFiles/Makefile2:179: CMakeFiles/serverobj.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 21%] Building C object tests/CMakeFiles/test_yang_push.dir/test_yang_push.c.o
[ 22%] Linking C executable test_subscribe_filter
[ 22%] Built target test_subscribe_filter
[ 23%] Linking C executable test_yang_push
[ 23%] Built target test_yang_push
make: *** [Makefile:146: all] Error 2

I assume its related with this commit: https://github.com/CESNET/netopeer2/commit/7e5349b3c2ef0fd9106525fb0b0668d872cfe39d

Any Ideas how to build it again?

michalvasko commented 1 year ago

Please use the devel branch for now, should already be fixed and a duplicate of #1377.