The cmake error log is misleading and I was misled by it before. CMake will try multiple linking flags to test the available of pthread library, including -lpthread, -lpthreads, and -pthread. So, there will always be errors messages about pthread.
Unfortunately, the real reason that causes the cmake failure sometimes only is shown on the terminal. On Thu, Jul 19, 2018 at 4:10 PM William Cohen <wco...@redhat.com> wrote: > I was trying to build a git checkout of dyninst on Fedora 28 and the cmake > failed. Below is the cmake that I copied from the the rpmbuild of > dyninst-9.3.2 srpm on Fedora 28: > > /usr/bin/cmake -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG > -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG > -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG > -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr > -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 > -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share > -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_STATIC_LIBS=1 > -DINSTALL_LIB_DIR:PATH=/usr/lib64/dyninst > -DINSTALL_INCLUDE_DIR:PATH=/usr/include/dyninst > -DINSTALL_CMAKE_DIR:PATH=/usr/lib64/cmake/Dyninst -DCMAKE_BUILD_TYPE=None > -DCMAKE_SKIP_RPATH:BOOL=YES > > > Attached is the CMakeError.log file saying that it was unable to test for > pthread_create because -lpthreads could not be found. Shouldn't that be > "-lpthread"? > > > /usr/lib64/ccache/cc -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic > CMakeFiles/cmTC_6b097.dir/CheckFunctionExists.c.o -o cmTC_6b097 -lpthreads > /usr/bin/ld: cannot find -lpthreads > > > A git bisect showed the failure is triggered by the following patch: > > commit 45feff81435754b317f980e33a9bad7de4846de5 > Author: Xiaozhu Meng <xm...@cs.wisc.edu> > Date: Fri Dec 29 10:26:49 2017 -0600 > > Add unstrip and codeCoverage to the example dir. Will build and install > them with Dyninst > > Anyone else noticed this type of problem before? Maybe a bug with cmake > on Fedora 28? > > -Will >
_______________________________________________ Dyninst-api mailing list Dyninst-api@cs.wisc.edu https://lists.cs.wisc.edu/mailman/listinfo/dyninst-api