Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang erro #441

Open
gicfgg opened this issue Oct 15, 2023 · 3 comments
Open

clang erro #441

gicfgg opened this issue Oct 15, 2023 · 3 comments
Labels
is:bug Bug description. status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...)

Comments

@gicfgg
Copy link

gicfgg commented Oct 15, 2023

while make after cmake ..successed, there is erro occured

ld: Undefined symbols:
_pthread_rwlock_timedrdlock, referenced from:
_pthread_rwlock_clockrdlock in compat.c.o
_pthread_rwlock_timedwrlock, referenced from:
_pthread_rwlock_clockwrlock in compat.c.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

and i 'm using a mac

The C compiler identification is AppleClang 15.0.0.15000040

@michalvasko
Copy link
Member

Please provide the output of cmake, having no prior CMake cache (empty build directory).

@michalvasko michalvasko added the is:bug Bug description. label Oct 16, 2023
@gicfgg
Copy link
Author

gicfgg commented Oct 16, 2023

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- The C compiler identification is AppleClang 15.0.0.15000040
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:177 (message):
valgrind executable not found! Disabling memory leaks tests.

-- Could NOT find CMocka (missing: CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) (Required is at least version "1.0.1")
-- Disabling tests because of missing CMocka
-- Could NOT find Uncrustify (missing: UNCRUSTIFY) (Required is at least version "0.77")
-- Looking for _POSIX_TIMERS
-- Looking for _POSIX_TIMERS - found
-- Looking for pthread_mutex_timedlock
-- Looking for pthread_mutex_timedlock - not found
-- Looking for pthread_mutex_clocklock
-- Looking for pthread_mutex_clocklock - not found
-- Looking for pthread_rwlock_clockrdlock
-- Looking for pthread_rwlock_clockrdlock - not found
-- Looking for pthread_rwlock_clockwrlock
-- Looking for pthread_rwlock_clockwrlock - not found
-- Looking for pthread_cond_clockwait
-- Looking for pthread_cond_clockwait - not found
-- Looking for vdprintf
-- Looking for vdprintf - found
-- Looking for asprintf
-- Looking for asprintf - not found
-- Looking for vasprintf
-- Looking for vasprintf - not found
-- Looking for getline
-- Looking for getline - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for strnstr
-- Looking for strnstr - not found
-- Looking for strdupa
-- Looking for strdupa - not found
-- Looking for strchrnul
-- Looking for strchrnul - not found
-- Looking for get_current_dir_name
-- Looking for get_current_dir_name - not found
-- Looking for stdatomic.h
-- Looking for stdatomic.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Looking for pthread_rwlockattr_setkind_np
-- Looking for pthread_rwlockattr_setkind_np - not found
-- Found OpenSSL: /opt/homebrew/lib/libcrypto.dylib (found version "3.1.3")
-- OpenSSL found, required for TLS
-- Found LibSSH: /opt/homebrew/include (found suitable version "0.10.5", minimum required is "0.7.1")
-- Found LibPAM: /Library/Developer/CommandLineTools/SDKs/MacOSX14.0.sdk/usr/lib/libpam.tbd
-- LibPAM found, version < 1.4, disabled PAM tests
-- Found LibYANG: /usr/local/lib/libyang.dylib (found suitable version "2.41.0", minimum required is "2.28.0")
-- Looking for shadow.h
-- Looking for shadow.h - not found
-- Looking for crypt.h
-- Looking for crypt.h - not found
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Configuring done (4.3s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/sunxiaoyan/Documents/for-netopeer/libnetconf2-2.1.37/build

thankyou

michalvasko added a commit that referenced this issue Oct 17, 2023
@michalvasko
Copy link
Member

You can try using the latest devel, this particular problem should be fixed. However, I am not sure you will not encounter another compilation problem and even if not, I doubt libnetconf2 will work correctly simply because MacOS is not officially supported.

@michalvasko michalvasko added the status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...) label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Bug description. status:completed From the developer perspective, the issue was solved (bug fixed, question answered,...)
Projects
None yet
Development

No branches or pull requests

2 participants