How to use MacPorts for CLI only tools
Savory Michael
msavory1 at nzbox.com
Mon Nov 8 18:57:22 PST 2010
Hi All
Since I started with MacPorts it seems the dependencies have grown a lot, it seems now that I need to build all of Xorg-server and GCC even for a simple tasks.
If I get this to work, I promise to document it and submit it to the wiki...
So starting off with a clean Leopard install, updated to 10.5.8, Xcode 3.1.4 and a fresh from .dmg Leopard Macports 1.9.2 I want to install a command line Python tool "scapy"
ppc-managers-mac-mini:~ manager$ sudo port info scapy
...
Library Dependencies: python25, py25-readline, py25-pylibpcap, py25-libdnet,
py25-crypto, py25-gnuplot, py25-pyx, graphviz
Platforms: darwin
So it has a dependency on graphvis, so lets see if we can install graphvis without a GUI...
ppc-managers-mac-mini:~ manager$ sudo port info graphviz
graphviz @2.26.3, Revision 2 (graphics)
Variants: gdk_pixbuf, glitz, guile, java, lua, ming, no_pangocairo,
no_x11, ocaml, perl, php, python24, python25, python26, r,
rsvg, ruby, smyrna, tcl, universal
OK so "no_x11" and "python25" sound pretty good...
ppc-managers-mac-mini:~ manager$ sudo port -d install graphviz +no_x11 +python25
So after heaps of looping through some dependency checks it errors with
....
DEBUG: Searching for dependency: freetype
DEBUG: Didn't find receipt, going to depspec regex for: freetype
DEBUG: Searching for dependency: fontconfig
DEBUG: Didn't find receipt, going to depspec regex for: fontconfig
DEBUG: Searching for dependency: expat
DEBUG: Didn't find receipt, going to depspec regex for: expat
DEBUG: Searching for dependency: pkgconfig
DEBUG: Didn't find receipt, going to depspec regex for: pkgconfig
DEBUG: Searching for dependency: xorg-libX11
DEBUG: Didn't find receipt, going to depspec regex for: xorg-libX11
DEBUG: Searching for dependency: xorg-renderproto
DEBUG: Didn't find receipt, going to depspec regex for: xorg-renderproto
DEBUG: Searching for dependency: pkgconfig
DEBUG: Didn't find receipt, going to depspec regex for: pkgconfig
DEBUG: too many nested evaluations (infinite loop?)
while executing
"lshift args"
("catch" arm line 2)
invoked from within
"switch $arg {
catch {
set elem [lshift args]
if {[llength $args] == 0 || [llength $elem] > 4} {
..."
(procedure "try" line 10)
invoked from within
"try {
seek $fd $offset
gets $fd line
set name [lindex $line 0]
set len..."
(procedure "mportlookup" line 23)
invoked from within
"mportlookup $dep_portname"
Error: Internal error: port lookup failed: too many nested evaluations (infinite loop?)
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>
ppc-managers-mac-mini:~ manager$
So searching the emails I found this from Rainer
On Jul 6, 2010, at 6:21 AM, Rainer Müller wrote:
>> 3. For python, how do I specify "Give me command line scripting, no gui"?
>
> Use the +no_tkinter variant, "sudo port install python26 +no_tkinter".
so trying that for Python2.5
sudo port -y install python25 +no_tkinter
Password:
---> Computing dependencies for python25
---> Dependencies to be installed: bzip2 db46 gdbm gettext expat libiconv gperf ncurses ncursesw readline sqlite3 tk Xft2 fontconfig freetype pkgconfig xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python26 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto tcl xorg-libXScrnSaver xorg-libXext xorg-scrnsaverproto
So obviously even this fails to stop a full xorg build.
Looks like Python2.5 doesn't have a no GUI version....
ppc-managers-mac-mini:~ manager$ sudo port info python25
python25 @2.5.5, Revision 1 (lang)
Variants: universal
Description: Python is an interpreted, interactive, object-oriented
programming language.
Homepage: http://www.python.org/
Library Dependencies: gettext, zlib, openssl, tk, sqlite3, db46, bzip2, gdbm,
readline, ncurses
Platforms: darwin
License: unknown
Maintainers: jwa at macports.org, openmaintainer at macports.org
So should I try and make a py26-scapy port??
What should I try next?
Mike
p.s. Installing simple CLI items like zlib and openssl works fine for this device of course....
More information about the macports-users
mailing list