Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
12-23-2008, 03:59 AM
|
#1
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Rep:
|
Patch Slackware 12.1 with existing RH patch
Background :
Am trying to build a Slackware Server box similar to a RedHat server.
Some of the basic C application types compile and execute fine.
However for some type of application that have more dependencies, bumped
into an issue that is likely fixed on RH. The error is as below :
=========================================================================
/usr/lib/gcc/i486-slackware-linux/4.2.3/../../../../i486-slackware-linux/bin/ld: errno@@GLIBC_PRIVATE: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS definition in MMMM.so section .bss
MMMM.so: could not read symbols: Bad value
collect2: ld returned 1 exit status
=========================================================================
Googled to find that changing
extern int errno;
to
#include <errno.h>
should resolve the issue.
This is not a solution, since i wouldn't like to change MMMM.so
Further google searches led me to RH fix at :
http://www.sourceware.org/ml/binutil.../msg00299.html and
http://sources.redhat.com/bugzilla/show_bug.cgi?id=414
To confirm that this wasn't an issue on the RH box, was able to compile
the bug.c(link #2 above) as is on RH server as against Slackware.
Have downloaded sources for Slackware 12.1. Will install these.
Would like to have this patch on my Slackware box.
My queries are as below :
Which components need to be patched/rebuilt based on this ?
Would just building/upgrading gcc or whatelse be enough ?
Any links to detailed procedure for same would help ?
Else with 12.2 already out. Can anyone tell if this is fixed in 12.2.
have set this up recently, might just decide to upgrade to 12.2
Thanks for your help and advice.
Last edited by dsmatharu; 12-23-2008 at 04:31 AM.
Reason: Clarity
|
|
|
|
12-23-2008, 05:57 AM
|
#2
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
That patch is meant to be applied to binutils. binutils is easy to re-compile, but you may want to re-compile the rest of the toolchain also which is not so simple. Use the SalckBuild scripts from official Slackware, bump the BUILD number for each: re-compile binutils, then gcc, then glibc then gcc again, installing(using upgradepkg) each package as you go.
Lots luck and make sure you know how to re-cover from a non-bootable machine by re-installing the original binutils, gcc and glibc if things go wrong...
A better bet might be to report the bug to PatV and see if he thinks it should be fixed. That's a pretty old patch, so I wonder of it has already been fixed upstream. You could check the sources for binutils and see if the fix is already in there.
|
|
|
|
12-23-2008, 09:20 AM
|
#3
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Thanks gnashley,
Had been deterred by the required toolchain build sequence.
Compared the sources, it seems the patch is there in 12.1 already.
Not really sure here though. Some expert view/advice is required.
For me real test would be to have the bug.c below compile successfully
on Slackware 12.2 (i86 platform).
$ cat bug.c
extern int errno;
int main ()
{
printf("errno = %d\n",errno);
return 0;
}
A successfull compile/link with :
$ gcc tls-bug.c -L/usr/lib/nptl
Hopefully someone with a Slackware 12.2 can help me out with this test.
Else i might just upgrade in "goodfaith" and hope for best !!!
Regards,
|
|
|
|
12-23-2008, 10:22 AM
|
#4
|
|
Senior Member
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810
|
Quote:
Hopefully someone with a Slackware 12.2 can help me out with this test.
Else i might just upgrade in "goodfaith" and hope for best !!!
|
The little program you supplied (bug.c) won't compile on Slackware 12.2 - it gives the TLS errors - unless you either 1) Change the line :
to be :
or compile it with :
Code:
gcc bug.c -include errno.h -L/usr/lib/nptl
Hope this helps
|
|
|
|
12-24-2008, 12:05 AM
|
#5
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Thanks Eddy, for having done the test for me.
Now i know upgrade to 12.2 is off for now.
Whether to do a toolchain upgrade or maybe change of distro.
As indicated in first post, i have a reference RH box.
So this is almost a blocker, or too much effort to patch ???
Will take some time to decide !!!
Regards,
|
|
|
|
12-25-2008, 02:16 AM
|
#6
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Latest Update !!!
Had a more detailed look and some thoughts, and have the following.
- Part of patch ( /* Check TLS symbol. */ .. if ) is not on 12.1 or 12.2
- Unable to install RH7.1 due to HDD compat issue. ( not stated earlier )
Course of action is :
Ask/Try for another still older box that will take RH7.1 - Tough Luck.
Install latest RH, shouldn't have problem with HDD & this TLS issue.
Patch Slackware .... upgrade toolchain .... I am getting ready !!!
Regards,
|
|
|
|
12-25-2008, 05:28 AM
|
#7
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
I would try patching and recompiling the binutils on Slackware and see if that fixes the problem. You can use the official SlackBuild, at least as a guide.
|
|
|
|
12-25-2008, 11:47 PM
|
#8
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Treading the path ...
Hello gnashley,
Started on the binutils patch. Have a few elementary questions as well.
As suggested started with the SlackBuild for binutils-2.17.50.0.17
Patched the source file, and retained VERSION as 2.17.50.0.17
Ran the commands from SlackBuild step by step till "make -j6" and
"make info".
Some Questions :
1) Is the VERSION as is above and BUILD=1 good enough to bump the BUILD.
Edit : Changed BUILD to 2 ... to be able to differentiate ...
In addition where should a comment be placed about the patch applied.
2) Beyond "make -j6" the following snippets from SlackBuild concerns me.
==========================================================================
make -j6 || exit 1
make info || exit 1
# Needed to link ksymoops:
make install || exit 1
# We need to clear ldscripts/ because binutils doesn't implement DESTDIR everywhere:
rm -rf /usr/lib/ldscripts /usr/${ARCH}-slackware-linux/lib/ldscripts
# Repopulate it:
make install || exit 1
# Install into the $PKG location:
make install DESTDIR=$PKG || exit 1
# Add fresh ldscripts:
cp -a /usr/${ARCH}-slackware-linux/lib/ldscripts $PKG/usr/lib
==========================================================================
Would the rm -rf /usr/lib/ldscripts ..... make my system go boom !!!
Do i need a single user mode for this step ?
Will need it for upgradepkg for sure.
Would the "make install" install in /usr as configure --prefix=/usr
Have a few users using the machine, so would like to tread carefully.
3) Towards end of SlackBuild also see :
#############################
oprofile links to libbfd so
be sure to recompile that
#############################
How crucial is that for the usual code/compile/link/run/test cycle ?
Before ending i would say would like to stick to Slackware since i don't
like rpms somehow and would prefer learning classic Linux than a distro.
Thanks & Regards,
Last edited by dsmatharu; 12-26-2008 at 01:55 AM.
|
|
|
|
12-26-2008, 02:12 AM
|
#9
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
Yes, just bumping the BUILD number will make upgradepkg handle the new package correctly.
Removing the ldscripts and really installing the neew binutils (make install) won't make your system go boom. If some user is in the process of compiling something, they may get a surprise. I've been building binutils lately, and I found that the "real" 'make install' was unneeded, that is using make DESTDIR=$PKG install worked fine and did install the ldscripts into DESTDIR, so removing the real copies, installing the new ones and copying them from the real root was not needed.
It shouldnn't be too big a deal to re-compile oprofile if you even use that or have it installed. If not, don'T worsyy about it.
binutils is not a system-critical package, so you can upgrade it just fine from a normal runlevel of 3 or 4. There is no need to go into maintenance mode. As far as having other users logged in, that is also no problem -only if a user is compiling/linking something at the moment you upgrade, then they may have a surprise. But even so, I doubt it, because of the way upgradepkg works -it simply overwrites the existing program with the new one on-the-fly, so your system is never without the program at any time.
|
|
|
|
12-26-2008, 03:09 AM
|
#10
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Thanks gnashley,
Was able to proceed and build the package. By passed the "real make" and related stuff.
Built package, and upgraded. However, this has not resolved issue with bug.c yet.
Regards,
|
|
|
|
12-26-2008, 10:26 AM
|
#11
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
You may have to do the same thing with glibc itself by re-compiling it also. But be sure your system is idle when you upgrade glibc. You need to be in runlevel 1 to do that.
Last edited by gnashley; 12-26-2008 at 11:56 AM.
|
|
|
|
12-29-2008, 08:03 AM
|
#12
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Recompiled and upgraded glibc.
However TLS issue remains.
Wondering if have been going the wrong alley !!!
Could it be that configure options (of glibc etc for RH & Slack) are different. Need to get another handle it seems.
Thanks, learnt quite a lot anyways.
Edit :
In addition the -L/usr/lib/nptl flag is inconsequential.
Last edited by dsmatharu; 12-29-2008 at 08:47 AM.
|
|
|
|
12-29-2008, 09:42 AM
|
#13
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
Try locating the srpm for the RHG glibc sources and look in the spec file to see which options were used to compile it.
|
|
|
|
12-30-2008, 12:14 AM
|
#14
|
|
LQ Newbie
Registered: Dec 2008
Location: Pune, India
Distribution: Slackware
Posts: 17
Original Poster
Rep:
|
Finally some light !!!
Found the right patch for sure !!!
http://sources.redhat.com/ml/libc-al.../msg00016.html
( the earlier one was for linker crash )
Not available in Slackware source.
Also patch in conformance with the known fix for errno TLS issue.
Plan to do the following now :-
Undo the binutils/glibc fix.
Apply this patch for glibc.
Regards,
|
|
|
|
12-30-2008, 01:01 AM
|
#15
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
If you properly bumped the BUILD number for ninutils, you can just use upgradepkg to re-install the original package -upgradepkg works the same to downgrade as to upgrade. And for glibc, just bumpt the BUILD number again for the rebuild.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:56 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|