Page MenuHomePhabricator

[cmake] Use the protobuf supplied cmake file instead of the cmake supplied one
ClosedPublic

Authored by Fabien on Jul 11 2023, 21:14.

Details

Summary

The cmake one needs to be updated for each version of protobuf that impacts the file generation or dependencies, which can cause discrepeancies. It actually happens on ArchLinux where the latest cmake (3.26) is unable to properly use the latest protobuf (23.4).

This diff uses the protobuf config file instead and its API, which despite being a bit less convenient to use will remain supported and works as well with the cmake supplied package file, so we can keep using it as a backup.

Test Plan
ninja all check-bitcoin-qt

Run all the cross compilation builds and the gitian builds as well.
Check it fixes the Qt build on ArchLinux.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

@bot build-linux64 build-linux-aarch64 build-linux-arm build-osx build-win64 gitian-linux gitian-osx gitian-win

Fabien published this revision for review.Jul 11 2023, 21:45

Tail of the build log:

ELF	    7f2852564000-    7f285258a000	Deferred        shcore<elf>
  \-PE	    7f2852570000-    7f285258a000	\               shcore
ELF	    7f285258a000-    7f28525a1000	Deferred        version<elf>
  \-PE	    7f2852590000-    7f28525a1000	\               version
ELF	    7f28525a1000-    7f285275a000	Deferred        gdi32<elf>
  \-PE	    7f28525c0000-    7f285275a000	\               gdi32
ELF	    7f285275a000-    7f28529f2000	Deferred        user32<elf>
  \-PE	    7f2852780000-    7f28529f2000	\               user32
ELF	    7f28529f2000-    7f2852a56000	Deferred        shlwapi<elf>
  \-PE	    7f2852a00000-    7f2852a56000	\               shlwapi
ELF	    7f2852a56000-    7f285348f000	Deferred        shell32<elf>
  \-PE	    7f2852a70000-    7f285348f000	\               shell32
ELF	    7f285348f000-    7f2853581000	Deferred        msvcrt<elf>
  \-PE	    7f28534b0000-    7f2853581000	\               msvcrt
ELF	    7f2853581000-    7f28535b5000	Deferred        iphlpapi<elf>
  \-PE	    7f2853590000-    7f28535b5000	\               iphlpapi
ELF	    7f28535b5000-    7f28535dd000	Deferred        bcrypt<elf>
  \-PE	    7f28535c0000-    7f28535dd000	\               bcrypt
ELF	    7f28536dd000-    7f2853779000	Deferred        advapi32<elf>
  \-PE	    7f28536f0000-    7f2853779000	\               advapi32
ELF	    7f2853779000-    7f285378d000	Deferred        libnss_files.so.2
ELF	    7f28539f7000-    7f2853a1f000	Deferred        liblzma.so.5
ELF	    7f2853a1f000-    7f2853a39000	Deferred        libgcc_s.so.1
ELF	    7f2853a39000-    7f2853b7d000	Deferred        libm.so.6
ELF	    7f2853b7d000-    7f2853b98000	Deferred        libunwind.so.8
ELF	    7f2853b9a000-    7f2853ba0000	Deferred        libdl.so.2
ELF	    7f2853ba0000-    7f2853d74000	Deferred        libc.so.6
ELF	    7f2853d74000-    7f2853d96000	Deferred        libpthread.so.0
ELF	    7f2853d98000-    7f2853da4000	Deferred        libffi.so.7
ELF	    7f2853f50000-    7f2853f7d000	Deferred        ld-linux-x86-64.so.2
Threads:
process  tid      prio (all id:s are in hex)
0000000c services.exe
	0000000d    0
	0000000e    0
	00000020    0
	0000002e    0
00000011 explorer.exe
	00000012    0
0000001e winedevice.exe
	0000001f    0
	00000021    0
	00000022    0
0000002c winedevice.exe
	0000002d    0
	0000002f    0
	00000030    0
	00000031    0
	00000032    0
00000033 (D) Z:\results\artifacts\bin\test_bitcoin.exe
	00000034    0
	000000e7    0 <==
	000000e8    0
System information:
    Wine build: wine-5.0.3 (Debian 5.0.3-3)
    Platform: x86_64
    Version: Windows 7
    Host system: Linux
    Host version: 4.19.0-10-amd64
Build build-win64 failed with exit code 5

@bot build-linux64 build-linux-aarch64 build-linux-arm build-osx build-win64 gitian-linux gitian-osx gitian-win

Run all the cross compilation builds and the gitian builds as well.

Is that what this has done?

Check it fixes the Qt build on ArchLinux.

Is this also included with the above bot tests or is this done separately?

@bot build-linux64 build-linux-aarch64 build-linux-arm build-osx build-win64 gitian-linux gitian-osx gitian-win

Run all the cross compilation builds and the gitian builds as well.

Is that what this has done?

Yes. Note that the windows failure is unrelated, the build succeeded but the tests failed to run due to a known/occasional wine error.

Check it fixes the Qt build on ArchLinux.

Is this also included with the above bot tests or is this done separately?

I did it on my own machine, but you can see the failure on Teamcity (the archlinux bitcoin-abc-qt package failed to build).

PiRK added a subscriber: PiRK.

The new guix build failure happening with this change is likely a problem with the guix scripts (missing packages for protobuf?), related to the existing issue of the guix build using native-protobuf instead of the cross-compiled one. I don't think it should block this diff.

This revision is now accepted and ready to land.Jul 12 2023, 11:43