pcm: FreeBSD pcm build failed "unable to find library -lPCM_STATIC"

# ls
pcm
# cd pcm
# mkdir build
# cd build
# cmake ..
-- The C compiler identification is Clang 6.0.1
-- The CXX compiler identification is Clang 6.0.1
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working C compiler: /usr/bin/cc
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/CC
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working CXX compiler: /usr/bin/CC -- works
-- Detecting CXX compiler ABI info
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Detecting CXX compile features - done
-- Looking for pthread.h
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Looking for pthread.h - found
-- Looking for pthread_create
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- System: Isilon OneFS-9.5.0.0
-- Local SIMDJSON exists: /root/pcm2022_2/pcm/src/simdjson/singleheader/simdjson.h
-- Install directory: /usr/local
-- Configuring done
-- Generating done
-- Build files have been written to: /root/pcm2022_2/pcm/build
# cmake --build .
Scanning dependencies of target pcm-raw
[  3%] Building CXX object src/CMakeFiles/pcm-raw.dir/pcm-raw.cpp.obj
[  6%] Building CXX object src/CMakeFiles/pcm-raw.dir/simdjson/singleheader/simdjson.cpp.obj
[  9%] Linking CXX executable ../bin/pcm-raw
/usr/bin/ld: error: unable to find library -lPCM_STATIC
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [bin/pcm-raw] Error 1
gmake[1]: *** [src/CMakeFiles/pcm-raw.dir/all] Error 2
gmake: *** [all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

it seems we can’t support “Platform/Isilon OneFS”

So this is last try

aalexee-2j7qut7-1# cmake ..
-- The C compiler identification is Clang 8.0.1
-- The CXX compiler identification is Clang 8.0.1
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
-- Check for working C compiler: /usr/bin/cc
System is unknown to cmake, create:
Platform/Isilon OneFS to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake

As you can see same issue with clang 8.0.1

Not exactly.

I’d suggest to follow approach of cross-platform building with FreeBSD and try to resolve Cmake issue (if it will appear). Could you please run cmake -DCMAKE_SYSTEM_NAME="FreeBSD" .. instead of cmake ... ?
Please keep Clang 8.1.0 in this run.

@markovamaria Do you have any recommendations?

Please verify, that you have pthreads installed on your host.

And by the way, which version of CMake do you use?

@markovamaria Do you have any recommendations?

@markovamaria 12.0-RELEASE but it is highly modified and run on appliance

# cmake --build .
/usr/local/bin/cmake -H/root/pcm -B/root/pcm/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /root/pcm/build/CMakeFiles /root/pcm/build/CMakeFiles/progress.marks
/usr/local/bin/gmake -f CMakeFiles/Makefile2 all
gmake[1]: Entering directory `/root/pcm/build'
/usr/local/bin/gmake -f src/CMakeFiles/pcm-raw.dir/build.make src/CMakeFiles/pcm-raw.dir/depend
gmake[2]: Entering directory `/root/pcm/build'
cd /root/pcm/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /root/pcm /root/pcm/src /root/pcm/build /root/pcm/build/src /root/pcm/build/src/CMakeFiles/pcm-raw.dir/DependInfo.cmake --color=
gmake[2]: Leaving directory `/root/pcm/build'
/usr/local/bin/gmake -f src/CMakeFiles/pcm-raw.dir/build.make src/CMakeFiles/pcm-raw.dir/build
gmake[2]: Entering directory `/root/pcm/build'
cd /root/pcm/build/src && /usr/bin/CC   -DPCM_SIMDJSON_AVAILABLE -I/root/pcm/src/simdjson/singleheader  -std=gnu++11 -o CMakeFiles/pcm-raw.dir/pcm-raw.cpp.obj -c /root/pcm/src/pcm-raw.cpp
cd /root/pcm/build/src && /usr/bin/CC   -DPCM_SIMDJSON_AVAILABLE -I/root/pcm/src/simdjson/singleheader  -std=gnu++11 -o CMakeFiles/pcm-raw.dir/simdjson/singleheader/simdjson.cpp.obj -c /root/pcm/src/simdjson/singleheader/simdjson.cpp
cd /root/pcm/build/src && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/pcm-raw.dir/link.txt --verbose=1
/usr/bin/CC      CMakeFiles/pcm-raw.dir/pcm-raw.cpp.obj CMakeFiles/pcm-raw.dir/simdjson/singleheader/simdjson.cpp.obj  -o ../bin/pcm-raw -lPCM_STATIC
ld: error: unable to find library -lPCM_STATIC
c++: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[2]: *** [bin/pcm-raw] Error 1
gmake[2]: Leaving directory `/root/pcm/build'
gmake[1]: *** [src/CMakeFiles/pcm-raw.dir/all] Error 2
gmake[1]: Leaving directory `/root/pcm/build'
gmake: *** [all] Error 2

Not sure why but it could be that -lPCM_STATIC is not properly replaced here? As far as I know the library name is not in capitals. @Alexander-Alexeev, can you run the cmake with the -v option like indicated in the error message? I would like to see the exact command that is being executed.