[opensuse-factory] OSuSE 11.0 devel Q: has pthreads library location changed?
This is a dup of a post to the general discussion list (OS@OS.O), but though someone here might be better informed as to what's going into 11.0 ... In 10.3 and most linux builds I've run into so far, 'pthreads' is usually in a separate pthreads library. Has this changed in 11.0? Would they have been moved into some library included by default during a build & link (like glibc)? Seems like that would be an odd change to make since outside tarballs that use pthreads would likely have a -lpthreads in the final link stage and if OS11 moves them, all those make files would require a different link line for OS11 (i.e. -- one that doesn't try to include what would be a non-existent pthreads library). The reason I'm asking is I'm looking at a make designed to run on OS11, and I'm getting link errors for the various pthread functions -- all of the functions seem to be missing when the final program is being linked (and it doesn't have an explicit -lpthreads on the link line). Thus my wondering is it the case that pthreads are being moved into one of the standardly linked-with libraries (like glibc -- not requiring explicit naming on the command line), or does linking against against libpthreads happen automatically on the 'gcc' of the future (the one to be in OS11.0)? Thanks!... -Linda --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Linda Walsh
This is a dup of a post to the general discussion list (OS@OS.O), but though someone here might be better informed as to what's going into 11.0 ...
In 10.3 and most linux builds I've run into so far, 'pthreads' is usually in a separate pthreads library. Has this changed in 11.0? Would they have been moved into some library included by default during a build & link (like glibc)?
There's no change in this area.
Seems like that would be an odd change to make since outside tarballs that use pthreads would likely have a -lpthreads in the final link stage and if OS11 moves them, all those make files would require a different link line for OS11 (i.e. -- one that doesn't try to include what would be a non-existent pthreads library).
The reason I'm asking is I'm looking at a make designed to run on OS11, and I'm getting link errors for the various pthread functions -- all of the functions seem to be missing when the final program is being linked (and it doesn't have an explicit -lpthreads on the link line).
The missing -lpthreads is the problem, you really need it.
Thus my wondering is it the case that pthreads are being moved into one of the standardly linked-with libraries (like glibc -- not requiring explicit naming on the command line), or does linking against against libpthreads happen automatically on the 'gcc' of the future (the one to be in OS11.0)?
I'm confused - you always had to add -lpthreads if you use the pthreads library, nothing has changed, Andreas -- Andreas Jaeger, Director Platform / openSUSE, aj@suse.de SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
Andreas Jaeger wrote:
I'm confused - you always had to add -lpthreads if you use the pthreads library, nothing has changed, Andreas
Yeah, me too. I was trying to compile the openssh-5.0p1 source package -- it fails .. one 'major' (failing) error, 1 minor and 1 bad coding practice. One of the sub-programs, "ssh-keyconverter" had build errors -- the link failed with multiple missing references to 'pthread_X' calls (and no -lpthreads in the gcc(link) line). I'm surprised it hasn't popped up for anyone else, so I filed a bug on it and hoped I hadn't created the problem as I was building it on my 10.3 machine. I had another link error in a missing krb_gssapi call that I'd never heard of. I didn't need krb or gssapi for my purposes (am trying to make and test the high-performance patches from "http://www.psc.edu/networking/projects/hpn-ssh/") so I just removed the krb-enabling option on "Configure" to go beyond that. But the package then failed because of the missing pthread lib in one of the sub-utility builds. BTW, I thought gssapi was deprecated? I think some flaw was found in the protocol -- I didn't follow the issue closely. A commercial shell product I use for windows was all gung-ho about releasing a gssapi enabled product a couple of years back -- the first I'd heard of it. But about 1-2 years back they deprecated it in their product and scheduled it for removal. I had the impression (maybe incorrect, but I was only half paying attention), that it had been required in some government contracts, but some flaw was found in the protocol so it became 'unrequired', :-) (and thus deprecated in their product). Anyway -- I'm not too knowledgeable on the topic, so can't say with any certainty. A slight different issue though, The openssh package seems a bit 'overloaded' building more than one thing in separate build directories -- doesn't seem "excellent form" -- but that sorta brings me to a more troubling decision that was made -- to make openssh "require" the GUI X-libraries as pre-reqs. Someone decided to take what was a separate package, openssh-askpass -- an X-tool based program, and hacked it into the openssh package -- it's one of the oddities -- the sources are extracted and built in a separate build directory (indicative of it being a separate package in 10.3 and earlier). That decision illustrates a 'trend' I've seen developing in OpenSuSE (more so since change from 9.x to 10.x) -- and that's increasing package interdependencies, so that to install "A", I need to install "B", then "C", then "D"...etc. But all I wanted was "A", and pkgs B, C, and D are for hardware or software features I don't have and can't use -- they just suck up disk space and/or memory. In some cases, openssh is a good example -- to install it, I need an open-security card lib -- which installs a daemon to read it, but that requires another lib & daemon, which required something else...once I tracked down the dependency, I realized I only needed the 1 lib to make sshd "run", but the other dependencies were for the daemon (associated with the linked in library), that I didn't use (chkconfig'ed off -- not needed, don't have that hardware). Realizing what the deps were, I could just "not install" the other deps, but that rubs me the wrong way nearly as much as installing alot of excess software. It's a leaning of mine to not install software I don't use -- as a general 'security policy'... :-) Maybe it would require too much work on application writers, but Microsoft does it on Windows and Unix vendors did it on their Unixes -- making such optional hardware features present in run-time loadable libraries. If those libraries aren't present, then product functionality that depends on libraries isn't enabled. But it allows software products to dynamically adjust to the hardware or software features a user has installed. Some of the more snazzy GUI's simply don't show (hide) program feature that are not installed on the user's system -- though some companies prefer to 'grey' out 'extra-cost' features as a form of advertising to the user that they can enable those features by purchasing the extra needed hardware or software (I don't like that option -- just creates visual clutter -- I mean it would be nice to "see" what's there as an option, but for normal operations, it's just visual clutter...but no one that I know of has made greying vs. invisible a configurable feature). Anyway -- sorry to go so far afield -- I just had a 'few' things that came to mind when I was building this rpm -- and the error(s) that I encountered I filed in a bug... Thanks for verifying my suspicions on the pthreads... linda p.s. -- not to go farther afield, but...anyone else thought about the desirability of including the high-performance scp/ssh features? There's a few different patches -- one that affects window size in ssh alone can up throughput by 8x with some ciphers. Another can allow about a 2-3x using multiple cores and another can allow clear-text data-transfers (session info still encrypted) so a 1Gb link can be used near capacity. In comparison, on their hardware, with no patches on a 1Gb link, they were seeing transfer down around 2-3Mbytes/s -- something more typical of a 100Mb connection than the 1Gb connection they were using. I've seen similar slow speeds unless you have two higher-powered cpu's on both ends -- and even then I get less than 20% data throughput on Gigabit ethernet (I gotten up to 70% throughput with CIFS -- and that's UDP based). Anyway -- just some thoughts... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Andreas Jaeger wrote:
Linda Walsh
writes: This is a dup of a post to the general discussion list (OS@OS.O), but though someone here might be better informed as to what's going into 11.0 ...
In 10.3 and most linux builds I've run into so far, 'pthreads' is usually in a separate pthreads library. Has this changed in 11.0? Would they have been moved into some library included by default during a build& link (like glibc)?
There's no change in this area.
Seems like that would be an odd change to make since outside tarballs that use pthreads would likely have a -lpthreads in the final link stage and if OS11 moves them, all those make files would require a different link line for OS11 (i.e. -- one that doesn't try to include what would be a non-existent pthreads library).
The reason I'm asking is I'm looking at a make designed to run on OS11, and I'm getting link errors for the various pthread functions -- all of the functions seem to be missing when the final program is being linked (and it doesn't have an explicit -lpthreads on the link line).
The missing -lpthreads is the problem, you really need it.
Thus my wondering is it the case that pthreads are being moved into one of the standardly linked-with libraries (like glibc -- not requiring explicit naming on the command line), or does linking against against libpthreads happen automatically on the 'gcc' of the future (the one to be in OS11.0)?
I'm confused - you always had to add -lpthreads if you use the pthreads library, nothing has changed,
Andreas
I think quite a while ago I had to use "-lpthread" as libpthreads* doesn't exist, otherwise I am missing the gist of the question. # l /usr/lib64/libpthread* -rw-r--r-- 1 root root 383994 2008-05-16 21:28 /usr/lib64/libpthread.a -rw-r--r-- 1 root root 1812 2008-05-16 21:28 /usr/lib64/libpthread_nonshared.a -rw-r--r-- 1 root root 222 2008-05-16 21:28 /usr/lib64/libpthread.so # l /lib64/libpthread* -rwxr-xr-x 1 root root 142867 2008-05-16 21:35 /lib64/libpthread-2.8.so* lrwxrwxrwx 1 root root 17 2008-05-22 12:10 /lib64/libpthread.so.0 -> libpthread-2.8.so* # l /usr/lib/libpthread* -rw-r--r-- 1 root root 258996 2008-05-16 22:18 /usr/lib/libpthread.a -rw-r--r-- 1 root root 1440 2008-05-16 22:18 /usr/lib/libpthread_nonshared.a -rw-r--r-- 1 root root 216 2008-05-16 22:18 /usr/lib/libpthread.so # l /lib/libpthread* -rwxr-xr-x 1 root root 125358 2008-05-17 01:48 /lib/libpthread-2.8.so* lrwxrwxrwx 1 root root 17 2008-05-22 12:27 /lib/libpthread.so.0 -> libpthread-2.8.so* Regards Sid. -- Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support Specialist, Cricket Coach Microsoft Windows Free Zone - Linux used for all Computing Tasks --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
Sid Boyce wrote:
I think quite a while ago I had to use "-lpthread" as libpthreads* doesn't exist, otherwise I am missing the gist of the question.
Sorry, for the confusion...threads/thread...(the manpage on pthreads(7) has the 's', but the lib and calls do not). Here's the essense of the problem from opennssh.spec: #Obsoleted CFLAGS="-DUSE_POSIX_THREADS $RPM_OPT_FLAGS" CXXFLAGS="-DUSE_POSIX_THR EADS $RPM_O \ #Obsoleted LDFLAGS="-lpthread" \ LDFLAGS="-pie" CFLAGS="$RPM_OPT_FLAGS $PIEFLAGS -fstack-protector" CXXFLAGS="$RP M_OPT_FLAGS $PIEFLAGS -fstack-protector" \ -------------- The comments indicate that -lpthread, was obsolete, yet without it the keyconvert subprogram in the 'convert' subdir does not compile. I don't know who made the changes to merge separate packages in openssh (the ssh-keyconverter along with ppenssh-askpass are not in the openssh tarball). But they don't seem to have tested their merge changes fully... I don't know what the effect of removing pthread and USE_POSIX_THREADS from the compile and link lines is on the rest of the package, but it prevents the ssh-keyconverter part of the package from linking due to the missing pthread_{create,...} calls. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (3)
-
Andreas Jaeger
-
Linda Walsh
-
Sid Boyce