Warning: there may be occasional oddness due to css and blog edits. **KNOWN ISSUE: possible hidden text**

Saturday, February 20, 2021

make doesn't config

Clearly something is broken but I do not know precisely how or exactly what.  All that I do know is that when I try to configure a port, by going to that port directory, such as for minetest, or use the command as below,

make -C /usr/ports/games/minetest config

all I get is this.

===> Options unchanged

I am not aware of any of the myriad of changes I have ever made to my system which would result in such a bizarre error.  My extensive make.conf permits me the ability to adjust options but it is a far more tedious method, especially since I must first look at the Makefile or freshports.org to parse out the possible options.

Prior to this recent very strange issue, I had another, which I may have partially resolved more by avoiding certain ports than by curing the weird dependency issue.  Yes, for surely the second time my system claims a vast number of dependencies which are inaccurate.  Previously it was rust which somehow gained the excess dependents and now it is openjdk7 which has remained wrong even with kernel and world update, and various attempts to solve the issue.  My seeming quasi-solution was to discover by close monitoring, which port was the first of the series which suddenly required openjdk7.  I also gathered the list of ports which failed when openjdk7 itself failed to build and by failing made it very easy to see all the dependents.  I then tweaked the option config for each of the ports in turn, and in the process also discovered that for ages I have had kerberos installed but never used.  The initial lynchpin was apr.  The additional peculiarity is that the dependency issue seems to somehow very strangely be limited to poudriere bulk port builds as individual semi-automated make builds seem to be immune in some way while even after succeeding outside of poudriere, within its jail the dependency issue remained.

So it is very likely that this whole dependency issue (attempts to repair it) is what provoked some other modification to my system which has finally broken my ability to configure ports the normal way within the ports tree.

I could say "the fun part about.." but I'm not sure this is really fun as it is rather frustrating and there doesn't seem to be any documentation about how to extricate my system from this pickle.  What is needed to be able to configure a port?  There is no such list, no steps to enable, nothing.  The same goes for my prior dependency issue, there is no tool or method to solve it or to reset the mess to get things working properly again.  Lucky for you, if I ever solve it for myself there will be this blog post to reference if you somehow manage to accidentally follow in my footsteps.

I cannot be certain yet if anything regarding the dependency issue has changed, but I discovered that I can obtain an index file by make -C /usr/ports fetchindex though when I attempted this it failed due I suspect to ssl or cert issues.  I simply used the url with fetch and adjusted for no ssl.  The file was obtained in bzip2 format so I unpacked it.  I used my recert alias which is set to make -C /usr/ports/security/ca_root_nss reinstall clean to update my local certs after.

Since I can survive tediously without the ability to adjust port configs the usual way, I am rebuilding all my ports with poudriere.  It seems that I may have squashed the openjdk7 dependency issue afterall, as there have not yet been 1200 skipped ports due to openjdk7 failing to build, thus proving it.  I could be wrong, but the series of skipped ports usually appeared near the beginning of the over 2000 port bulk build.  Once that finishes and the installed packages are updated/installed, I can resume beating my head against the 'make config' wall.

How about I list the things I know that I did to possibly resolve the dependency issue?  Maybe some or all of it caused the present issue.  In approximate order mostly:

  • removed the /var/db/ports directory
  • reinstalled as many ports as would successfully build (though my script iterated a list):
    make -C /usr/ports/port/origin install clean
  • erased the /var/db/pkg files: FreeBSD.meta, local.sqlite, poudriere.meta, repo-FreeBSD.sqlite, repo-poudriere.sqlite
  • removed the /usr/ports/INDEX-12 file
  1. reinstalled pkg
    make -C /usr/ports/ports-mgmt/pkg deinstall reinstall clean
  2. (rebootstrapped pkg)
    pkg bootstrap -f
  3. attempted to find missing dependencies
    pkg check -Ba
  4. re-created the poudriere repo:
    pkg repo /usr/local/poudriere/data/packages/13amd64-default
  5. updated /usr/src, rebuilt and reinstalled kernel and world
  6. updated the poudriere 13amd64 jail
  7. re-created the poudriere repo:
    pkg repo /usr/local/poudriere/data/packages/13amd64-default
  8. copied a fresh /etc/pkg.conf from /etc/pkg.conf.sample and revised it to match my former revised pkg.conf

I keep thinking (now) that the one thing I have not yet touched is also directly related to make, the /etc/make.conf but if it had some sort of syntax error surely it would be noticed, caught automatically by shell or make itself.  Once my latest round of poudriere bulk port builds are finished, I can stash the extensive make.conf and see if that solves the configuration issue.  The make.conf is copied to an appropriately named poudriere make.conf file name, so it could affect both methods of build somehow.  However, as well as I can remember, outside of the poudriere jail ports did not have inordinate dependence upon openjdk7.  Stashing the make.conf did not solve the issue.

Finally, I managed to type the right search terms which found an old FreeBSD forum post that helped solve my issue.

make -C /usr/ports/ports-mgmt/dialog4ports install clean

Exactly why ports-mgmt/dialog4ports is not a dependency somewhere, or automatically installed by make config in any port directory, or at least mentioned in man ports is a complete mystery to me.  Instead, it appears that I am blind, below is a subsection of man 7 ports.

     The following targets will be run automatically by each proceeding target
     in order.  That is, build will be run (if necessary) by install, and so
     on all the way to fetch.  Usually, you will only use the install target.

     config         Configure OPTIONS for this port using dialog4ports(1).

     fetch          Fetch all of the files needed to build this port from the
                    sites listed in MASTER_SITES and PATCH_SITES.  See
                    FETCH_CMD, MASTER_SITE_OVERRIDE and MASTER_SITE_BACKUP.

     checksum       Verify that the fetched distfile's checksum matches the
                    one the port was tested against.  If the distfile's
                    checksum does not match, it also fetches the distfiles
                    which are missing or failed the checksum calculation.
                    Defining NO_CHECKSUM will skip this step.

     depends        Install (or compile if only compilation is necessary) any
                    dependencies of the current port.  When called by the
                    extract or fetch targets, this is run in piecemeal as
                    fetch-depends, build-depends, etc.  Defining NO_DEPENDS
                    will skip this step.

     extract        Expand the distfile into a work directory.

     patch          Apply any patches that are necessary for the port.

     configure      Configure the port.  Some ports will ask you questions
                    during this stage.  See INTERACTIVE and BATCH.

     build          Build the port.  This is the same as calling the all
                    target.

     install        Install the port and register it with the package system.
                    This is all you really need to do.

     The following targets are not run during the normal install process.

     showconfig           Display OPTIONS config for this port.

     showconfig-recursive
                          Display OPTIONS config for this port and all its
                          dependencies.

     rmconfig             Remove OPTIONS config for this port.

     rmconfig-recursive   Remove OPTIONS config for this port and all its
                          dependencies.

     config-conditional   Skip the ports which have already had their OPTIONS
                          configured.

     config-recursive     Configure OPTIONS for this port and all its
                          dependencies using dialog4ports(1).

I would strongly recommend looking at the rest of the manpage, as you may discover other interesting capabilities as yet unknown.  In particular from the manpage for ports: did you know about showconfig or config-conditional?

No comments:

Post a Comment

Thank you for your interest!

Frequently viewed this week