Penguin, small TECH.BARWICK.DE
Development
 

Recent posts

Categories

Archive

Syndication

 



Powered By

Info

Development

Notes and stuff related to software development.

Ran into an error like the following when trying to build etcd as a CentOS 7 package:

go: github.com/prometheus/client_golang@v1.0.0 requires
	github.com/prometheus/common@v0.4.1 requires
	github.com/prometheus/procfs@v0.0.0-20181005140218-185b4288413d: invalid version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/0ab7c7bc964e6f4054247fed3ac8d636309918420efe8a7cabef12d9f9904311: exit status 128:
	fatal: git fetch-pack: expected shallow list

or sometimes this:

go: golang.org/x/crypto@v0.0.0-20200622213623-75b288015ac9 requires
	golang.org/x/net@v0.0.0-20190404232315-eb5bcb51f2a3 requires
	golang.org/x/crypto@v0.0.0-20190308221718-c2843e01d9a2: invalid version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/f72f7a6f267d2fe79b1e174efab21a591b07c84ef53364f65b8281fda7000b49: exit status 128:
	fatal: git fetch-pack: expected shallow list

The mysterious thing was, the build had previously completed without issue many times, and there were no obvious changes in any of the build elements involved.

This issue does resemble that described in golang GitHub issue #38373; the workaround suggested by the poster involves resolving version references in the go.mod file. However that did not seem feasible for this build, which indirectly pulls in a large number of golang modules from various git repositories, which would make tracking down any version reference issues a somewhat Herculean task.

It was however possible to resolve the error (as suggested in a comment on the issue) by upgrading the git package to a more recent one, as the default CentOS 7 version is a very dated 1.8.x (released in 2014 or earlier).

Recent git packages for CentOS 7 can be obtained from the Endpoint repository here: https://packages.endpoint.com/rhel/7/os/x86_64/.


Posted in Devel | add a comment

Monday, June 7, 2021   5:51 AM

ERROR: `fop' is missing on your system.

Ran into this error when trying to build the PostgreSQL documentation as a PDF file on CentOS 8:

$ make postgres-A4.pdf
/usr/bin/xmllint --path . --noout --valid postgres.sgml
/usr/bin/xsltproc --path . --stringparam pg.version '14beta1' --stringparam img.src.path './' --stringparam paper.type A4 -o postgres-A4.fo stylesheet-fo.xsl postgres.sgml
Making portrait pages on A4 paper (210mmx297mm)
/bin/sh ../../../config/missing fop -fo postgres-A4.fo -pdf postgres-A4.pdf
***
ERROR: `fop' is missing on your system.
***
make: *** [Makefile:178: postgres-A4.pdf] Error 1

As with many things, there doesn't appear to be a CentOS package for this (and given recent developments there might never be). However as fop is a Java-based tool, it's simple enough to install locally.

  1. Download the latest distribution from https://xmlgraphics.apache.org/fop/download.html
  2. create a directory (say ~/fop/)
  3. Extract the following files/directories from the downloard .tar.gz file to ~/fop/:
    1. fop
    2. build/
    3. lib/

Then ensure ~/fop/ is included in the PATH variable when performing any tasks where it is required.

Note: for the PostgreSQL documentation build, both the top-level source ./configure and make (in the doc/ directory) need to be run again so the build system detects the location of fop.

DISCLAIMER: there is probably a more elegant way of doing this, but the above sufficed for a quick workaround in the heat of the moment.


Posted in Devel | add a comment