Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 472728 - sys-apps/busybox-1.21.0: ld: cannot find -l-pthread
Summary: sys-apps/busybox-1.21.0: ld: cannot find -l-pthread
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-09 09:17 UTC by qdii
Modified: 2013-08-25 14:56 UTC (History)
1 user (show)

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


Attachments
build log (build.log,438.52 KB, text/plain)
2013-06-09 09:18 UTC, qdii
Details
environment (environment,100.02 KB, text/plain)
2013-06-09 09:22 UTC, qdii
Details
emerge --info '=sys-apps/busybox-1.21.0' (emerge-info,4.47 KB, text/plain)
2013-06-09 09:24 UTC, qdii
Details
emerge -pqv '=sys-apps/busybox-1.21.0' (emerge-pqv,401 bytes, text/plain)
2013-06-09 09:26 UTC, qdii
Details
trylink.patch (trylink.patch,535 bytes, patch)
2013-08-25 14:56 UTC, Mindaugas N.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description qdii 2013-06-09 09:17:08 UTC
When compiling busybox from the main repository, it failed during link with "cannot find -l-pthread". 

Reproducible: Always

Steps to Reproduce:
1. emerge sys-apps/busybox-1.21.0
2.
3.
Actual Results:  
Link fails with "cannot find -l-pthread"

Expected Results:  
Compilation should create a binary executable.

WORKAROUND: Replacing "-l-pthread" with "-pthread" in the final link command line fixes the problem.

Please note that I was compiling a SELinux Gentoo from scratch when this occurred.
Comment 1 qdii 2013-06-09 09:18:25 UTC
Created attachment 350496 [details]
build log
Comment 2 qdii 2013-06-09 09:22:54 UTC
Created attachment 350498 [details]
environment
Comment 3 qdii 2013-06-09 09:24:23 UTC
Created attachment 350500 [details]
emerge --info  '=sys-apps/busybox-1.21.0'
Comment 4 qdii 2013-06-09 09:26:08 UTC
Created attachment 350502 [details]
emerge -pqv '=sys-apps/busybox-1.21.0'
Comment 5 SpanKY gentoo-dev 2013-06-17 06:09:37 UTC
doubt it's related to pam

post the output from running:
 for p in libpcre libselinux libsepol ; do
  echo $p
  pkg-config --libs $p
  pkg-config --cflags $p
 done
Comment 6 zacharyw09264 2013-08-20 01:55:13 UTC
Not the same poster but I have the same problem, here is the output of the command.
libpcre
-lpcre 

libselinux
-lselinux 

libsepol
-lsepol
Comment 7 Mindaugas N. 2013-08-25 13:43:02 UTC
I have the same problem too, package sys-apps/busybox-1.21.1

libpcre
-lpcre 

libselinux
-lselinux -lpthread 

libsepol
-lsepol
Comment 8 Mindaugas N. 2013-08-25 13:52:54 UTC
build.log http://ix.io/7yy
emerge --info '=sys-apps/busybox-1.21.1' http://ix.io/7yz
emerge -pqv '=sys-apps/busybox-1.21.1' http://ix.io/7yA
Comment 9 Mindaugas N. 2013-08-25 14:49:55 UTC
I have no idea from where '-pthreads' comes from (it should be pthreads), but scripts/trylink can fix it.

scripts/trylink line 120:
-l_list=`echo "$LDLIBS" | sed -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'`
+l_list=`echo "$LDLIBS" | sed -e 's/ -/ /g' -e 's/ / -l/g' -e 's/^/-l/' -e 's/^-l$//'`
Comment 10 Mindaugas N. 2013-08-25 14:56:31 UTC
Created attachment 356976 [details, diff]
trylink.patch