Skip to content

Make failed on MacOs #146

@hwware

Description

@hwware

Describe the bug
Hello I tried to build unstable version keydb on my mac computer, but the following error I got:

** Log Files **

Wenhuis-MacBook-Pro:src hwware$ make
CC fastlock.o
fastlock.cpp:251:42: warning: unused parameter 'lock' [-Wunused-parameter]
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned mask)
^
fastlock.cpp:251:54: warning: unused parameter 'pid' [-Wunused-parameter]
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned mask)
^
fastlock.cpp:251:68: warning: unused parameter 'wake' [-Wunused-parameter]
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned mask)
^
fastlock.cpp:251:83: warning: unused parameter 'mask' [-Wunused-parameter]
extern "C" void fastlock_sleep(fastlock *lock, pid_t pid, unsigned wake, unsigned mask)
^
fastlock.cpp:338:9: error: address argument to atomic operation must be a pointer to a trivially-copyable type ('volatile struct ticket *' invalid)
if (__atomic_compare_exchange(&lock->m_ticket, &ticket_expect, &ticket_setiflocked, fWeak /weak/, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED))
^ ~~~~~~~~~~~~~~~
fastlock.cpp:142:14: warning: weak identifier 'serverLog' never declared
#pragma weak serverLog
^
5 warnings and 1 error generated.
make: *** [fastlock.o] Error 1
Wenhuis-MacBook-Pro:src hwware$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
Found CUDA installation: /usr/local/cuda, version unknown
Wenhuis-MacBook-Pro:src hwware $

Any idea how the issue was caused? thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions