Installing Namebench [Solved]

Discussions Regarding Software

Moderator: Moderators

Installing Namebench [Solved]

Postby chasha420 » Tue Apr 17, 2012 22:09

Hi guys...I was looking for a way to get this utility called namebench...it wasn't available in entropy but saw it in Portage & wanted to install it but it had a lot of dependencies which I had to manually install from entropy but still finally it failed to get installed @portage cos it needed python to be recompiled using the tk useflag.

Enlik @Sabayon channel adviced me to re-open this bug: "https://bugs.sabayon.org/2296" but I'm not sure how to do that :?

Also here's the fail log:
Code: Select all
# emerge -1v --nodeps net-analyzer/namebench --ask

These are the packages that would be merged, in order:

[ebuild  N     ] net-analyzer/namebench-1.3.1  USE="X" 0 kB

Total: 1 package (1 new), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-analyzer/namebench-1.3.1
 * namebench-1.3.1-source.tgz RMD160 SHA1 SHA256 size ;-) ...                                                                                                                  [ ok ]
 * Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
 * ERROR: net-analyzer/namebench-1.3.1 failed (setup phase):
 *   Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
 *
 * Call stack:
 *                ebuild.sh, line  85:  Called pkg_setup
 *   namebench-1.3.1.ebuild, line  30:  Called python_pkg_setup
 *            python.eclass, line 472:  Called python_pkg_setup_check_USE_flags
 *            python.eclass, line 453:  Called die
 * The specific snippet of code:
 *                  die "Please rebuild ${python_atom} with the following USE flags enabled: ${PYTHON_USE_WITH}"
 *
 * If you need support, post the output of 'emerge --info =net-analyzer/namebench-1.3.1',
 * the complete build log and the output of 'emerge -pqv =net-analyzer/namebench-1.3.1'.
 * The complete build log is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/die.env'.
 * S: '/var/tmp/portage/net-analyzer/namebench-1.3.1/work/namebench-1.3.1'

>>> Failed to emerge net-analyzer/namebench-1.3.1, Log file:

>>>  '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'

 * Messages for package net-analyzer/namebench-1.3.1:

 * Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
 * ERROR: net-analyzer/namebench-1.3.1 failed (setup phase):
 *   Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
 *
 * Call stack:
 *                ebuild.sh, line  85:  Called pkg_setup
 *   namebench-1.3.1.ebuild, line  30:  Called python_pkg_setup
 *            python.eclass, line 472:  Called python_pkg_setup_check_USE_flags
 *            python.eclass, line 453:  Called die
 * The specific snippet of code:
 *                  die "Please rebuild ${python_atom} with the following USE flags enabled: ${PYTHON_USE_WITH}"
 *
 * If you need support, post the output of 'emerge --info =net-analyzer/namebench-1.3.1',
 * the complete build log and the output of 'emerge -pqv =net-analyzer/namebench-1.3.1'.
 * The complete build log is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/die.env'.
 * S: '/var/tmp/portage/net-analyzer/namebench-1.3.1/work/namebench-1.3.1'


Anyway please advice me if there's anything else I should do...but for the time being I've succeeded in manually downloading & installing it using python from source...but it still lacks the GUI cos TK flag isn't there.

Thanks in advance!
Last edited by chasha420 on Sun Apr 22, 2012 19:09, edited 1 time in total.
User avatar
chasha420
Technological Hen
 
Posts: 309
Joined: Thu Mar 31, 2011 15:32
Location: /dev/null

Re: Installing Namebench

Postby Stupot » Tue Apr 17, 2012 22:26

The default python package in Sabayon won't be including tk because of all the dependencies required (note, I'm not a dev, but I'm sure they will cite the same reasons gentoo doesn't include it by default).

But, I do see a dev-lang/python-tk (http://packages.sabayon.org/show/python ... 5,standard)

I would think installing python-tk is probably what you need.
Stupot
Sagely Hen
 
Posts: 1017
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Installing Namebench

Postby chasha420 » Wed Apr 18, 2012 5:37

Stupot wrote:The default python package in Sabayon won't be including tk because of all the dependencies required (note, I'm not a dev, but I'm sure they will cite the same reasons gentoo doesn't include it by default).

But, I do see a dev-lang/python-tk (http://packages.sabayon.org/show/python ... 5,standard)

I would think installing python-tk is probably what you need.


Thanks Stupot...I did try installing that too directly from entropy...but it made no difference. Portage doesn't recognise that :?
User avatar
chasha420
Technological Hen
 
Posts: 309
Joined: Thu Mar 31, 2011 15:32
Location: /dev/null

Re: Installing Namebench

Postby Stupot » Wed Apr 18, 2012 15:52

My guess is you probably need to switch your system python to the python-tk you just installed via eselect. Unfortunately, I'm not at home at the moment to be able to confirm that.
Stupot
Sagely Hen
 
Posts: 1017
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Installing Namebench

Postby chasha420 » Wed Apr 18, 2012 16:39

Stupot wrote:My guess is you probably need to switch your system python to the python-tk you just installed via eselect. Unfortunately, I'm not at home at the moment to be able to confirm that.


Hi Stupot...I installed python-tk-2.7.x.x and then tried switching python version using eselect but it doesn't show up on the list.

Code: Select all
# eselect python list
Available Python interpreters:
  [1]   python2.7 *


Guess it doesn't work that way :|
User avatar
chasha420
Technological Hen
 
Posts: 309
Joined: Thu Mar 31, 2011 15:32
Location: /dev/null

Re: Installing Namebench

Postby Stupot » Thu Apr 19, 2012 0:49

I installed dev-lang/python-tk on my system and it pulled in all the libraries needed. no need to switch python interpreters, it's just adding missing libraries.

http://wiki.python.org/moin/TkInter

That worked for me after installing python-tk.

Code: Select all
stupot-Desktop stupot # equo install dev-lang/python-tk-2.7.2-r3


Make sure you are installing the right python-tk package.

It should be able to compile after that.
Stupot
Sagely Hen
 
Posts: 1017
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Installing Namebench

Postby chasha420 » Thu Apr 19, 2012 7:33

Wow Stupot could you give me some of your magical powers? Lol....I still can't do it. :mrgreen:

Code: Select all
# emerge -1v net-analyzer/namebench --ask

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-python/graphy-1.0  USE="-examples" 68 kB [0]
[ebuild  N     ] dev-python/jinja-2.6  USE="-doc -examples -i18n -vim-syntax" 381 kB [0]
[ebuild   R    ] dev-lang/python-2.7.2-r3  USE="gdbm ipv6 ncurses readline sqlite ssl threads tk* (wide-unicode) xml -berkdb -build -doc -examples -wininst" 11,494 kB [1]
[ebuild  N     ] net-analyzer/namebench-1.3.1  USE="X" 0 kB [0]

Total: 4 packages (3 new, 1 reinstall), Size of downloads: 11,942 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /var/lib/layman/sabayon

The following USE changes are necessary to proceed:
#required by net-analyzer/namebench-1.3.1, required by net-analyzer/namebench (argument)
>=dev-lang/python-2.7.2-r3:2.7 tk

Use --autounmask-write to write changes to config files (honoring CONFIG_PROTECT).

!!! The following installed packages are masked:
- app-emulation/virtualbox-bin-4.1.10::gentoo (masked by: PUEL license(s))
A copy of the 'PUEL' license is located at '/usr/portage/licenses/PUEL'.

- www-plugins/adobe-flash-11.1.102.63::gentoo (masked by: AdobeFlash-10.3 license(s))
A copy of the 'AdobeFlash-10.3' license is located at '/usr/portage/licenses/AdobeFlash-10.3'.

- dev-java/sun-jre-bin-1.6.0.31::gentoo (masked by: Oracle-BCLA-JavaSE license(s))
A copy of the 'Oracle-BCLA-JavaSE' license is located at '/usr/portage/licenses/Oracle-BCLA-JavaSE'.

- net-im/skype-2.2.0.35-r1::gentoo (masked by: skype-eula license(s))
A copy of the 'skype-eula' license is located at '/usr/portage/licenses/skype-eula'.

- dev-java/sun-jdk-1.6.0.31::gentoo (masked by: Oracle-BCLA-JavaSE license(s))
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


I did install the same python-tk package...so what went wrong?
User avatar
chasha420
Technological Hen
 
Posts: 309
Joined: Thu Mar 31, 2011 15:32
Location: /dev/null

Re: Installing Namebench

Postby Stupot » Fri Apr 20, 2012 5:16

Well, all I did was give python the ability to use the tk stuff.

However, the emerge fails:

>>> Emerging (2 of 2) net-analyzer/namebench-1.3.1
* namebench-1.3.1-source.tgz RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
* ERROR: net-analyzer/namebench-1.3.1 failed (setup phase):
* Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
*
* Call stack:
* ebuild.sh, line 85: Called pkg_setup
* namebench-1.3.1.ebuild, line 30: Called python_pkg_setup
* python.eclass, line 472: Called python_pkg_setup_check_USE_flags
* python.eclass, line 453: Called die
* The specific snippet of code:
* die "Please rebuild ${python_atom} with the following USE flags enabled: ${PYTHON_USE_WITH}"
*
* If you need support, post the output of 'emerge --info =net-analyzer/namebench-1.3.1',
* the complete build log and the output of 'emerge -pqv =net-analyzer/namebench-1.3.1'.
* The complete build log is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/die.env'.
* S: '/var/tmp/portage/net-analyzer/namebench-1.3.1/work/namebench-1.3.1'

>>> Failed to emerge net-analyzer/namebench-1.3.1, Log file:

>>> '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'

* Messages for package net-analyzer/namebench-1.3.1:

* Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
* ERROR: net-analyzer/namebench-1.3.1 failed (setup phase):
* Please rebuild dev-lang/python:2.7 with the following USE flags enabled: tk
*
* Call stack:
* ebuild.sh, line 85: Called pkg_setup
* namebench-1.3.1.ebuild, line 30: Called python_pkg_setup
* python.eclass, line 472: Called python_pkg_setup_check_USE_flags
* python.eclass, line 453: Called die
* The specific snippet of code:
* die "Please rebuild ${python_atom} with the following USE flags enabled: ${PYTHON_USE_WITH}"
*
* If you need support, post the output of 'emerge --info =net-analyzer/namebench-1.3.1',
* the complete build log and the output of 'emerge -pqv =net-analyzer/namebench-1.3.1'.
* The complete build log is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/net-analyzer/namebench-1.3.1/temp/die.env'.
* S: '/var/tmp/portage/net-analyzer/namebench-1.3.1/work/namebench-1.3.1'

I'm don't really have much experience with ebuilds, but I got it working by simply removing the tk dependency from an ebuild and building it that way. It's not really the right way to do it. We should change the ebuild to look for python-tk, but I don't know how to write them.

Here's what you'll need to do.

After installing everything (especially python-tk) you can from entropy, install

Code: Select all
#emerge graphy


to get your last dependency.

Then you're going to take this ebuild and build it locally.

First thing we need to do is make sure your /etc/make.conf has the correct line in it so it can find your custom ebuilds. Simply add:

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"

Then, put this ebuild in the following location /usr/local/portage/net-analyzer/namebench/namebench-1.3.1.ebuild

Code: Select all
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/namebench/namebench-1.3.1.ebuild,v 1.2 2012/02/10 03:16:07 patrick Exp $

EAPI="3"
PYTHON_DEPEND="2:2.5"
PYTHON_USE_WITH_OPT="X"
# PYTHON_USE_WITH="tk"  #WE ARE BAD PEOPLE FOR DOING IT THIS WAY

inherit distutils

DESCRIPTION="DNS Benchmark Utility"
HOMEPAGE="http://code.google.com/p/namebench/"
SRC_URI="http://namebench.googlecode.com/files/${P}-source.tgz"

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="X"

DEPEND=""
RDEPEND="${DEPEND}
   >=dev-python/dnspython-1.8.0
   >=dev-python/httplib2-0.6
   >=dev-python/graphy-1.0
   >=dev-python/jinja-2.2.1
   >=dev-python/simplejson-2.1.2"

pkg_setup() {
   python_pkg_setup
   python_set_active_version 2
}

src_prepare() {
   python_convert_shebangs -r 2 .

   # don't include bundled libraries
   export NO_THIRD_PARTY=1
}

src_install() {
   distutils_src_install --install-data=/usr/share

   dosym ${PN}.py /usr/bin/${PN} || die
}


Then
Code: Select all
# ebuild /usr/local/portage/net-analyzer/namebench/namebench-1.3.1.ebuild digest


Finally:
Code: Select all
#emerge namebench


Note: I took the steps for building from your own build here:
http://linuxreviews.org/gentoo/ebuilds/

just in case I typed something wrong.

And yes, I did test it out and it ran graphically, so it should work.

That said, I can't say this is supported or even that we're doing it the right way. I know that ebuild shouldn't be the way it is, but I lack the know how to do it proper.
Stupot
Sagely Hen
 
Posts: 1017
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Installing Namebench

Postby chasha420 » Sun Apr 22, 2012 19:08

Wow stupot...thanks for all of that but I didn't really have the time to get to that...and I installed Python-tk and also I previously installed namebench from python source...but since python-tk has now been installed...the GUI interface runs flawlessly. I guess I don't even need to bother about installing namebench from portage anymore.

Thanks for the help!
User avatar
chasha420
Technological Hen
 
Posts: 309
Joined: Thu Mar 31, 2011 15:32
Location: /dev/null


Return to Software in General

Who is online

Users browsing this forum: No registered users and 1 guest