How To Troubleshoot MacPorts

Ryan Schmidt ryandesign at
Thu Apr 11 23:19:41 UTC 2019

On Apr 10, 2019, at 07:40, Michael Newman wrote:

> I’ve been using MacPorts for many years now. While I understand the basics, I often run into problems that I cannot solve. Without exception, I have been able to post those problems here and get near-immediate solutions. For that I am grateful. 
> On the other hand, I would ver much like to learn how to deal with these issues on my own. Usually, the solutions I’m offered are easy to follow, but nearly impossible to understand. I know what I’m doing,  But I don’t know why. 
> Where can I turn to learn about the inner workings of MacPorts? What the different log files are and what they mean? How to figure out what went wrong and how to fix it? 
> I've looked at the "How To" page, But that seems aimed at users more advanced than I and with needs and interests different from my own. 
> Any ideas?

It's difficult to answer a question this broad. But I can tell you a little about how I answer port build failure bug reports or posts on the list.

Some common problems get reported over and over; it's easy to refer those people to a previous ticket or mailing list discussion or entry in the FAQ or ProblemHotlist wiki pages.

The mailing list archives and tickets are searchable; if you have a problem with a port, searching for prior bug reports about that port can be helpful. Sometimes you have to include the closed bug reports in the search, since sometimes the problem is with the user's configuration and not something we can fix in MacPorts.

For issues I don't immediately recognize, especially error messages from build logs, I'll often start with a Google search of the error message, usually in quotation marks. Often I'll find that someone reported that error message to someone else before. It may be a bug report for a different software package building on a different operating system, but the discussion in the bug report might help me understand the problem and apply a solution to our user's situation.

I'm not sure what you mean by "different log files". Whenever you ask MacPorts to install any port, it will record its progress in a main.log file for that port. The path to the main.log file for port XYZ can be printed by running "port logfile XYZ" but MacPorts also prints it automatically if a build fails. This is the file we ask users to attach to bug reports; this is the file that will contain the error messages that can be Googled or otherwise looked up to try to determine what they mean.

Individual ports might generate additional log files. Ports that use the autotools build system, for example, will also generate a config.log file. If a build fails during the configuration phase of an autotools-using port, MacPorts will also print the path to the config.log file, since it is that file that will often provide crucial information for understanding why configuration failed.

If port installation succeeds, the port's logs are deleted (unless you've configured MacPorts not to do that).

Individual ports might install daemons that keep their own log files when they run. Usually they would go somewhere in /opt/local/var/log/.

More information about the macports-users mailing list