LinuxQuestions.org
Help answer threads with 0 replies.
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 07-17-2016, 09:10 AM   #1
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Rep: Reputation: 1
compiling wicd-1.7.4 to individual directory


usually when i compile package i do make install DESTDIR=, but when i unpacked wicd-1.7.4 i saw unusual for me setup.py. in output of python setup.py --help i do not found something about selection of installation directory. how can i compile it to individual directory?
 
Old 07-17-2016, 09:49 AM   #2
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 2,192

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Why ? you have a package here:

http://slackware.osuosl.org/slackwar...nt/extra/wicd/
 
Old 07-18-2016, 05:00 AM   #3
mlangdn
Senior Member
 
Registered: Mar 2005
Location: Kentucky
Distribution: Slackware64-current
Posts: 1,844

Rep: Reputation: 452Reputation: 452Reputation: 452Reputation: 452Reputation: 452
I'm not a python expert but i think this will work:

Code:
python setup.py install --prefix=/my/prefix
 
Old 07-22-2016, 05:02 AM   #4
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by gmgf View Post
because i want to learn how to compile it.


Quote:
Originally Posted by mlangdn View Post
I'm not a python expert but i think this will work:

Code:
python setup.py install --prefix=/my/prefix
i did it and have error: bad install directory or PYTHONPATH
 
Old 07-22-2016, 05:31 AM   #5
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 2,192

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
wicd is a daemon, i don't think it's a good exemple for a beginner

Last edited by gmgf; 07-22-2016 at 06:08 AM.
 
Old 07-22-2016, 05:33 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105Reputation: 8105
Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild
 
1 members found this post helpful.
Old 07-22-2016, 06:14 AM   #7
gmgf
Senior Member
 
Registered: Jun 2012
Location: Bergerac, France
Distribution: Slackware
Posts: 2,192

Rep: Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987Reputation: 987
Quote:
Originally Posted by Alien Bob View Post
Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild
you can listen to a great master.
 
Old 07-22-2016, 08:20 AM   #8
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by gmgf View Post
wicd is a daemon, i don't think it's a good exemple for a beginner
but must be a way to compile it

Quote:
Originally Posted by Alien Bob View Post
Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild
sorry, i use gnu/linux only for few week and do not understood many things. i read this script and run python setup.py configure --no-install-kde --no-install-gnome-shell-extensions, python setup.py build. then, read output of console i compile and install babel and pytz, after try again to build wicd i have error: OSError:[Errno 2] No such file or directory: '/usr/lib64/python2.7/site-packages/babel/locale-data'


Quote:
Originally Posted by gmgf View Post
you can listen to a great master.
i will
 
Old 07-22-2016, 08:54 AM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you run the SlackBuild, it will compile wicd for you. There is no magic being done, you can read through the script and see exactly what it's accomplishing.

But, your last post confused me. Am I understanding that you did successfully compile wicd, then installed babel and pytz, then tried to recompile wicd again (why? if it completed the first time), but it failed this time?

Maybe providing some more output of your errors might give us some insight on what is going wrong.

Maybe you could also provide us your goal behind compiling wicd rather than just using the pre-compiled binary that Pat provided...
 
Old 07-22-2016, 10:43 AM   #10
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bassmadrigal View Post
If you run the SlackBuild, it will compile wicd for you. There is no magic being done, you can read through the script and see exactly what it's accomplishing.

But, your last post confused me. Am I understanding that you did successfully compile wicd, then installed babel and pytz, then tried to recompile wicd again (why? if it completed the first time), but it failed this time?

Maybe providing some more output of your errors might give us some insight on what is going wrong.

Maybe you could also provide us your goal behind compiling wicd rather than just using the pre-compiled binary that Pat provided...
no, i can not compile wicd because it is require pybabel after i run python setup.py build. i compiled babel and next that wicd required was pytz. i compiled it too
 
