tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

devel/snappy fails to build on CentOS 7




gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0xc): undefined reference to `pthread_getspecific' gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalISt6vectorINS0_9TraceInfoESaIS3_EEE16GetOrCreateValueEv]+0x72): undefined reference to `pthread_setspecific' /home/bacon/Pkgsrc/pkg/lib/libgtest.a(gtest-all.cc.o): In function `testing::internal::ThreadLocal<testing::TestPartResultReporterInterface*>::GetOrCreateValue() const': gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0xc): undefined reference to `pthread_getspecific' gtest-all.cc:(.text._ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv[_ZNK7testing8internal11ThreadLocalIPNS_31TestPartResultReporterInterfaceEE16GetOrCreateValueEv]+0x62): undefined reference to `pthread_setspecific'
collect2: error: ld returned 1 exit status
*** Error code 1

Stop.

This fixes the issue:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/snappy/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- Makefile    27 Aug 2017 09:13:16 -0000    1.12
+++ Makefile    25 Dec 2018 13:53:48 -0000
@@ -16,6 +16,12 @@

 CMAKE_ARGS+=    -DBUILD_SHARED_LIBS=ON

+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "Linux"
+LDFLAGS+=    -lpthread
+.endif
+
 .include "../../archivers/lzo/buildlink3.mk"
 .include "../../devel/googletest/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
cvs diff: Diffing patches



Home | Main Index | Thread Index | Old Index