Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616302 - dev-db/pgpool2-3.7.0, 3.7.1, 3.7.3 USE=memcached and GCC 6.4.0-r1 - configure: error: libmemcached is not installed
Summary: dev-db/pgpool2-3.7.0, 3.7.1, 3.7.3 USE=memcached and GCC 6.4.0-r1 - configure...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on: 665104
Blocks:
  Show dependency tree
 
Reported: 2017-04-22 12:37 UTC by Thomas Beutin
Modified: 2018-09-21 16:05 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,12.16 KB, text/plain)
2017-04-22 12:37 UTC, Thomas Beutin
Details
/var/tmp/portage/dev-db/pgpool2-3.6.1/work/pgpool-II-3.6.1/config.log (pgpool-II-3.6.1-config.log,169.36 KB, text/plain)
2017-04-22 13:29 UTC, Thomas Beutin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Beutin 2017-04-22 12:37:43 UTC
Created attachment 470634 [details]
build.log

...
checking libmemcached/memcached.h usability... yes
checking libmemcached/memcached.h presence... yes
checking for libmemcached/memcached.h... yes
checking for memcached_create in -lmemcached... no
configure: error: libmemcached is not installed

phantom ~ # nice -n 19 emerge --info dev-db/pgpool2
Portage 2.3.3 (python 2.7.12-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r3, 4.9.6-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.9.6-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-2520M_CPU_@_2.50GHz-with-gentoo-2.3
KiB Mem:    16357900 total,   1636516 free
KiB Swap:   33554428 total,  33554428 free
Timestamp of repository gentoo: Fri, 21 Apr 2017 20:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.1-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.24.2::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

barzog-overlay
    location: /mnt/gentoo/layman/barzog-overlay
    masters: gentoo
    priority: 50

desktop-effects
    location: /mnt/gentoo/layman/desktop-effects
    masters: gentoo
    priority: 50

gentoo-mate
    location: /mnt/gentoo/layman/gentoo-mate
    masters: gentoo
    priority: 50

java
    location: /mnt/gentoo/layman/java
    masters: gentoo
    priority: 50

prism-overlay
    location: /mnt/gentoo/layman/prism-overlay
    masters: gentoo
    priority: 50

python
    location: /mnt/gentoo/layman/python
    masters: gentoo
    priority: 50

rion
    location: /mnt/gentoo/layman/rion
    masters: gentoo
    priority: 50

science
    location: /mnt/gentoo/layman/science
    masters: gentoo
    priority: 50

seden
    location: /mnt/gentoo/layman/seden
    masters: gentoo
    priority: 50

sunrise
    location: /mnt/gentoo/layman/sunrise
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/fax /usr/share/gnupg/qualified.txt /var/spool/fax/etc /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=corei7-avx -fomit-frame-pointer -O2 -pipe"
DISTDIR="/mnt/gentoo/distfiles/"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="/usr/lib/systemd/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="R X X509 a52 aac aalib accounting acl acpi adns aim aio alsa amd64 amr ansi ao aot apache2 apng applet archive ass audio audiofile automount avahi avx awt bacula-console bash-completion bazaar bcmath berkdb bidi bind-mysql bittorrent blas bluetooth bluray bonobo boost bzip2 cacert cairo caja calendar caps ccache cdb cdda cddb cdio cdparanoia cdr cgi chipcard chroot colord command-args consolekit corefonts cpudetection cpulimit cracklib cramfs crypt cscope css csv ctype cups curl curlwrappers customlog cvs cvsgraph cxx cyrus dba dbi dbm dbus dbx devhelp device-mapper devmap dga dhcp dirac directfb djvu dlna dlopen dnsdb dri dri3 drm dts dv dvb dvd dvdr dvi ecc egl enchant encode excel exif expat faad fam fastcgi fat fdk ffmpeg fftw fits flac flash flatfile fltk fontconfig fonts fpx ftp fuse fusefs gallium gd gdal gdbm gdu geoip geos gif gimp ginac git glib glpk glut gmp gnome-keyring gnuplot gpg gphoto2 graphviz gs gsf gsl gssapi gstreamer gtk gtk2 gtk3 gudev gzip h323 hardened hardenedphp hddtemp hdf5 hdri highlight hpn html http hunspell hwdb iconv icq icu idea idled idn imap imlib imlib2 inifile innodb int64 introspection ios ipalias ipc ipod ipv6 iso jabber jack java javascript jbig jingle jit jpeg jpeg2k json kdrive kerberos keymap kmod kpathsea lame lapack latex lcms ldap less libass libnotify libsamplerate libv4l libv4l2 libwww live llvm lm_sensors lmtp logrotate logwatch lua lzma lzo mad magic matroska mbox mcal md5sum memlimit mercurial metis mgetty mhash midi milter mime mimencode ming mmap mms mmx mmxext mng mp3 mp4 mpeg mplayer msn mtp multilib mumps musepack musicbrainz mysql mysqli nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh ncurses netboot netcdf netlink network network-uri networkmanager nfs nis nls nntp nptl nsplugin nss ntfs ntp oav ocaml ocamlopt ocatve octave odbc offensive ogg openal opencl openexr opengl openmp openrc openssh openssl orc osc oscar pam pam_chroot pam_console pam_timestamp pango parse-clocks pcf pcntl pcre pda pdf pdfkit pdflib perl pgo php pic plotutils png policykit portaudio posix postfix postgis postgres postproc postscript ppds procmail ps pulseaudio pwdb python qdbm qt5 quotas quvi radius raw rdesktop rdp readline recode reiserfs rpc rrdtool rss rtmp samba sample sasl scanner schroedinger scotch screen sendfile sensord session sftp sftplogging shaper shared sharedext shorten sieve simplexml slang slp smartcard smime smp sms smtp sna sndfile snmp snortsam soap sockets socks5 sound sox spamassassin sparse spatialite speex spell spice spl sql sqlite sqlite3 sse sse2 sse3 sse4 sse4_1 ssh ssl ssse3 stream subversion svg sysfs syslog sysvipc szip t1lib taglib tcpd telepathy theora threads tidy tiff timidity tokenizer tools transparent-proxy truetype truetype-fonts tslib type1-fonts udev udisks unicode upnp upnp-av upower usb userlocales utf8 uuid v4l vaapi vala vcd vdpau vhosts video vim-syntax virtual-users virus-scan vnc vorbis vpx vte wayland wddx weather webdav webkit webm webp wifi win32codecs withsamplescripts wmf x264 x265 xattr xcb xcomposite xetex xface xfs xft xinerama xinetd xml xml2 xmlrpc xmp xmpp xorg xosd xpdf-headers xpm xps xrandr xscreensaver xsl xslt xv xvfb xvid xvmc yahoo yaml yaz zlib zvbi" ABI_X86="32 64" APACHE2_MODULES="access auth auth_basic auth_digest authn_default authn_core authn_file authn_dbm authn_dbd authn_alias authn_anon authz_core authz_groupfile authz_host authz_user authz_dbd authz_dbm authz_owner authz_default dbd ident imagemap alias echo charset_lite cache file_cache disk_cache mem_cache ext_filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy proxy_connect proxy_ftp http2 proxy_html proxy_http proxy_ajp proxy_balancer proxy_fcgi proxy_wstunnel expires headers usertrack info include cgi cgid dav dav_lock dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status substitute autoindex asis negotiation dir imap actions userdir so unique_id version dumpio log_forensic reqtimeout socache_shmcb unixd slotmem_shm ratelimit remoteip lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat" APACHE2_MPMS="worker" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="nss" ELIBC="glibc" FFTOOLS="cws2fws qt-faststart aviocat ismindex" GPSD_PROTOCOLS="aivdm sirf mtk3301 gpsclock superstar2 timing nmea" GRUB_PLATFORMS="pc multiboot efi coreboot efi-64" INPUT_DEVICES="keyboard mouse evdev wacom synaptics" KERNEL="linux" L10N="en_GB en en_US de_DE de" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer nlpsolver pdfimport wiki-publisher" LINGUAS="en_GB en en_US de_DE de" LLVM_TARGETS="X86 NVPTX" PHP_TARGETS="php5-6 php7-0" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby21" SANE_BACKENDS="net hp" USERLAND="GNU" VIDEO_CARDS="vga intel i915 i965 fbdev vesa" XFCE_PLUGINS="clock multiload-nandhp power trash"
USE_PYTHON="2.7 3.4"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2017-04-22 13:24:31 UTC
configure: error: libmemcached is not installed

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-db/pgpool2-3.6.1/work/pgpool-II-3.6.1/config.log

I guess you didn't read that.
Comment 2 Thomas Beutin 2017-04-22 13:29:02 UTC
Created attachment 470636 [details]
/var/tmp/portage/dev-db/pgpool2-3.6.1/work/pgpool-II-3.6.1/config.log

Sorry, i really didn't read that...
Comment 3 Thomas Beutin 2017-04-22 13:36:36 UTC
I guess that's the point:
[...]
configure:12670: checking for main in -lsocket
configure:12689: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lsocket  -lnsl -lm  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lsocket
collect2: error: ld returned 1 exit status
[...]

and i don't have a libsocket on my system, at least

locate libsocket | grep 'libsocket\.'

doesn't give anything.
Comment 4 Aaron W. Swenson gentoo-dev 2017-04-22 14:22:20 UTC
(In reply to Thomas Beutin from comment #3)
> I guess that's the point:
> [...]
> configure:12670: checking for main in -lsocket
> configure:12689: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx
> -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes
> -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lsocket  -lnsl
> -lm  >&5
> /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/
> ld: cannot find -lsocket
> collect2: error: ld returned 1 exit status
> [...]
> 
> and i don't have a libsocket on my system, at least
> 
> locate libsocket | grep 'libsocket\.'
> 
> doesn't give anything.

This is kind of looking like you haven't done all the steps to upgrade your GCC to 5.4.0.
Comment 5 Thomas Beutin 2017-04-22 14:37:09 UTC
(In reply to Aaron W. Swenson from comment #4)
> (In reply to Thomas Beutin from comment #3)
> > I guess that's the point:
> > [...]
> > configure:12670: checking for main in -lsocket
> > configure:12689: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx
> > -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes
> > -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lsocket  -lnsl
> > -lm  >&5
> > /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/
> > ld: cannot find -lsocket
> > collect2: error: ld returned 1 exit status
> > [...]
> > 
> > and i don't have a libsocket on my system, at least
> > 
> > locate libsocket | grep 'libsocket\.'
> > 
> > doesn't give anything.
> 
> This is kind of looking like you haven't done all the steps to upgrade your
> GCC to 5.4.0.

Hm, even on a non-GCC-upgraded system this error occurs (and no libsocket exists) - do you have any hint for me?
Comment 6 Aaron W. Swenson gentoo-dev 2017-04-22 15:57:28 UTC
(In reply to Thomas Beutin from comment #5)
> (In reply to Aaron W. Swenson from comment #4)
> > (In reply to Thomas Beutin from comment #3)
> > > I guess that's the point:
> > > [...]
> > > configure:12670: checking for main in -lsocket
> > > configure:12689: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx
> > > -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes
> > > -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lsocket  -lnsl
> > > -lm  >&5
> > > /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/
> > > ld: cannot find -lsocket
> > > collect2: error: ld returned 1 exit status
> > > [...]
> > > 
> > > and i don't have a libsocket on my system, at least
> > > 
> > > locate libsocket | grep 'libsocket\.'
> > > 
> > > doesn't give anything.
> > 
> > This is kind of looking like you haven't done all the steps to upgrade your
> > GCC to 5.4.0.
> 
> Hm, even on a non-GCC-upgraded system this error occurs (and no libsocket
> exists) - do you have any hint for me?

Oh, I replied to the wrong comment. The -lsocket is noncritical. Configure is just trying to find a socket definition somewhere, and -lsocket is not it.

For the memcached bit, it's working for me on GCC 4.9.4, but I won't be able to check 5.4.0 for a while.
Comment 7 Thomas Beutin 2017-04-22 18:30:19 UTC
(In reply to Aaron W. Swenson from comment #6)
> (In reply to Thomas Beutin from comment #5)
> > (In reply to Aaron W. Swenson from comment #4)
> > > (In reply to Thomas Beutin from comment #3)
> > > > I guess that's the point:
> > > > [...]
> > > > configure:12670: checking for main in -lsocket
> > > > configure:12689: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx
> > > > -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes
> > > > -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lsocket  -lnsl
> > > > -lm  >&5
> > > > /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../x86_64-pc-linux-gnu/bin/
> > > > ld: cannot find -lsocket
> > > > collect2: error: ld returned 1 exit status
> > > > [...]
> > > > 
> > > > and i don't have a libsocket on my system, at least
> > > > 
> > > > locate libsocket | grep 'libsocket\.'
> > > > 
> > > > doesn't give anything.
> > > 
> > > This is kind of looking like you haven't done all the steps to upgrade your
> > > GCC to 5.4.0.
> > 
> > Hm, even on a non-GCC-upgraded system this error occurs (and no libsocket
> > exists) - do you have any hint for me?
> 
> Oh, I replied to the wrong comment. The -lsocket is noncritical. Configure
> is just trying to find a socket definition somewhere, and -lsocket is not it.
> 
> For the memcached bit, it's working for me on GCC 4.9.4, but I won't be able
> to check 5.4.0 for a while.

I i changed "my" bug to:

configure:14824: checking for memcached_create in -lmemcached
configure:14849: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations  -Wl,-O1 -Wl,--a
s-needed conftest.c -lmemcached  -lpam -lssl -lcrypto -lcrypt -lresolv -lnsl -lm  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status

on machines w/ gcc 4.9.4 and 5.4.0-r3, but cannot reproduce the original bug anymore :-/
Comment 8 Aaron W. Swenson gentoo-dev 2017-04-23 14:54:20 UTC
This is looking like an issue with 5.4.0.

Compiling on my desktop where the only difference from the laptop I tested on yesterday is a different GCC version.
Comment 9 Thomas Beutin 2017-04-25 09:53:01 UTC
(In reply to Aaron W. Swenson from comment #8)
> This is looking like an issue with 5.4.0.
> 
> Compiling on my desktop where the only difference from the laptop I tested
> on yesterday is a different GCC version.

After a complete recompile of the whole system it works now. Sorry for the noise...
Comment 10 Aaron W. Swenson gentoo-dev 2017-04-25 11:37:52 UTC
(In reply to Thomas Beutin from comment #9)
> (In reply to Aaron W. Swenson from comment #8)
> > This is looking like an issue with 5.4.0.
> > 
> > Compiling on my desktop where the only difference from the laptop I tested
> > on yesterday is a different GCC version.
> 
> After a complete recompile of the whole system it works now. Sorry for the
> noise...

Huh, it still doesn't work for me. Would you post your "emerge --info" again. I must be missing something.
Comment 11 Thomas Beutin 2017-04-25 11:56:57 UTC
(In reply to Aaron W. Swenson from comment #10)
> (In reply to Thomas Beutin from comment #9)
> > (In reply to Aaron W. Swenson from comment #8)
> > > This is looking like an issue with 5.4.0.
> > > 
> > > Compiling on my desktop where the only difference from the laptop I tested
> > > on yesterday is a different GCC version.
> > 
> > After a complete recompile of the whole system it works now. Sorry for the
> > noise...
> 
> Huh, it still doesn't work for me. Would you post your "emerge --info"
> again. I must be missing something.

You're right, the problem is still there - i forgot to activate the "memcached" USE flag.
Comment 12 Aaron W. Swenson gentoo-dev 2017-07-10 15:14:53 UTC
Looks fixed 3.6.4.
Comment 13 Thomas Beutin 2017-07-11 02:36:30 UTC
It's not fixed in dev-db/pgpool2-3.6.4::gentoo:
[...]
checking libmemcached/memcached.h usability... yes
checking libmemcached/memcached.h presence... yes
checking for libmemcached/memcached.h... yes
checking for memcached_create in -lmemcached... no
configure: error: libmemcached is not installed
Comment 14 Thomas Beutin 2017-07-11 02:46:27 UTC
according to memcached_create(3) this function is deprecated:

"Please note, when you write new application use memcached() over memcached_create()."

May this triggers the issue here?
Comment 15 Thomas Beutin 2017-07-11 04:33:51 UTC
(In reply to Thomas Beutin from comment #14)
> according to memcached_create(3) this function is deprecated:
> 
> "Please note, when you write new application use memcached() over
> memcached_create()."
> 
> May this triggers the issue here?

No, the error is clearly visible in the /var/tmp/portage/dev-db/pgpool2-3.6.4/work/pgpool-II-3.6.4-9.6/config.log:

[...]
configure:14849: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx -fomit-frame-pointer -O2 -pipe -Wall -Wmissing-prototypes -Wmissing-declarations  -Wl,-O1 -Wl,--as-needed conftest.c -lmemcached  -lpam -lssl -lcrypto -lcrypt -lresolv -lnsl -lm  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libmemcached.so: undefined reference to `pthread_once'
[...]
Comment 16 Thomas Beutin 2017-07-11 05:10:42 UTC
After recompiling =dev-libs/libmemcached-1.0.18-r3::gentoo the error in the config.log changed to:


configure:11956: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx -fomit-frame-pointer -O2 -pipe  -Wl,-O1 -Wl,--as-needed conftest.c   >&5
/var/tmp/portage/dev-db/pgpool2-3.6.4/temp/ccsA1DCx.o: In function `yylex':
conftest.c:(.text+0xa57): undefined reference to `yywrap'
conftest.c:(.text+0xf63): undefined reference to `yywrap'
/var/tmp/portage/dev-db/pgpool2-3.6.4/temp/ccsA1DCx.o: In function `main':
conftest.c:(.text.startup+0x9): undefined reference to `yywrap'
collect2: error: ld returned 1 exit status


(which also might be a gcc-5.4.x upgrade leftover issue, but i couldn't figure it out by now)
Comment 17 Aaron W. Swenson gentoo-dev 2017-07-11 12:25:29 UTC
(In reply to Thomas Beutin from comment #16)
> After recompiling =dev-libs/libmemcached-1.0.18-r3::gentoo....

I don't know if it's related, but how about net-misc/memcached?
Comment 18 Aaron W. Swenson gentoo-dev 2017-07-12 12:29:53 UTC
(In reply to Thomas Beutin from comment #16)
> After recompiling =dev-libs/libmemcached-1.0.18-r3::gentoo the error in the
> config.log changed to:
> 
> 
> configure:11956: x86_64-pc-linux-gnu-gcc -o conftest -march=corei7-avx
> -fomit-frame-pointer -O2 -pipe  -Wl,-O1 -Wl,--as-needed conftest.c   >&5
> /var/tmp/portage/dev-db/pgpool2-3.6.4/temp/ccsA1DCx.o: In function `yylex':
> conftest.c:(.text+0xa57): undefined reference to `yywrap'
> conftest.c:(.text+0xf63): undefined reference to `yywrap'
> /var/tmp/portage/dev-db/pgpool2-3.6.4/temp/ccsA1DCx.o: In function `main':
> conftest.c:(.text.startup+0x9): undefined reference to `yywrap'
> collect2: error: ld returned 1 exit status
> 
> 
> (which also might be a gcc-5.4.x upgrade leftover issue, but i couldn't
> figure it out by now)

Good news!

I still have this issue on my desktop. My laptop is the one that isn't having an issue. It's also the one that isn't running into issues with symlinks (bug 620244). I'm beginning to think my laptop really likes me.

My laptop has 5.4.0 on it, but I pretty much did an "emerge -e system" on it because I was dumb and tried to update packages while also upgrading GCC. There must be something else at play here than just GCC 5.4.0.
Comment 19 Aaron W. Swenson gentoo-dev 2017-07-13 11:03:19 UTC
It's working for me.

I tried reemerging several packages (libtool, net-misc/memcached, libevent, libmemcached, glibc, and probably some other ones), but none of these worked.

What worked is doing:
    emerge -e @system

    emerge -1 net-misc/memcached dev-libs/libmemcached

    emerge dev-db/pgpool2


As this isn't really a bug with dev-db/pgpool2 itself, I'm closing this as invalid.
Comment 20 Thomas Beutin 2017-09-12 13:31:16 UTC
Sorry, but i have to reopen this. I did a
emerge -ve @system
on one of my machines, and the issue is still there

# nice -n -19 emerge --info dev-db/pgpool2
Portage 2.3.6 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r4, 4.12.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.5-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5-2680_v2_@_2.80GHz-with-gentoo-2.3
KiB Mem:   264192356 total, 131218852 free
KiB Swap:   16777212 total,  16777212 free
Timestamp of repository gentoo: Tue, 12 Sep 2017 10:00:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.28::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

sunrise
    location: /var/lib/layman/sunrise
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=ivybridge -fomit-frame-pointer -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=ivybridge -fomit-frame-pointer -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j50"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X509 aac aacplus aalib accounting acl adns aim amd64 ansi apache2 audit automount autotrace bacula-console bash-completion bcmath bidi bind-mysql bittorrent bzip2 cairo calendar caps ccache cdb cgi chipcard chroot command-args corefonts cpudetection cpulimit cracklib cramfs cron crypt cscope css csv ctype curl curlwrappers customlog cvsgraph cxx cyrus dba dbi dbm dbx device-mapper devmap dhcp djvu dlopen dnsdb ecc emf encode enscript exif expat fam fastcgi ffmpeg fftw fits flac flash flatfile fontconfig fortran fpm fpx ftp gd gdal gdbm geoip geos gif git gmp graphviz gs gzip hardened hardenedphp hdf5 hdri hpn http i18n iconv icq icu idea idled idn imagemagick imap imlib imlib2 inifile innodb ipalias ipv6 jabber jbig jpeg jpeg2k json lapack lcms ldap less libwww lm_sensors lmtp logrotate logwatch lz4 lzma lzo mbox mcal memlimit mgetty mhash milter mime mimencode ming mmap mp3 mpeg mpm-prefork mppe-mppc multilib mysql mysqli nagios-dns nagios-game nagios-ntp nagios-ping nagios-ssh ncurses netboot netcdf netifrc network nfs nls nntp nptl nptlonly oav odbc ogg oggvorbis opencl openexr openmp openrc openssh openssl pam pam_chroot pam_console pam_timestamp pango parse-clocks pcntl pcre pdf pdfkit pdflib perl php pic plotutils png posix postfix postgis postgres postscript procmail proj pwdb python qdbm qemu quotas radius raw readline recode reiserfs rmtp rpc rrdtool rss sample sasl screen sendfile sensord session sftp sftplogging shaper shared sharedext sieve simplexml slang slp smartcard smime smp sms smtp snmp snortsam soap sockets socks5 spamassassin spell spl sql sqlite sqlite3 ssl stream subversion svg sysfs syslog sysvipc szip tcpd theora threads tidy tiff tls tokenizer transparent-proxy truetype truetype-fonts type1-fonts udev unicode userlocales utf8 uuid vhosts vim-syntax virtual-users virus-scan vorbis vpx wddx webp withsamplescripts wmf x264 xattr xfs xinetd xls xml xml2 xmlrpc xpm xsl xslt xvid yahoo yaz zlib" ABI_X86="64" APACHE2_MODULES="access auth auth_basic auth_digest authn_default authn_core authn_file authz_core authz_groupfile authz_host authz_user authn_dbm authn_dbd authz_dbd dbd ident imagemap authn_alias authn_anon authz_dbm authz_owner authz_default authz_user auth_digest authz_host alias file_cache echo charset_lite cache disk_cache mem_cache ext_filter case_filter case-filter-in deflate filter mime_magic cern_meta proxy_ajp proxy_balancer expires http2 headers usertrack proxy proxy_html xml2enc proxy_connect proxy_ftp proxy_http info include cgi cgid dav dav_lock dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status substitute autoindex asis negotiation dir imap actions userdir so unique_id version dumpio log_forensic reqtimeout socache_shmcb unixd proxy_fcgi slotmem_shm ratelimit remoteip lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat proxy_wstunnel macro" APACHE2_MPMS="event" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" KERNEL="linux" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" USERLAND="GNU"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 21 Aaron W. Swenson gentoo-dev 2018-07-22 09:52:52 UTC
I ran into this again, too. This modification of the pgpool ebuild worked for me:

-               myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+               myconf="--with-memcached=\"${EROOT%/}/usr\""
Comment 22 Thomas Beutin 2018-07-25 09:09:07 UTC
(In reply to Aaron W. Swenson from comment #21)
> I ran into this again, too. This modification of the pgpool ebuild worked
> for me:
> 
> -              
> myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
> +               myconf="--with-memcached=\"${EROOT%/}/usr\""

Do we really talk about dev-db/pgpool2?

Because after changig the ebuild using this diff:

# diff -ubB /usr/portage/dev-db/pgpool2/pgpool2-3.7.3.ebuild /usr/local/portage/dev-db/pgpool2/pgpool2-3.7.3-r1.ebuild 
--- /usr/portage/dev-db/pgpool2/pgpool2-3.7.3.ebuild    2018-05-13 19:08:56.000000000 +0200
+++ /usr/local/portage/dev-db/pgpool2/pgpool2-3.7.3-r1.ebuild   2018-07-25 10:59:32.229046654 +0200
@@ -48,7 +48,7 @@
 src_configure() {
        local myconf
        use memcached && \
-               myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
+               myconf="--with-memcached=\"${EROOT%/}/usr\""
        use pam && myconf+=' --with-pam'
 
        postgres-multi_foreach econf \

the build error is exactly the same on my sustem.
Comment 23 Aaron W. Swenson gentoo-dev 2018-07-25 14:25:02 UTC
(In reply to Thomas Beutin from comment #22)
> ...
> 
> the build error is exactly the same on my sustem.

Do you still have a /usr/lib?

# $ ls -l /usr/lib
Comment 24 Thomas Beutin 2018-07-25 15:15:15 UTC
(In reply to Aaron W. Swenson from comment #23)
> (In reply to Thomas Beutin from comment #22)
> > ...
> > 
> > the build error is exactly the same on my sustem.
> 
> Do you still have a /usr/lib?
> 
> # $ ls -l /usr/lib

it's a link:

# ls -ld /usr/lib*
lrwxrwxrwx  1 root root     5 Dec  5  2011 /usr/lib -> lib64
drwxr-xr-x  5 root root  4096 Jul 16 17:36 /usr/lib32
drwxr-xr-x 88 root root 61440 Jul 23 15:31 /usr/lib64
drwxr-xr-x 14 root root  4096 Jul 16 11:39 /usr/libexec
Comment 25 Aaron W. Swenson gentoo-dev 2018-07-25 16:00:03 UTC
(In reply to Thomas Beutin from comment #24)
> (In reply to Aaron W. Swenson from comment #23)
> > (In reply to Thomas Beutin from comment #22)
> > > ...
> > > 
> > > the build error is exactly the same on my sustem.
> > 
> > Do you still have a /usr/lib?
> > 
> > # $ ls -l /usr/lib
> 
> it's a link:
> 
> # ls -ld /usr/lib*
> lrwxrwxrwx  1 root root     5 Dec  5  2011 /usr/lib -> lib64
> drwxr-xr-x  5 root root  4096 Jul 16 17:36 /usr/lib32
> drwxr-xr-x 88 root root 61440 Jul 23 15:31 /usr/lib64
> drwxr-xr-x 14 root root  4096 Jul 16 11:39 /usr/libexec

Would you attach the output of:

equery f --tree dev-libs/libmemcached
Comment 26 Aaron W. Swenson gentoo-dev 2018-07-25 19:13:19 UTC
(In reply to Aaron W. Swenson from comment #25)
> Would you attach the output of:
> 
> equery f --tree dev-libs/libmemcached

Never mind. I think I have the real solution. I think the issue is caused depending on one of the use flags being enabled on libmemcached.

In which case, -lpthreads might need to be added to the LIBS.
Comment 27 Aaron W. Swenson gentoo-dev 2018-07-25 19:37:24 UTC
(In reply to Aaron W. Swenson from comment #26)
> (In reply to Aaron W. Swenson from comment #25)
> > Would you attach the output of:
> > 
> > equery f --tree dev-libs/libmemcached
> 
> Never mind. I think I have the real solution. I think the issue is caused
> depending on one of the use flags being enabled on libmemcached.
> 
> In which case, -lpthreads might need to be added to the LIBS.

Okay, do you have: dev-libs/libmemcached USE="sasl"
Comment 28 Thomas Beutin 2018-07-26 11:40:41 UTC
(In reply to Aaron W. Swenson from comment #27)
> (In reply to Aaron W. Swenson from comment #26)
> > (In reply to Aaron W. Swenson from comment #25)
> > > Would you attach the output of:
> > > 
> > > equery f --tree dev-libs/libmemcached
> > 
> > Never mind. I think I have the real solution. I think the issue is caused
> > depending on one of the use flags being enabled on libmemcached.
> > 
> > In which case, -lpthreads might need to be added to the LIBS.
> 
> Okay, do you have: dev-libs/libmemcached USE="sasl"

yes:

# equery u dev-libs/libmemcached
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-libs/libmemcached-1.0.18-r3:
 U I
 - - debug       : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 + + hsieh       : Use Hsieh hash algorithm.
 - - libevent    : Use the libevent event loop interface.
 + + sasl        : Use sasl auth for communications.
 - - static-libs : Build static versions of dynamic libraries as well
Comment 29 Aaron W. Swenson gentoo-dev 2018-07-26 12:15:02 UTC
(In reply to Thomas Beutin from comment #28)
> (In reply to Aaron W. Swenson from comment #27)
> > Okay, do you have: dev-libs/libmemcached USE="sasl"
> 
> yes:
> 
> # equery u dev-libs/libmemcached
> [ Legend : U - final flag setting for installation]
> [        : I - package is installed with flag     ]
> [ Colors : set, unset                             ]
>  * Found these USE flags for dev-libs/libmemcached-1.0.18-r3:
>  U I
>  - - debug       : Enable extra debug codepaths, like asserts and extra
> output. If you want to get meaningful backtraces see
> https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
>  + + hsieh       : Use Hsieh hash algorithm.
>  - - libevent    : Use the libevent event loop interface.
>  + + sasl        : Use sasl auth for communications.
>  - - static-libs : Build static versions of dynamic libraries as well

Great! There's two options for a workaround:

    1. USE="-sasl" emerge dev-libs/libmemcached
    2. LIBS+=" -lpthread" emerge dev-db/pgpool2

On other systems, substitute "-lpthread" for whatever threading library is actually used.

I'm going to work on a proper fix to configure.ac. The memcached section of it is a bit of a wreck anyway.
Comment 30 Thomas Beutin 2018-07-26 12:37:56 UTC
(In reply to Aaron W. Swenson from comment #29)
> (In reply to Thomas Beutin from comment #28)
> > (In reply to Aaron W. Swenson from comment #27)
> > > Okay, do you have: dev-libs/libmemcached USE="sasl"
> > 
> > yes:
> > 
> > # equery u dev-libs/libmemcached
> > [ Legend : U - final flag setting for installation]
> > [        : I - package is installed with flag     ]
> > [ Colors : set, unset                             ]
> >  * Found these USE flags for dev-libs/libmemcached-1.0.18-r3:
> >  U I
> >  - - debug       : Enable extra debug codepaths, like asserts and extra
> > output. If you want to get meaningful backtraces see
> > https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
> >  + + hsieh       : Use Hsieh hash algorithm.
> >  - - libevent    : Use the libevent event loop interface.
> >  + + sasl        : Use sasl auth for communications.
> >  - - static-libs : Build static versions of dynamic libraries as well
> 
> Great! There's two options for a workaround:
> 
>     1. USE="-sasl" emerge dev-libs/libmemcached
>     2. LIBS+=" -lpthread" emerge dev-db/pgpool2

i decided to take the "2." and it compiles fine for =dev-db/pgpool2-3.7.0 and =dev-db/pgpool2-3.7.3.

Thanks a lot!
Comment 31 Larry the Git Cow gentoo-dev 2018-08-03 13:27:06 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=079ff486c23fdb326e5d58df1433b854ca900e94

commit 079ff486c23fdb326e5d58df1433b854ca900e94
Author:     Aaron W. Swenson <titanofold@gentoo.org>
AuthorDate: 2018-08-03 13:26:51 +0000
Commit:     Aaron W. Swenson <titanofold@gentoo.org>
CommitDate: 2018-08-03 13:26:51 +0000

    dev-db/pgpool2: Bump to 3.7.5
    
    Add a couple patches to fix a few options in
    configure.ac. --without-pam no longer acts as if --with-pam was
    given. Now uses pkg-config to get any special settings for
    libmemcached rather than using fixed sub-directories
    (${user_provided_path}/{include,lib,…}). Lastly, introduced AX_PTHREAD
    to link in the appropriate threading library to fix bug 616302.
    
    If libmemcached was built with USE=sasl which builds against
    cyrus-sasl. cyrus-sasl builds against a threading library which
    necessitates including the same threading in pgpool2 despite pgpool2
    not being a threaded program.
    
    pgpool2 is now able to build against LibreSSL as well as OpenSSL. The
    ebuild now reflects this fact
    
    Bug: https://bugs.gentoo.org/616302
    Bug: https://bugs.gentoo.org/646888
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-db/pgpool2/Manifest                            |   1 +
 .../pgpool2/files/pgpool-configure-memcached.patch |  64 +++++++++++++
 dev-db/pgpool2/files/pgpool-configure-pam.patch    |  25 +++++
 .../pgpool2/files/pgpool-configure-pthread.patch   |  13 +++
 dev-db/pgpool2/files/pgpool2.initd                 |  14 ++-
 dev-db/pgpool2/pgpool2-3.7.5.ebuild                | 104 +++++++++++++++++++++
 dev-db/pgpool2/pgpool2-9999.ebuild                 |  42 +++++----
 dev-db/pgpool2/pgpool2-9999.ebuild.orig            | 104 +++++++++++++++++++++
 8 files changed, 343 insertions(+), 24 deletions(-)