Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760123 - sys-libs/ldb-2.1.4-r1: failed compile (mdb.c:(.text+0x1bdf): undefined reference to `pthread_getspecific')
Summary: sys-libs/ldb-2.1.4-r1: failed compile (mdb.c:(.text+0x1bdf): undefined refere...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-16 07:51 UTC by adrian.miriuta
Modified: 2022-07-30 18:12 UTC (History)
2 users (show)

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


Attachments
emerge --info '=sys-libs/ldb-2.1.4-r1::gentoo' (emerge__info.txt,7.71 KB, text/plain)
2020-12-16 07:51 UTC, adrian.miriuta
Details
build.log (build.log,103.08 KB, text/plain)
2020-12-16 07:52 UTC, adrian.miriuta
Details
emerge -pqv '=sys-libs/ldb-2.1.4-r1::gentoo' (emerge_pqv.txt,2.07 KB, text/plain)
2020-12-16 07:52 UTC, adrian.miriuta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description adrian.miriuta 2020-12-16 07:51:10 UTC
Created attachment 678421 [details]
emerge --info '=sys-libs/ldb-2.1.4-r1::gentoo'

* ERROR: sys-libs/ldb-2.1.4-r1::gentoo failed (compile phase):
 *   build failed
 * 
 * Call stack:
 *     ebuild.sh, line  125:  Called src_compile
 *   environment, line 3610:  Called multilib-minimal_src_compile
 *   environment, line 2285:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2555:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2220:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2218:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  436:  Called multilib-minimal_abi_src_compile
 *   environment, line 2279:  Called multilib_src_compile
 *   environment, line 2767:  Called waf-utils_src_compile
 *   environment, line 4362:  Called die
 * The specific snippet of code:
 *       "${WAF_BINARY}" ${_mywafconfig} ${jobs} "${@}" || die "build failed"
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/ldb-2.1.4-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/ldb-2.1.4-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/ldb-2.1.4-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/ldb-2.1.4-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/ldb-2.1.4-r1/work/ldb-2.1.4-abi_x86_64.amd64'
 * S: '/var/tmp/portage/sys-libs/ldb-2.1.4-r1/work/ldb-2.1.4'
Comment 1 adrian.miriuta 2020-12-16 07:52:03 UTC
Created attachment 678424 [details]
build.log
Comment 2 adrian.miriuta 2020-12-16 07:52:26 UTC
Created attachment 678427 [details]
emerge -pqv '=sys-libs/ldb-2.1.4-r1::gentoo'
Comment 3 Adam 2021-06-12 16:47:12 UTC
I've had a similar issue (another undeined reference to a pthreads function) which i fixed by adding "-pthread" to CFLAGS in my /etc/portage/make.conf
Comment 4 Adam 2021-06-12 18:50:38 UTC
unfortunately, adding "-lpthread" to CFLAGS will cause other ebuild like python to fail.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-16 02:32:47 UTC
(In reply to Adam from comment #4)
> unfortunately, adding "-lpthread" to CFLAGS will cause other ebuild like
> python to fail.

You could add it in e.g. /etc/portage/env/sys-libs/ldb (as a file).

Does this still happen for you? It shouldn't be necessary to do this. Or see https://wiki.gentoo.org/wiki//etc/portage/package.env.
Comment 6 Adam 2021-10-31 04:04:10 UTC
(In reply to Sam James from comment #5)
> (In reply to Adam from comment #4)
> > unfortunately, adding "-lpthread" to CFLAGS will cause other ebuild like
> > python to fail.
> 
> You could add it in e.g. /etc/portage/env/sys-libs/ldb (as a file).
> 
> Does this still happen for you? It shouldn't be necessary to do this. Or see
> https://wiki.gentoo.org/wiki//etc/portage/package.env.

ldb just updated again today, and I got the same error. I just fixed it by adding adding "-lpthread" to CFLAGS in my /etc/portage/make.conf again, and then removing it after it finished.

> You could add it in e.g. /etc/portage/env/sys-libs/ldb (as a file).

I'll do that now, but maybe it's a problem that should be fixed with the ebuild. Is no one else getting this issue?
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-31 08:49:12 UTC
(In reply to Adam from comment #6)
> (In reply to Sam James from comment #5)
> > (In reply to Adam from comment #4)
> > > unfortunately, adding "-lpthread" to CFLAGS will cause other ebuild like
> > > python to fail.
> > 
> > You could add it in e.g. /etc/portage/env/sys-libs/ldb (as a file).
> > 
> > Does this still happen for you? It shouldn't be necessary to do this. Or see
> > https://wiki.gentoo.org/wiki//etc/portage/package.env.
> 
> ldb just updated again today, and I got the same error. I just fixed it by
> adding adding "-lpthread" to CFLAGS in my /etc/portage/make.conf again, and
> then removing it after it finished.
> 
> > You could add it in e.g. /etc/portage/env/sys-libs/ldb (as a file).
> 
> I'll do that now, but maybe it's a problem that should be fixed with the
> ebuild. Is no one else getting this issue?

Oh, now I get it:
>/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: >/usr/local/lib/liblmdb.a(mdb.c.o): in function `mdb_txn_renew0':
>mdb.c:(.text+0x1bdf): undefined reference to `pthread_getspecific'

You have a copy of lmdb in /usr/local/lib which is not linked against libpthread when it should be.

Please remove _everything_ from /usr/local/lib (move it to /usr/local/lib.bak first because anything linked against it may be broken) then rebuild @world.

Having anything in /usr/local/* is dangerous for this sort of reason. They get stale and so on.