Old 07-22-2016, 12:14 PM   #11
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Looking at the SlackBuild, Pat builds wicd without pybabel (which I assume is a combination of babel and pytz, but I'm too lazy to research that) by using a patch and for loop.

Code:
# Bypass the need for pybabel (thanks, dapal!)
zcat $CWD/manually-compile-translations.diff.gz | patch -p1 || exit 1
for pofile in $(find po/ -type f -name "*.po") ; do 
  mkdir -p translations/$(basename ${pofile} .po)/LC_MESSAGES
  msgfmt -o translations/$(basename ${pofile} .po)/LC_MESSAGES/wicd.mo ${pofile}
done
The patch removes a few sections from the setup.py file that compiles translations and then does them using the for loop.

After running that patch and for loop, you should be able to compile wicd using the following (assuming you're running 64bit, otherwise remove the 64 from the two lib dirs). You could also remove the kde section if you want, but it shouldn't matter even if you don't have kde installed. However, Pat also applies two other patches, wicd-1421918.patch.gz and curses_bitrate_fix.patch.gz, both of which could affect your usage of wicd once it's compiled, so I'd recommend using those patches. They're available on the link Alien Bob provided and the patch commands are in the SlackBuild.

Code:
python setup.py configure \
  --lib=/usr/lib64/wicd \
  --kdedir=/usr/share/autostart \
  --backends=/usr/lib64/wicd/backends \
  --no-install-gnome-shell-extensions

python setup.py install

---or--

python setup.py install --root=$PKG   # if you want to install it to a temporary directory to create a Slackware package
Reading through the SlackBuild provides you everything you need to do to compile wicd on Slackware. pybabel usage has not been tested on Slackware since wicd is specifically patched to not use that, so if you insist to go that route, I couldn't tell you whether it is going to work or not.

But, considering you're only a few weeks into Linux, personally, I wouldn't jump this deep into compiling software (trying to get pybabel working on wicd on Slackware when it's been pretty much untested and specifically patched out of the official package) until you have a good feel for how it all works. If you do still want to pursue this, we can try to help, but you need to give us more information, like the output of your commands when they fail. We can't do much with vague wording without error messages.

Long story short, when there's a SlackBuild available, it is almost always recommended to use that to build software unless you're specifically trying to enable something that isn't default. But even then, you can usually just modify the SlackBuild to suit your purposes rather than starting over from scratch and reinventing the wheel.
 
1 members found this post helpful.
Old 07-23-2016, 04:01 AM   #12
sithun
Member
 
Registered: Jul 2016
Location: mongolia, bulgan
Posts: 102

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bassmadrigal View Post
Looking at the SlackBuild, Pat builds wicd without pybabel (which I assume is a combination of babel and pytz, but I'm too lazy to research that) by using a patch and for loop.

Code:
# Bypass the need for pybabel (thanks, dapal!)
zcat $CWD/manually-compile-translations.diff.gz | patch -p1 || exit 1
for pofile in $(find po/ -type f -name "*.po") ; do 
  mkdir -p translations/$(basename ${pofile} .po)/LC_MESSAGES
  msgfmt -o translations/$(basename ${pofile} .po)/LC_MESSAGES/wicd.mo ${pofile}
done
The patch removes a few sections from the setup.py file that compiles translations and then does them using the for loop.

After running that patch and for loop, you should be able to compile wicd using the following (assuming you're running 64bit, otherwise remove the 64 from the two lib dirs). You could also remove the kde section if you want, but it shouldn't matter even if you don't have kde installed. However, Pat also applies two other patches, wicd-1421918.patch.gz and curses_bitrate_fix.patch.gz, both of which could affect your usage of wicd once it's compiled, so I'd recommend using those patches. They're available on the link Alien Bob provided and the patch commands are in the SlackBuild.

Code:
python setup.py configure \
  --lib=/usr/lib64/wicd \
  --kdedir=/usr/share/autostart \
  --backends=/usr/lib64/wicd/backends \
  --no-install-gnome-shell-extensions

python setup.py install

---or--

python setup.py install --root=$PKG   # if you want to install it to a temporary directory to create a Slackware package
Reading through the SlackBuild provides you everything you need to do to compile wicd on Slackware. pybabel usage has not been tested on Slackware since wicd is specifically patched to not use that, so if you insist to go that route, I couldn't tell you whether it is going to work or not.

But, considering you're only a few weeks into Linux, personally, I wouldn't jump this deep into compiling software (trying to get pybabel working on wicd on Slackware when it's been pretty much untested and specifically patched out of the official package) until you have a good feel for how it all works. If you do still want to pursue this, we can try to help, but you need to give us more information, like the output of your commands when they fail. We can't do much with vague wording without error messages.

Long story short, when there's a SlackBuild available, it is almost always recommended to use that to build software unless you're specifically trying to enable something that isn't default. But even then, you can usually just modify the SlackBuild to suit your purposes rather than starting over from scratch and reinventing the wheel.
thanks a lot, it is work, i check, but my way was little another. at first i tried to create blank file nano /usr/lib64/python2.7/site-packages/babel/locale-data . then python setup.py build of wicd said me that locale-data not a directory. well, rm /usr/lib64/python2.7/site-packages/babel/locale-data&&mkdir /usr/lib64/python2.7/site-packages/babel/locale-data . python setup.py build said: "RuntimeError: The Babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files. Just make sure to run "python setup.py import_cldr" before installing the library.". i went to babel source directory and saw that python setup.py import_cldr required internet connection. using iw i connected to wi-fi and repeat. after installation of recompiled babel package wicd was compiled without errors.


my thanks for all who helped me
 
  


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
[SOLVED] Wicd Could not connect to wicd's D-Bus interface GreenFireFly Slackware 6 04-29-2019 12:48 PM
[SOLVED] Deleting the source directory and build directory after compiling each package ganiz Linux From Scratch 5 01-11-2018 02:02 AM
Uncompressing a directory structure full of individual gz files jasonok6 Linux - Software 2 06-02-2010 12:23 PM
WICD tray icon says not connected, WICD manager says conneted to wired network?!?! intheshadows Linux - Newbie 1 12-24-2009 12:15 PM
compiling individual modules irvken Linux - Newbie 1 05-08-2005 11:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration