# make suddenly failing for all ports



## jtl (Feb 3, 2010)

I've been updating some ports and without warning (that I could see), make has suddenly started failing.  If I cd into any port directory e.g. /usr/ports/databases/py-sqlite3 and try a make, make config, make deinstall or make reinstall I get the following error:


```
# make deinstall
4 open conditionals:
	     at line 5850 (skipped)
	    at line 5848 (skipped)
	    at line 1610 (evaluated to false)
	   at line 1170 (evaluated to true)
make: fatal errors encountered -- cannot continue
#
```

This now happens with every port I've tried.  I've also been updating ports with portmanager, but now that too is suddenly giving the following errors:


```
------------------------------------------------------------------------
portmanager 0.4.1_9: Collecting installed port data 
------------------------------------------------------------------------
4 open conditionals:
	    at line 5850 (evaluated to false)
	   at line 5848 (evaluated to true)
	  at line 1610 (evaluated to true)
	 at line 1170 (evaluated to true)
make: fatal errors encountered -- cannot continue
MGdbAdd error: attempt to place null data into record halted
Assertion failed: (0), function MGdbAdd, file MGdbAdd.c, line 78.
Abort (core dumped)
#
```

I've done a portsnap fetch and portsnap upgrade, also a pkgd


----------



## crsd (Feb 3, 2010)

What are the contents of your /etc/make.conf and output of [cmd=""]which make[/cmd]?


----------



## jtl (Feb 3, 2010)

/etc/make.conf contains:


```
# added by use.perl 2009-09-26 23:52:05
PERL_VERSION=5.10.1
```

and which make reports:


```
/usr/bin/make
```

I tried commenting out PERL_VERSION=5.10.1 in /etc/make.conf, but it made no difference.


----------



## crsd (Feb 3, 2010)

Well, if it happens for any and all ports, check contents of your /usr/ports/Mk, and/or try updating your ports tree (you could just run `# portsnap extract` if you use it to make sure your ports tree is ok).


----------



## jtl (Feb 3, 2010)

I checked the contents of /usr/ports/Mk and noticed that bsd.ports.mk had been moved to bsd.ports.mk.orig, and a new bsd.ports.mk was present.  I restored the old bsd.ports.mk and now make is working again.  I'm pretty sure this change occurred when I did a "portmanager -u mercurial -l", that failed to complete.  I don't remember why it failed but I think it was due to a problem with openoffice.org-3.  Anyway, it looks like I'm back in business.  Thank you!

Btw - is there someway to restore the contents of the /usr/ports/Mk directory?  That is, does /usr/ports/Mk get rebuilt when doing a portsnap upgrade, or perhaps only with a portsnap extract?  I'd like to find a way to ensure that the contents of my /usr/ports/Mk directory is correct and consistent.


----------



## SirDice (Feb 3, 2010)

jtl said:
			
		

> Btw - is there someway to restore the contents of the /usr/ports/Mk directory?  That is, does /usr/ports/Mk get rebuilt when doing a portsnap upgrade, or perhaps only with a portsnap extract?  I'd like to find a way to ensure that the contents of my /usr/ports/Mk directory is correct and consistent.


It gets updated in the same way as the rest of the ports tree.


----------



## DutchDaemon (Feb 3, 2010)

If you want a pristine and 'guaranteed' ports tree: `# rm -rf /usr/ports && rm /var/db/portsnap/tag && portsnap fetch extract`.


----------



## jtl (Feb 3, 2010)

Can I force an update of a file such as /usr/ports/Mk/bsd.port.mk simply by renaming it or deleting it, and then doing a portsnap fetch and portsnap update?  I'd like to think so, but I suspect that's not sufficient because (from what I can tell) bsd.port.mk can be modified by portmanager, so it probably reflects the state of my installed ports in some way.


----------



## DutchDaemon (Feb 3, 2010)

`# cd /usr/ports && portsnap extract Mk/bsd.port.mk`

BTW: no ports management tool should touch /usr/ports/Mk


----------

