Issues with pkg commands

Mayhem30

Well-Known Member

Reaction score: 23
Messages: 422

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#
 

wblock@

Beastie Himself
Developer

Reaction score: 3,678
Messages: 13,851

What version of FreeBSD, and did you recently upgrade?
 

jb_fvwm2

Daemon

Reaction score: 187
Messages: 1,720

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)
 
OP
M

Mayhem30

Well-Known Member

Reaction score: 23
Messages: 422

wblock@ said:
What version of FreeBSD, and did you recently upgrade?
I'm using 8.3-RELEASE-p11 (haven't upgraded yet).
 

denzill

New Member


Messages: 3

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.
 

snowfly

New Member


Messages: 1

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
 

kpa

Beastie's Twin

Reaction score: 1,820
Messages: 6,318

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.
 

kpa

Beastie's Twin

Reaction score: 1,820
Messages: 6,318

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.
 

joint

Member

Reaction score: 1
Messages: 41

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!
 

GreenReaper

New Member

Reaction score: 1
Messages: 2

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.
 

tingo

Daemon

Reaction score: 479
Messages: 2,246

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)
 

ohauer

Active Member

Reaction score: 17
Messages: 127

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.
 

adiposity

New Member


Messages: 16

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.
 
Top