How does "port" figure out which configuration files to read? Mine is now trying to get configuration information from a non-existent file: I have a (source-compiled) version installed in /Ports, and then installed another temporary version into $HOME/scratch/ports (via ./ configure --prefix=$HOME/scratch/ports, to see whether a dependency problem with ncursesw had been fixed). Running /Ports/bin/port now produces an error message: boom:~$ /Ports/bin/port --help sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/ macports.conf or in your /Users/mjs/.macports/macports.conf file while executing "mportinit ui_options global_options global_variations" Error: /Ports/bin/port: Failed to initialize MacPorts, sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/macports.conf or in your /Users/mjs/.macports/macports.conf file Where is it getting the "scratch" directory from? There's nothing in $HOME/.macports except for a history file, and there's nothing in my environment either. /Ports/bin/ports itself appears to be unchanged, and rgrep over the /Ports directory gives nothing as well. Also, why does "make install" require root privileges? I tried to install without "sudo" to try to prevent the temporary install from making changes to my existing configuration files, but it won't actually install this way. --M. -- http://beebo.org +44 78 2118 9049
On Dec 31, 2007 4:48 AM, Michael Stillwell <mjs@beebo.org> wrote:
How does "port" figure out which configuration files to read? Mine is now trying to get configuration information from a non-existent file: I have a (source-compiled) version installed in /Ports, and then installed another temporary version into $HOME/scratch/ports (via ./ configure --prefix=$HOME/scratch/ports, to see whether a dependency problem with ncursesw had been fixed).
Is there some compelling reason why it couldn't be installed in /opt/local? Running /Ports/bin/port now
produces an error message:
boom:~$ /Ports/bin/port --help sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/ macports.conf or in your /Users/mjs/.macports/macports.conf file while executing "mportinit ui_options global_options global_variations" Error: /Ports/bin/port: Failed to initialize MacPorts, sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/macports.conf or in your /Users/mjs/.macports/macports.conf file
Where is it getting the "scratch" directory from? There's nothing in $HOME/.macports except for a history file, and there's nothing in my environment either. /Ports/bin/ports itself appears to be unchanged, and rgrep over the /Ports directory gives nothing as well.
Did you not create a scratch directory in your various installs? You might want to look at your PATH to see what instance of this you're using. I don't find any relevant invocation of scratch so I think it's safe to assume it's from your testing or whatever you were doing. :: mdfind -onlyin /opt/local scratch /opt/local/var/macports/sources/rsync.macports.org/release/ports/java/jakarta-taglibs-string/files/common.xml /opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3 /rdoc/files/lib/rake/clean_rb.html /opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3 /rdoc/files/doc/rational_rdoc.html /opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3/rdoc/classes/Rake/RDocTask.html /opt/local/lib/ruby/gems/1.8/doc/rake-0.7.3 /rdoc/classes/Rake/PackageTask.html
Also, why does "make install" require root privileges? I tried to install without "sudo" to try to prevent the temporary install from making changes to my existing configuration files, but it won't actually install this way.
You can change the permissions on your ports hierarchy to fix this, if you want. I believe that's why sudo is required.
-- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@gmail.com>
On Dec 31, 2007, at 06:48, Michael Stillwell wrote:
How does "port" figure out which configuration files to read? Mine is now trying to get configuration information from a non-existent file: I have a (source-compiled) version installed in /Ports, and then installed another temporary version into $HOME/scratch/ports (via ./configure --prefix=$HOME/scratch/ports, to see whether a dependency problem with ncursesw had been fixed). Running /Ports/ bin/port now produces an error message:
boom:~$ /Ports/bin/port --help sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/ macports.conf or in your /Users/mjs/.macports/macports.conf file while executing "mportinit ui_options global_options global_variations" Error: /Ports/bin/port: Failed to initialize MacPorts, sources_conf must be set in /Users/mjs/scratch/ports/etc/macports/macports.conf or in your /Users/mjs/.macports/macports.conf file
Where is it getting the "scratch" directory from? There's nothing in $HOME/.macports except for a history file, and there's nothing in my environment either. /Ports/bin/ports itself appears to be unchanged, and rgrep over the /Ports directory gives nothing as well.
Also, why does "make install" require root privileges? I tried to install without "sudo" to try to prevent the temporary install from making changes to my existing configuration files, but it won't actually install this way.
There are two things going on here. Issue #1: The reason why your two installations are conflicting with one another is that they both installed their Tcl components to / Library/Tcl/macports1.0, and the $HOME/scratch/ports instalation's / Library/Tcl/macports1.0 has overwritten the one from $HOME/Ports. There has been discussion of moving the directory /Library/Tcl/ macports1.0 to ${prefix}/share/macports/Tcl: http://lists.macosforge.org/pipermail/macports-dev/2007-August/ 002491.html You could bypass all the arguments and just do it yourself. You should reinstall both of your installations (or at least the /Ports one, since its /Library/Tcl/macports1.0 is gone), making sure that at least one, or perhaps both, of them put their Tcl directory elsewhere, for example: PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \ --prefix=$HOME/Ports \ --with-tclpackage=$HOME/Ports/share/macports/Tcl And for the other installation: PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \ --prefix=$HOME/scratch/ports \ --with-tclpackage=$HOME/scratch/ports/share/macports/Tcl See this message where this question came up before: http://lists.macosforge.org/pipermail/macports-users/2007-December/ 007690.html Though note that Daniel's suggested location for the Tcl directory is worse; ${prefix}/share/macports/Tcl already contains other MacPorts Tcl code, so that's the directory that should be used. Issue #2: Issue #1 would also be a reason why you could not install without root. You should be able to install without root, provided you install to a location you control. And you are. But, even doing so, we get a failure, for which I have filed a bug report: http://trac.macosforge.org/projects/macports/ticket/13766
On Jan 1, 2008 12:00 AM, Ryan Schmidt <ryandesign@macports.org> wrote:
On Dec 31, 2007, at 06:48, Michael Stillwell wrote:
How does "port" figure out which configuration files to read? Mine is now trying to get configuration information from a non-existent file: [ ... ]
Issue #1: The reason why your two installations are conflicting with one another is that they both installed their Tcl components to / Library/Tcl/macports1.0, and the $HOME/scratch/ports instalation's / Library/Tcl/macports1.0 has overwritten the one from $HOME/Ports.
[ ... ]
You could bypass all the arguments and just do it yourself. You should reinstall both of your installations (or at least the /Ports one, since its /Library/Tcl/macports1.0 is gone), making sure that at least one, or perhaps both, of them put their Tcl directory elsewhere, for example:
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \ --prefix=$HOME/Ports \ --with-tclpackage=$HOME/Ports/share/macports/Tcl
Thanks; this worked perfectly. Is it possible to improve the --prefix documentation? "./configure --help" doesn't make it clear that 99% (but not 100%) of the installed files will go into the specified directory, and it's somewhat unexpected that the crucial missing directory of files is configured via --with-tclinclude. --M. -- http://beebo.org +44 78 2118 9049
On Jan 2, 2008, at 08:16, Michael Stillwell wrote:
On Jan 1, 2008 12:00 AM, Ryan Schmidt wrote:
On Dec 31, 2007, at 06:48, Michael Stillwell wrote:
How does "port" figure out which configuration files to read? Mine is now trying to get configuration information from a non-existent file: [ ... ]
Issue #1: The reason why your two installations are conflicting with one another is that they both installed their Tcl components to / Library/Tcl/macports1.0, and the $HOME/scratch/ports instalation's / Library/Tcl/macports1.0 has overwritten the one from $HOME/Ports.
[ ... ]
You could bypass all the arguments and just do it yourself. You should reinstall both of your installations (or at least the /Ports one, since its /Library/Tcl/macports1.0 is gone), making sure that at least one, or perhaps both, of them put their Tcl directory elsewhere, for example:
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \ --prefix=$HOME/Ports \ --with-tclpackage=$HOME/Ports/share/macports/Tcl
Thanks; this worked perfectly.
Is it possible to improve the --prefix documentation? "./configure --help" doesn't make it clear that 99% (but not 100%) of the installed files will go into the specified directory, and it's somewhat unexpected that the crucial missing directory of files is configured via --with-tclinclude.
I agree. It's so unclear that I read the ./configure --help, couldn't figure it out, and went searching for Daniel's email (because I remembered seeing it before). But that doesn't help people who don't know to go looking for it.
participants (3)
-
Michael Stillwell
-
paul beard
-
Ryan Schmidt