ports-mgmt/pkg build error: pkg-1.19.2/mk/common.mk" line 16: Need an operator

Hi,


I’m running an ancient and unsupported FreeBSD 11.3 and realize this may just be the end of the line and until I can actually get hands on sometime in the next year or two am locked out of updates, but perhaps there’s an easy solution to this, but ports-mgmt/pkg 1.19.2 is refusing to build.

Code:
/usr/ports/ports-mgmt/pkg # make install clean
===>  Building for pkg-1.19.2
make[2]: "/var/ports/usr/ports/ports-mgmt/pkg/work/pkg-1.19.2/mk/common.mk" line 16: Need an operator
make[2]: Fatal errors encountered -- cannot continue

Line 16 has this workaround (commented in the file)

Code:
# bmake's traditional include support treats empty strings in the expanded
# result (whether because the variable is empty or there are consecutive
# whitespace characters) as file names, and thus tries to read the containing
# directory as a Makefile, which fails, and isn't ignored since it exists.
# Work around this quirky behaviour by adding an extra entry that should never
# exist and then normalize its whitespace during substitution with :=.
DEPFILES_NONEMPTY=      $(DEPFILES) /nonexistent
-include $(DEPFILES_NONEMPTY:=)
The following is not cheering my heart for keeping this system alive:

Code:
# pkg upgrade
Updating FreeBSD repository catalogue...
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/meta.txz: Not Found
repository FreeBSD has no meta file, using default settings
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/packagesite.pkg: Not Found
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/packagesite.txz: Not Found
Unable to update repository FreeBSD
Error updating repositories!

But perhaps there's some more cheerful advice than the obvious "managing a system remotely is certainly challenging, no?"
 
Looks like you're out of luck, it seems the makefiles of this port make use of make(1) features that didn't exist back in FreeBSD 11.

What's the issue with just upgrading the base system first?
 
I'll give that a try, thanks! Hopefully I'll get an opportunity to access the system physically before someone does so in a more nefarious way.
 
Thanks, that worked for me, at least to get past the first error. For the sake of others, I used the file /usr/bin/make in the 12.4 bootonly ISO XZ. chown root:wheel and chmod 555 once in place.

Of course then it failed because pkg now uses a stripped-down libcurl and requires openssl > 1.0.2 in base - unfortunately it doesn't seem to have an option to use the up-to-date port version.

/tmp/usr/ports/ports-mgmt/pkg/work/pkg-1.20.9/external/curl/lib/vtls/openssl.c:3836:3: error: implicit declaration of function 'BIO_up_ref' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

What I did try was run it until failure then pushd /tmp/usr/ports/ports-mgmt/pkg/work/pkg-1.20.9/external/libcurl and edit the Makefile as so:
...
-I$(top_srcdir)/external/curl/lib \
- -I$(top_srcdir)/external/curl/include
+ -I$(top_srcdir)/external/curl/include \
+ -I/usr/local/include

include $(MK)/static-lib.mk
...

Then popd back to the ports dir and make it again and that worked, except then it failed at the final static linking phase. At that point I decided it was probably best to cut my losses and wait until I could move to a newer base system.
 
Back
Top