Skip to content

Fix compatibility with current GNU Make#4929

Open
adamnovak wants to merge 21 commits into
masterfrom
fix-new-make
Open

Fix compatibility with current GNU Make#4929
adamnovak wants to merge 21 commits into
masterfrom
fix-new-make

Conversation

@adamnovak

Copy link
Copy Markdown
Member

Changelog Entry

To be copied to the draft changelog by merger:

  • vg now builds with GNU Make 4.4.1, as on Ubuntu 26.04

Description

GNU Make removed the hack we were using to run a rule at Makefile startup (claiming that it would generate an include-able Makefile fragment, marking it .PHONY so it would always run, and telling Make not to complain if the file to be included didn't exist). It's not mentioned in the project's NEWS file, but it happened between 4.3 and 4.4.1.

This converts half of that target to $(shell ) calls (the half that needs a bunch of Make-level variables), and the other half to a shell script (the half where we need to enforce success).

@adamnovak adamnovak changed the title Fix compatibility with Ubuntu 26.04 and current GNU Make Fix compatibility with current GNU Make Jun 11, 2026
@adamnovak

Copy link
Copy Markdown
Member Author

This still doesn't fix 26.04, because the compiler there doesn't like something in libelf:

riscv_disasm.c: In function 'riscv_disasm':
riscv_disasm.c:1259:46: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
 1259 |                   struct known_csrs *found = bsearch (&key, known,
      |                                              ^~~~~~~

@adamnovak

Copy link
Copy Markdown
Member Author

This will need vgteam/structures#15 and vgteam/libbdsg#242

@adamnovak

Copy link
Copy Markdown
Member Author

I don't think we'll be able to get the Docker build logs from CI without fixing or working around greg7mdp/sparsepp#98.

When I run the Docker build locally on my Mac I get a complaint at the final link step that there's something wring with libvcfh.a:

3.971 /usr/bin/aarch64-linux-gnu-ld.bfd: /vg/lib/libvcfh.a: error adding symbols: archive has no index; run ranlib to add one
3.990 collect2: error: ld returned 1 exit status
3.990 make: *** [Makefile:551: lib/vg_is_static] Error 1

This happens even if I stick a ranlib call into the command used to build it.

@adamnovak

adamnovak commented Jun 12, 2026

Copy link
Copy Markdown
Member Author

If we want the Docker to ship a static binary, which we pull out and use for our static ARM release and for putting in a new, smaller Docker container, then we can't upgrade past 22.04 until https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104888 is fixed and shipped in an Ubuntu release, since in 24.04 and on Ubuntu no longer packages a libcairo.a anywhere.

Or else we need to pull in Cairo as a submodule or otherwise provide a source build of Cairo for the Docker container.

@adamnovak

Copy link
Copy Markdown
Member Author

OK I have no idea why the docs build job can't find vgteam/libbdsg@5429995 which is merged in over there. And it looks like the updated libelf is not happy back on 22.04?

I will have to come back to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant