Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71396 - emerge app-admin/gps-1.1.0: linking error
Summary: emerge app-admin/gps-1.1.0: linking error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-16 07:02 UTC by Klaus Kusche
Modified: 2005-04-10 18:33 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Kusche 2004-11-16 07:02:49 UTC
I get the following error when emerging the above package:

g++ details.o diefast.o direct.o filter.o freebsd.o globalvars.o gps.o history.o linuxprocfs.o msgbox.o netpolling.o netwatch.o pipedtop.o polling.o quickbar.o renice.o tabledata.o treeview.o tstring.o userbox.o userinfo.o watchp.o -o gps -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm    -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -DWDOC=\"/usr/doc\"
history.o(.text+0x9bc): In function `destroy_history(_GtkWidget*, void*)':
: undefined reference to `pthread_join'
netpolling.o(.text+0x457): In function `NetworkActor::hopen(char*, int)':
: undefined reference to `pthread_cancel'
netpolling.o(.text+0x46a): In function `NetworkActor::hopen(char*, int)':
: undefined reference to `pthread_join'
netpolling.o(.text+0x51a): In function `NetworkActor::hopen(char*, int)':
: undefined reference to `pthread_join'
collect2: ld returned 1 exit status

Happens with glibc-2.3.4.20040808-r1
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-18 11:52:02 UTC
seemant: you added this package... it has no metadata.xml
Comment 2 SpanKY gentoo-dev 2004-12-05 00:34:35 UTC
looks like the package just needs to compile with '-lpthread'
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2004-12-30 12:06:36 UTC
should be fixed in 1.1.0-r1.  Please test and report.
Comment 4 Klaus Kusche 2005-01-01 07:05:35 UTC
Emerges without problems now, but core dumps when started....
Comment 5 Seemant Kulleen (RETIRED) gentoo-dev 2005-01-01 12:14:17 UTC
can you post me an strace log of it?
Comment 6 Klaus Kusche 2005-01-02 05:04:15 UTC
Hmmm, that's an interesting one.

GDB doesn't help much:
(gdb) where
#0  0x0805988c in refresh() ()
#1  0x08056a6e in main ()

Nor does strace (tail of about 700 lines):
shmctl(196613, IPC_64|IPC_RMID, 0)      = 0
write(3, "5\1\4\0M\0@\1\4\0@\0010\0009\0007\0\5\0N\0@\1M\0@\1\0\0"..., 676) = 67
read(3, "\1\0\342\2\0\0\0\0\4\0@\1\0\0\0\0\0\0\0\0\20\0\0\0008\t"..., 32) = 32
shmdt(0x27594000)                       = 0
write(3, "\213\2\2\0L\0@\1\24\0\6\0\4\0@\1#\0\0\0#\0\0\0\0\0\0\0"..., 32) = 32
read(3, "\1 \344\2\t\0\0\0#\0\0\0\0\0\0\0\t\0\0\0\0\0\0\0008\f%"..., 32) = 32
read(3, "C\0\0\0\1\0\0\0\1\0\0\0\266\367\"\'l\31\7X<\264\34\'\0"..., 36) = 36
getpriority(PRIO_PROCESS, 0)            = 20
setpriority(PRIO_PROCESS, 0, 8)         = 0
getpriority(PRIO_PROCESS, 0)            = 12
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++

However, when I ./configure and make by hand as root in the portage working dir, I get a gps which *works*.

Manual ./configure says:
--------------------------------------------------------------------------
gPS will be compiled with the following polling modes:
(The default will be the first of this list)

* Linux /proc fs polling   (OS: Linux        , Architecture: Any)

--------------------------------------------------------------------------

During emerge, ./configure says:
--------------------------------------------------------------------------
gPS will be compiled with the following polling modes:
(The default will be the first of this list)

No polling methods have been found. When not
in directly supported systems (Linux/FreeBSD), the only
method available is top polling. As top polling has not
been acknowledged, this system may not have top or
have a not supported one. You can download a working
top from ftp://ftp.groupsys.com/pub/top

Compiling without a polling method makes no sense,
fix it before you compile.

--------------------------------------------------------------------------

After removing "userpriv" and "usersandbox" from my /etc/make.conf,
emerge also produces a working gps.

As I use a hardened kernel with most pax and grsec features enabled, I believe some ./configure tests give wrong results on my system when not run as root.
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2005-01-03 20:48:59 UTC
I'm on leave of absence for the next 45-90 days, sorry :/
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2005-03-14 08:46:23 UTC
Solar, suggestions on this please?
Comment 9 solar (RETIRED) gentoo-dev 2005-03-15 11:32:47 UTC
other than CFLAGS + = -pthread and to use setpriority() you need root privs.. Without a gdb full backtrace there is not much that I can tell from this without looking at the source code in question. So sorry seemant not tot really. 
Comment 10 Seemant Kulleen (RETIRED) gentoo-dev 2005-03-22 07:13:27 UTC
dunno what to tell you Klaus
Comment 11 Klaus Kusche 2005-03-26 03:10:22 UTC
Hmmm, output a big redstarred message when emerge gps is run with the wrong settings?
(just to remind me that I have to turn off sandboxing when emerging any future upgrade to gps)
Comment 12 Seemant Kulleen (RETIRED) gentoo-dev 2005-03-29 11:31:15 UTC
Brian, is there some way around this, other than turning off {user,}sandbox?
Comment 13 Brian Harring (RETIRED) gentoo-dev 2005-03-29 11:51:45 UTC
RESTRICT="nouserpriv" in the ebuild might do the trick.
Comment 14 Seemant Kulleen (RETIRED) gentoo-dev 2005-04-08 05:40:05 UTC
Klaus, I've added the restrict command, as Brian suggested.

When you have a moment, can you resync (and make sure the RESTRICT line is in the ebuild), and re-emerge this?  Please do let me know how it turns out.
Comment 15 Klaus Kusche 2005-04-09 08:31:36 UTC
Works fine here.
Comment 16 Seemant Kulleen (RETIRED) gentoo-dev 2005-04-10 18:33:45 UTC
thanks for bearing with me Klaus and solar and Brian :)