Issues with pkg commands

Today, I'm running into some weird issues. When I try to run pkg_version, pkgdb, etc.

These are the errors I am running into:
Code:
localhost# pkgdb -F
Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

"/usr/ports/Mk/bsd.sites.mk", line 957: Malformed conditional (!empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan")
Unknown modifier 't'

"Mk/bsd.port.mk", line 2929: Unclosed conditional/for loop
"Mk/bsd.port.mk", line 2929: Unexpected end of file in for loop.

"Mk/bsd.port.mk", line 6706: Unclosed conditional/for loop
"Mk/bsd.port.mk", line 6706: Unexpected end of file in for loop.

1 open conditional:
         at line 1179 (evaluated to true)
make: fatal errors encountered -- cannot continue
can't convert nil into String
localhost#
 
I was going to guess an earlier version of FreeBSD (v8-something) but trying the command here, it is not completing the stale dependency as expected, with a not-before-seen
Code:
make: Max recursion level (500) exceeded.  Deleted (irrelevant)
 
kpa said:
Support for 8.3 just ended and there was a commit yesterday to the ports tree that deliberately broke the ports tree for 8.3 to encourage upgrading. This one:
FreeBSD senior 9.0-RELEASE-p7 and FreeBSD 9.0-RELEASE-p7 give the same issues.
 
FreeBSD 8.4-RELEASE-p7 gives the same issues.

When I want use the command make install to install ports , the system shows a message as below:
Code:
make install clean
Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

"/usr/ports/Mk/bsd.sites.mk", line 957: Malformed conditional (!empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan")
Unknown modifier 't'

"/usr/ports/Mk/bsd.port.mk", line 2929: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 2929: Unexpected end of file in for loop.

"/usr/ports/Mk/bsd.port.mk", line 6706: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 6706: Unexpected end of file in for loop.

1 open conditional:
         at line 1179 (evaluated to true)
make: fatal errors encountered -- cannot continue
 
Upgrade first to the latest patch level of 8.4 that is 8.4-RELEASE-p9 at the moment and see if that fixes the issue. According to the commit message the make(1) in 8.4 should support the :tu and :tl modifiers. If it doesn't then this is an oversight from the portmgr@ team and should be reported. 8.4 is promised to be supported until June 30, 2015.
 
sdecleire said:
9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825 gives the same issues.

Your system is out of date and needs updating, the latest SVN revision for 9.1-RELEASE (releng/9.1) is 265988. I would make a bet that the newer bmake that understands those modifiers that are giving you an error was added to 9.1-RELEASE after the release and since your system doesn't have any of the errata or security updates it's failing to build any ports.
 
snowfly said:
FreeBSD 8.4-RELEASE-p7 gives the same issues.

When I want use the command make install to install ports , the system shows a message as below:
Code:
make install clean
Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

Unknown modifier 't'

"/usr/ports/Mk/bsd.sites.mk", line 957: Malformed conditional (!empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan")
Unknown modifier 't'

"/usr/ports/Mk/bsd.port.mk", line 2929: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 2929: Unexpected end of file in for loop.

"/usr/ports/Mk/bsd.port.mk", line 6706: Unclosed conditional/for loop
"/usr/ports/Mk/bsd.port.mk", line 6706: Unexpected end of file in for loop.

1 open conditional:
         at line 1179 (evaluated to true)
make: fatal errors encountered -- cannot continue

Had the same issue and there is a fix: just take the file /usr/bin/make off the FreeBSD-8.4 default image and replace it on your server. Good luck!
 
In case you're someone like me who's stuck in an outdated jail and has to do everything remotely:
  • Grab the disk1 distribution for your architecture.
  • In the 8.4_Release/base directory, from a bash prompt (Git Bash is fine) do:
    Code:
    cat BASE.?? | tar -xpzf - -C /some/path [or c:/some/path on Windows]
  • Extract the make() program from /usr/bin and copy it to /usr/bin on the server (remember to chmod 555, chown root, chgrp wheel).
  • Hope it works! Remember, you're on an unsupported OS, so ports will probably break and the base itself is likely insecure. Upgrade properly ASAP.
 
I got bitten by this today. Situation:
I have a machine with an old installation on it:
Code:
root@kg-vm2# uname -a
FreeBSD kg-vm2 8.3-RC2 FreeBSD 8.3-RC2 #0: Sat Mar 24 16:15:47 UTC 2012
     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
naturally I want to upgrade to the latest FreeBSD 8.4-stable. This installation didn't have a ports tree installed, so I used portsnap to get a ports tree installed. Then I try to install devel/subversion.
Except that it doesn't work. Nor can I install devel/bmake, because the whole ports tree is broken. So I check /usr/ports/UPDATING for clues on how to handle this situation, but can't find any???

So the people in charge broke the ports tree for 8.3 and older (fine, I can live with that), but didn't find it necessary to warn users?

I'm not a happy customer (or user) right now.
(Yes, I know I can fix this with unconventional steps, but that is beside the point)
 
The best way is to use freebsd-update and update to 8.4.
After the upgrade the ports tree will work again.
Are there any special reasons why the box was running on a 8.3-rc2 snapshot and not upgraded?

Note:
In a few days the old pkg_$tools will be deprecated, the new tool to use is then ports-mgmt/pkg.
Please take the time and read how it works and how to migrate already installed packages / ports to pkg.
 
Here are the commands I had to run to get things working on my FreeBSD 9.0 box that was still using old pkg_ tools.

Code:
pkg_add -r http://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-9.0-release/devel/bmake-20111111.tbz
cp /usr/bin/make /usr/bin/make.old
rm /usr/bin/make
ln -sv /usr/local/bin/bmake /usr/bin/make
cd /usr/ports/ports-mgmt/pkg
make -m /usr/share/mk UPGRADEPKG=1 install clean
pkg2ng

To use ports after this, I have to run make -m /usr/share/mk instead of make.
 
Back
Top