Summary: | databases/libmemcached cannot build, undefined reference to symbol | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Miroslav Lachman <000.fbsd> | ||||||
Component: | Individual Port(s) | Assignee: | Matthew Seaman <matthew> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | alex, de-freebsd, m.tsatsenko, matthew, ohartmann, ports | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(m.tsatsenko) |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Description
Miroslav Lachman
2017-05-09 13:55:50 UTC
FYI: I locally reverted the port back to 1.0.18_4 and build works. Hello, Thanks for reporting this! At first could you please attach entire build log. Yes I could not reproduce the issue for now. Also try adding -lthr to the LIBS and report if the problem persists. Created attachment 182454 [details]
poudriere bulk build log
requested build log from Poudriere
(In reply to m.tsatsenko from comment #2) Hello! I have just added -lthr to the LIBS in Makefile and after that I built the port on FreeBSD 10.3 x64 successfully. (In reply to Alexander Kuznetsov from comment #4) I can confirm that works also on FreeBSD 11.0. You can check logs: 1. without lthr: http://uld.bsdserwis.com/pkg/data/11x64-default/2017-05-09_22h23m00s/logs/errors/libmemcached-1.0.18_6.log (error) 2. with lthr: http://uld.bsdserwis.com/pkg/data/11x64-default/2017-05-10_08h37m14s/logs/libmemcached-1.0.18_6.log (success) So patch is very simple :-) Created attachment 182520 [details]
patch
- Fix build by passing -lthr to linker
- Regenerate patches to make portlint happy
QA:
portlint OK
poudrierre 103amd64 OK
(In reply to m.tsatsenko from comment #6) I ran into this problem today on recent 12-CURRENT (as jail: Revision: 318336, same as host) and recent ports tree (revision 440997) within a recent poudriere environment. Host (and jail) has WITH_LLD_IS_LD=yes set. I can not fathom from the thread here whether the problem has been fixed AND committed, nor did I apply the patch provided (since I though it has been committed within the past week). [...] c++ -std=c++0x -DHAVE_CONFIG_H -I. -isystem /usr/local/include -fvisibility=hidden -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -D__STDC_CONSTANT_MACROS -isystem /usr/local/include -g -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmissing-field-initializers -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wc++11-compat -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -fPIE -Wsizeof-pointer-memaccess -Wpacked -MT clients/execute.o -MD -MP -MF $depbase.Tpo -c -o clients/execute.o clients/execute.cc &&\ mv -f $depbase.Tpo $depbase.Po /bin/sh ./libtool --tag=CXX --mode=link c++ -std=c++0x -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -D__STDC_CONSTANT_MACROS -isystem /usr/local/include -g -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmissing-field-initializers -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wc++11-compat -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -fPIE -Wsizeof-pointer-memaccess -Wpacked -fstack-protector -o clients/memaslap clients/memaslap.o clients/ms_conn.o clients/ms_setting.o clients/ms_sigsegv.o clients/ms_stats.o clients/ms_task.o clients/ms_thread.o clients/generator.o clients/execute.o -levent clients/libutilities.la libmemcached/libmemcached.la -L/usr/local/lib -lexecinfo -L/usr/local/lib libtool: link: c++ -std=c++0x -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -D__STDC_CONSTANT_MACROS -isystem /usr/local/include -g -Wno-unknown-pragmas -Wno-pragmas -Wall -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmissing-field-initializers -Wnon-virtual-dtor -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wc++11-compat -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -fPIE -Wsizeof-pointer-memaccess -Wpacked -fstack-protector -o clients/.libs/memaslap clients/memaslap.o clients/ms_conn.o clients/ms_setting.o clients/ms_sigsegv.o clients/ms_stats.o clients/ms_task.o clients/ms_thread.o clients/generator.o clients/execute.o -levent clients/.libs/libutilities.a -L/usr/local/lib libmemcached/.libs/libmemcached.so -lexecinfo -Wl,-rpath -Wl,/usr/local/lib /usr/bin/ld: error: clients/ms_thread.c:291: undefined symbol 'pthread_create' c++: error: linker command failed with exit code 1 (use -v to see invocation) Today i was also hit by this. Added the -lthr to LIBS and it built just fine. I am on 10.3-RELEASE-p16 A commit references this bug: Author: matthew Date: Fri Jun 9 16:45:35 UTC 2017 New revision: 443019 URL: https://svnweb.freebsd.org/changeset/ports/443019 Log: Fix the build of libmemcached: add -lthr to the libraries plus modifications to the autoconf files. PR: 219168 Submitted by: m.tsatsenko@gmail.com (maintainer) Reported by: 000.fbsd@quip.cz Approved by: m.tsatsenko@gmail.com (maintainer) Changes: head/databases/libmemcached/Makefile head/databases/libmemcached/files/patch-bug1245562 head/databases/libmemcached/files/patch-bug1400560 head/databases/libmemcached/files/patch-libmemcached_assert.hpp head/databases/libmemcached/files/patch-libtest_lite.h head/databases/libmemcached/files/patch-log.hpp head/databases/libmemcached/files/patch-m4_ax__debug.m4 head/databases/libmemcached/files/patch-util_log.hpp Committed, thanks! With SASL disabled, could you try this one instead of pulling in libltr? I've compared the build log of successful builds (SASL enabled) and failed builds (SASL disabled). The only difference is that "-pthread" is missing in the failing command. If you add it back, it builds fine. Index: Makefile =================================================================== --- Makefile (revision 443022) +++ Makefile (working copy) @@ -23,8 +23,8 @@ --without-sphinx-build \ --enable-libmemcachedprotocol -LIBS+= -L${LOCALBASE}/lib -lexecinfo -lthr -CXXFLAGS+= -D__STDC_CONSTANT_MACROS +LIBS+= -L${LOCALBASE}/lib -lexecinfo +CXXFLAGS+= -D__STDC_CONSTANT_MACROS -pthread OPTIONS_DEFINE= DEBUG DTRACE MEMASLAP SASL OPTIONS_DEFAULT= MEMASLAP SASL MURMUR FNV64 Thanks. I'm just compile testing with each of the SASL option settings. A commit references this bug: Author: matthew Date: Fri Jun 9 19:06:42 UTC 2017 New revision: 443036 URL: https://svnweb.freebsd.org/changeset/ports/443036 Log: Fix the build in a better way -- this works irrespective of the SASL option setting PR: 219168 Submitted by: sunpoet Changes: head/databases/libmemcached/Makefile Thanks! |