Score:0

Can't compile GDAL 3.2 on CentOS/RedHat 8

ca flag

I've been trying to compile GDAL 3.2 on CentOS 8 (due to a java project requiring gdal bindings that should be provided by gdal32-java), however rpmbuild fails right at the start before I make any change:

$ rpmbuild --rebuild ../gdal32-3.2.3-1.rhel8.src.rpm
Installing ../gdal32-3.2.3-1.rhel8.src.rpm
error: line 23: Unknown tag: %pgdg_set_gis_variables

Note that the source RPM is from the pgdg-source-common repository provided by postgres at https://download.postgresql.org/pub/repos/yum/srpms/common/redhat/rhel-8-x86_64. All dependencies required by the spec file are installed.

The tag %pgdg_set_gis_variables in gdal32.spec appears only once (at the line where an error is reported) and seems to initialize some global variables used to retrieve other files/resolve dependencies.

By unpacking the file into SOURCES and commenting-out this tag - as well as manually setting the expected values that I see unused, I could get rpmbuild -ba SOURCES/gdal32.spec, however it fails at configure, presumably due to missing values that should have been set by %pgdg_set_gis_variables (+ In this case, I get an error that shows that there is an attempt to expand the tag despite its being commented-out).

Do you know where I could find a sample that provides this tag/How I could build this RPM ?

Michael Hampton avatar
cz flag
It's a macro, not a tag. This may explain why you had trouble searching about it.
Score:1
cz flag

You need to install the package pgdg-srpm-macros from the PGDG repository to provide their custom RPM macros.

cg_foreau avatar
ca flag
Thank you. Since posting the question, I did get the spec file to work by installing several postgres rpms but I could not figure out why it made it work. I will try this to minimize the dependencies and install this package in a few days when i can get back this problem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.