LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-31-2009, 08:57 PM   #1
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,222

Rep: Reputation: 177Reputation: 177
/usr/lib klibc question


I'm trying to make a klibc slackbuild for personal use. However there is no option to set the libdir and as such is keeps in stalling the libraries to /usr/lib. I'm not overly concerned at this point with the quality of the slackbuild since I'm not going to submit it(not now at least), however I would like to honor the slackware lib directories. So I guess my question is how can set the build to use /usr/lib64 if there is not configure flags?

or is it safe just to change to the temporary package directory and just move the files by hand to /usr/lib64 and then make the package?

Thanks Guys
and HAPPY NEW YEAR
 
Old 01-01-2010, 03:03 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,756

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
You could probably just move them over, but it would be better to create a patch or use sed to change the paths in the Makefiles before compiling.
 
Old 01-01-2010, 03:40 AM   #3
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,222

Original Poster
Rep: Reputation: 177Reputation: 177
I'm getting fairly familiar with making slackbuilds but there are still some bash that I am learning. Could you point me to any guides or howto's? Or also some reference slackbuilds with the sort of sed commands your talking about.

Thanks
 
Old 01-05-2010, 06:43 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,222

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by gnashley View Post
You could probably just move them over, but it would be better to create a patch or use sed to change the paths in the Makefiles before compiling.
Quick question. Please forgive me if I'm wording this incorrectly. I have my klibc build finished, I just need to get this libdir part worked out. I looked through the Makefile and found the section that deals with libdir... from Makefile

# Location for installation
export prefix = /usr
export bindir = $(prefix)/bin
export libdir = $(prefix)/lib
export mandir = $(prefix)/man
export INSTALLDIR = $(prefix)/lib/klibc
export INSTALLROOT =

Now if I manullay edit the libdir and INSTALLDIR line to /usr/lib64 it will install correctly to lib64, however this ugly since If I decide to use the build on my i486 machine then I will have to edit the Makefile by hand and change it back. Like you said above I should probably use sed or make a patch. I'm not to familiar yet with sed, but I am learning . So I guess my question is, if I write a patch that fixes the lib64 path issues, how would I tell the slackbuild to say use the patch for x86_64 and to ignore it if I am using i486? I think I got an Idea how to do this, you would use the if and then command?

Or is it possible to patch the Makefile so that it can automatically recoginze what ARCH I'm using and act accordingly?


Thanks for the help guys.
 
Old 01-06-2010, 12:47 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,756

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
To create the patch esaily, use 'gendiff':
'cp Makefile Makefile.00'
Then hand edit Makefile. Then, from inside the sources:
gendiff . .00 > ../klibc-libdir.diff
That will place the diff above the toplevel of the sources. Then, in you SlackBuild:
Code:
if [ $ARCH = x86_64 ] ; then
 patch -p1 < $CWD/klibc-libdir.diff
fi
Place the above just after the line where you cd into the unpacked sources.
 
1 members found this post helpful.
Old 01-06-2010, 03:25 AM   #6
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,222

Original Poster
Rep: Reputation: 177Reputation: 177
Quote:
Originally Posted by gnashley View Post
To create the patch esaily, use 'gendiff':
'cp Makefile Makefile.00'
Then hand edit Makefile. Then, from inside the sources:
gendiff . .00 > ../klibc-libdir.diff
That will place the diff above the toplevel of the sources. Then, in you SlackBuild:
Code:
if [ $ARCH = x86_64 ] ; then
 patch -p1 < $CWD/klibc-libdir.diff
fi
Place the above just after the line where you cd into the unpacked sources.
thanks so much man, It's working perfectly now . Big thanks for the gendiff heads up.

Last edited by Daedra; 01-06-2010 at 04:50 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware64 /usr/lib /usr/lib64 question disturbed1 Slackware 29 02-14-2010 08:05 AM
/usr/bin/ld: skipping incompatible /usr/lib/libXpm.so when searching for -lXpm sqn Linux - Server 2 05-12-2009 03:53 AM
oops, I stripped /usr/lib and /usr/X11R6/lib ! H_TeXMeX_H Slackware 2 02-08-2007 09:27 PM
audacity unable to locate required lib files present in /usr/lib/ adityavpratap Slackware 4 11-30-2006 06:06 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM


All times are GMT -5. The time now is 02:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration