Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670757 - app-admin/metalog-3-r2 merge fails during stage3 because of libpthread.so.0: undefined reference to ...
Summary: app-admin/metalog-3-r2 merge fails during stage3 because of libpthread.so.0: ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-11-09 14:06 UTC by Patrik Osgnach
Modified: 2018-12-20 16:17 UTC (History)
0 users

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


Attachments
Possible patch to fix the problem (metalog-libpthread.patch,604 bytes, patch)
2018-11-09 14:09 UTC, Patrik Osgnach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Osgnach 2018-11-09 14:06:52 UTC
app-admin/metalog-3-r2 merge fails during stage3 of prefix build because of undefined references in libpthread.so.0
The error is:
x86_64-pc-linux-gnu-gcc -std=gnu99 -std=gnu99 -Wall -W -Wcast-qual -Wcast-align -Wmissing-noreturn -Wbad-function-cast -Wstrict-prototypes -Wwrite-strings -Wreturn-type
-O2 -pipe -O2 -pipe   -Wl,-O1 -Wl,--as-needed -o metalog metalog.o ../gnulib/lib/libgnu.a -lpcre
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__getrlimit@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__twalk@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__tsearch@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__h_errno@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `memcpy@GLIBC_2.14'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__mktemp@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__ctype_init@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__tfind@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__madvise@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__libc_vfork@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__call_tls_dtors@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__clock_gettime@GLIBC_PRIVATE'
/tmp/gentoo_playground/usr/bin/ld: /tmp/gentoo_playground/lib64/libpthread.so.0: undefined reference to `__tdelete@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status

I managed to solve this by building metalog with LDFLAGS="$LDFLAGS -lpthread".
I attach a patch

Reproducible: Always
Comment 1 Patrik Osgnach 2018-11-09 14:09:13 UTC
Created attachment 554627 [details, diff]
Possible patch to fix the problem
Comment 2 Larry the Git Cow gentoo-dev 2018-11-15 22:53:53 UTC
The bug has been referenced in the following commit(s):

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

commit e89960b35cf778df12786199f79b7634746de3ec
Author:     Patrick McLean <chutzpah@gentoo.org>
AuthorDate: 2018-11-15 22:50:32 +0000
Commit:     Patrick McLean <chutzpah@gentoo.org>
CommitDate: 2018-11-15 22:52:08 +0000

    app-admin/metalog: Version bump to 20181125 (bug #664344)
    
    Update HOMEPAGE to GitHub site
    
    Closes: https://bugs.gentoo.org/664344
    Closes: https://bugs.gentoo.org/669694
    Bug: https://bugs.gentoo.org/210711
    Bug: https://bugs.gentoo.org/670757
    Package-Manager: Portage-2.3.51, Repoman-2.3.12
    Signed-off-by: Patrick McLean <chutzpah@gentoo.org>

 app-admin/metalog/Manifest                |  1 +
 app-admin/metalog/files/metalog.initd-r1  | 28 ++++++++++++++
 app-admin/metalog/metalog-20181125.ebuild | 64 +++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+)
Comment 3 Patrik Osgnach 2018-11-16 11:08:27 UTC
This new version of metalog breaks in a different way:

./configure: line 6849: syntax error near unexpected token `-Wall,WFLAGS="$WFLAGS -Wall"'
./configure: line 6849: `AX_CHECK_COMPILE_FLAG(-Wall,WFLAGS="$WFLAGS -Wall")'
Comment 4 Fabian Groffen gentoo-dev 2018-12-06 10:51:36 UTC
I'd like to know why metalog is pulled in in the first place, a Prefix shouldn't have a logger daemon.  Do you happen to have a list of packages or dependency trail?
Comment 5 Benda Xu gentoo-dev 2018-12-20 15:50:56 UTC
(In reply to Fabian Groffen from comment #4)
> I'd like to know why metalog is pulled in in the first place, a Prefix
> shouldn't have a logger daemon.  Do you happen to have a list of packages or
> dependency trail?

It is pulled in by gnupg, which is pulled in by portage[rsync-verify]
Comment 6 Larry the Git Cow gentoo-dev 2018-12-20 16:17:40 UTC
The bug has been closed via the following commit(s):

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

commit daf1b659945e2a459fded63799084068bbdfd531
Author:     Benda Xu <heroxbd@gentoo.org>
AuthorDate: 2018-12-20 16:02:38 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2018-12-20 16:15:07 +0000

    profiles/features/prefix/package.use: disable rsync-verify by default.
    
    Closes: https://bugs.gentoo.org/670757
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 profiles/features/prefix/package.use | 2 ++
 1 file changed, 2 insertions(+)

Additionally, it has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86c5479fa7b12f81f11fc38033bfc9859eabf0ff

commit 86c5479fa7b12f81f11fc38033bfc9859eabf0ff
Author:     YiFei Zhu <zhuyifei1999@gmail.com>
AuthorDate: 2018-11-25 00:40:56 +0000
Commit:     Benda Xu <heroxbd@gentoo.org>
CommitDate: 2018-12-20 16:15:07 +0000

    app-admin/metalog: DEPEND on sys-devel/autoconf-archive
    
    Its autoconf requires AX_CHECK_COMPILE_FLAG macro from
    sys-devel/autoconf-archive, or otherwise configure will
    fail with syntax error from unexpanded macro invocation.
    
    Closes: https://bugs.gentoo.org/671464
    Closes: https://github.com/gentoo/gentoo/pull/10473
    Bug: https://bugs.gentoo.org/670757
    Package-Manager: Portage-2.3.52, Repoman-2.3.12
    Signed-off-by: YiFei Zhu <zhuyifei1999@gmail.com>
    Signed-off-by: Benda Xu <heroxbd@gentoo.org>

 app-admin/metalog/metalog-20181125.ebuild | 1 +
 1 file changed, 1 insertion(+)