Skip to content

current master fails to link with libfuse?! #552

@mouse07410

Description

@mouse07410

MacOS Mojave 10.14.5, Xcode-10.2.1, currenf EncFS master

$ rm -rf build
$ vi build-macports.sh 
$ ./build-macports.sh 2>&1 | tee build-log.txt
+ : cmake
+ : false
+ : true
+ cmake --version
cmake version 3.14.5

CMake suite maintained and supported by Kitware (kitware.com/cmake).
+ CFG=
+ [[ false == \t\r\u\e ]]
+ uname -s
+ grep -q Darwin
+ CFG='-DENABLE_NLS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DOPENSSL_ROOT_DIR=/opt/local -DFUSE_INCLUDE_DIR=/usr/local/include -DFUSE_LIBRARIES=/usr/local/lib -DCMAKE_INSTALL_PREFIX=/opt/local '
+ rm -rf build
+ [[ ! -d build ]]
+ mkdir build
+ cd build
+ cmake .. -DENABLE_NLS=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DOPENSSL_ROOT_DIR=/opt/local -DFUSE_INCLUDE_DIR=/usr/local/include -DFUSE_LIBRARIES=/usr/local/lib -DCMAKE_INSTALL_PREFIX=/opt/local
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /opt/local/bin/clang
-- Check for working C compiler: /opt/local/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/local/bin/clang++
-- Check for working CXX compiler: /opt/local/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenSSL: /opt/local/lib/libcrypto.dylib (found version "1.1.1c")  
-- Looking for C++ include attr/xattr.h
-- Looking for C++ include attr/xattr.h - not found
-- Looking for C++ include sys/xattr.h
-- Looking for C++ include sys/xattr.h - found
-- Performing Test HAVE_DIRENT_D_TYPE
-- Performing Test HAVE_DIRENT_D_TYPE - Success
-- Performing Test XATTR_ADD_OPT
-- Performing Test XATTR_ADD_OPT - Success
-- Performing Test COMPILER_NEEDS_LATOMIC
-- Performing Test COMPILER_NEEDS_LATOMIC - Failed
-- Performing Test LINKER_SUPPORTS_WLASNEEDED
-- Performing Test LINKER_SUPPORTS_WLASNEEDED - Failed
-- Looking for lchmod
-- Looking for lchmod - found
-- Looking for utimensat
-- Looking for utimensat - found
-- There is no usable FDATASYNC on Apple
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Looking for C++ include syslog.h
-- Looking for C++ include syslog.h - found
-- Enabled syslog logging support
-- clang-tidy check skipped, need newer cmake
-- Using vendored TinyXML2
CMake Deprecation Warning at vendor/github.com/leethomason/tinyxml2/CMakeLists.txt:11 (cmake_policy):
  The OLD behavior for policy CMP0063 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Using vendored Easylogging++
-- Setting C++11
-- Found PythonInterp: /opt/local/bin/python (found version "2.7.16") 
-- Found Git: /opt/local/bin/git (found version "2.21.0") 
-- git Version: v1.9.2-1ca255e8-dirty
-- Version: 1.9.2
-- Performing Test HAVE_CXX_FLAG_STD_CXX11_
-- Performing Test HAVE_CXX_FLAG_STD_CXX11_ - Success
-- Performing Test HAVE_CXX_FLAG_STD_CXX0X
-- Performing Test HAVE_CXX_FLAG_STD_CXX0X - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT
-- Performing Test HAVE_CXX_FLAG_WZERO_AS_NULL_POINTER_CONSTANT - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
WARNING: Target "encfs-bin" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "encfsctl" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "checkops" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "makekey" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "encfs" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "benchmarks" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "unittests" requests linking to directory "/usr/local/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /Users/ur20980/src/encfs/build
. . . . .
[ 87%] Linking CXX executable encfsctl
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/encfsctl.dir/link.txt --verbose=1
/opt/local/bin/clang++  -march=native -std=gnu++17 -Os -Ofast -Wall -Wextra -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/encfsctl.dir/encfs/encfsctl.cpp.o  -o encfsctl  -L/Users/ur20980/src/encfs/build/vendor/github.com/leethomason/tinyxml2  -L/Users/ur20980/src/encfs/build/vendor/github.com/muflihun/easyloggingpp -Wl,-rpath,/Users/ur20980/src/encfs/build/vendor/github.com/leethomason/tinyxml2 -Wl,-rpath,/Users/ur20980/src/encfs/build/vendor/github.com/muflihun/easyloggingpp libencfs.a /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib vendor/github.com/leethomason/tinyxml2/libtinyxml2.a vendor/github.com/muflihun/easyloggingpp/libeasyloggingpp.a 
Undefined symbols for architecture x86_64:
  "_fuse_unmount", referenced from:
      encfs::unmountFS(char const*) in libencfs.a(FileUtils.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [encfsctl] Error 1
make[1]: *** [CMakeFiles/encfsctl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 90%] Linking CXX executable encfs
/opt/local/bin/cmake -E cmake_link_script CMakeFiles/encfs-bin.dir/link.txt --verbose=1
/opt/local/bin/clang++  -march=native -std=gnu++17 -Os -Ofast -Wall -Wextra -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names  CMakeFiles/encfs-bin.dir/encfs/main.cpp.o  -o encfs  -L/Users/ur20980/src/encfs/build/vendor/github.com/leethomason/tinyxml2  -L/Users/ur20980/src/encfs/build/vendor/github.com/muflihun/easyloggingpp -Wl,-rpath,/Users/ur20980/src/encfs/build/vendor/github.com/leethomason/tinyxml2 -Wl,-rpath,/Users/ur20980/src/encfs/build/vendor/github.com/muflihun/easyloggingpp libencfs.a /opt/local/lib/libssl.dylib /opt/local/lib/libcrypto.dylib vendor/github.com/leethomason/tinyxml2/libtinyxml2.a vendor/github.com/muflihun/easyloggingpp/libeasyloggingpp.a 
Undefined symbols for architecture x86_64:
  "_fuse_get_context", referenced from:
      encfs_init(fuse_conn_info*) in main.cpp.o
      encfs::_do_getattr(encfs::FileNode*, stat*) in libencfs.a(encfs.cpp.o)
      encfs::withFileNode(char const*, char const*, fuse_file_info*, std::__1::function<int (encfs::FileNode*)> const&) in libencfs.a(encfs.cpp.o)
      encfs::encfs_readdir(char const*, void*, int (*)(void*, char const*, stat const*, long long), long long, fuse_file_info*) in libencfs.a(encfs.cpp.o)
      encfs::encfs_mknod(char const*, unsigned short, int) in libencfs.a(encfs.cpp.o)
      encfs::encfs_mkdir(char const*, unsigned short) in libencfs.a(encfs.cpp.o)
      encfs::encfs_unlink(char const*) in libencfs.a(encfs.cpp.o)
      ...
  "_fuse_main_real", referenced from:
      _main in main.cpp.o
      FuseUsage() in main.cpp.o
  "_fuse_unmount", referenced from:
      encfs::unmountFS(char const*) in libencfs.a(FileUtils.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [encfs] Error 1
make[1]: *** [CMakeFiles/encfs-bin.dir/all] Error 2
make: *** [all] Error 2

Complete log:
build-log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions