twmht / python-rocksdb

Python bindings for RocksDB
BSD 3-Clause "New" or "Revised" License
276 stars 88 forks source link

fix library not found for -lstdc++ on macos #56

Open zzzhc opened 5 years ago

zzzhc commented 5 years ago

it failed when installing with pip on macos(10.14.3):

    25 warnings generated.
    g++ -bundle -undefined dynamic_lookup -L/Users/zzzhc/anaconda3/lib -arch x86_64 -L/Users/zzzhc/anaconda3/lib -arch x86_64 -L/usr/local/opt/icu4c/lib -I/usr/local/opt/icu4c/include -arch x86_64 build/temp.macosx-10.7-x86_64-3.7/rocksdb/_rocksdb.o -lrocksdb -lsnappy -lbz2 -lz -llz4 -o build/lib.macosx-10.7-x86_64-3.7/rocksdb/_rocksdb.cpython-37m-darwin.so
    clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'g++' failed with exit status 1

fix it by add extra link args(-stdlib=libc++).