build: pass -fcommon when building genisoimage #19553

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:retain_fno_common_genisoimage changing 1 files +3 −1
  1. fanquake commented at 7:26 am on July 19, 2020: member

    Starting with the 10.1 release, GCC defaults to -fno-common. This causes linking issues when building genisoimage:

    0[ 98%] Building C object genisoimage/CMakeFiles/genisoimage.dir/checksum.o
    1[100%] Linking C executable genisoimage
    2/usr/bin/ld: CMakeFiles/genisoimage.dir/apple.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    3/usr/bin/ld: CMakeFiles/genisoimage.dir/boot.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    4/usr/bin/ld: CMakeFiles/genisoimage.dir/desktop.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    5/usr/bin/ld: CMakeFiles/genisoimage.dir/dvd_file.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    

    Rather than patching genisoimage further, just pass -fcommon to preserve the legacy GCC behaviour.

    Noticed [while testing #19530](/bitcoin-bitcoin/19530/#issuecomment-659802512).

  2. build: pass -fcommon when building genisoimage
    Starting with the 10.1 release, GCC defaults to -fno-common. This causes
    linking issues when building genisoimage:
    ```bash
    [ 98%] Building C object genisoimage/CMakeFiles/genisoimage.dir/checksum.o
    [100%] Linking C executable genisoimage
    /usr/bin/ld: CMakeFiles/genisoimage.dir/apple.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/genisoimage.dir/boot.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/genisoimage.dir/desktop.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    /usr/bin/ld: CMakeFiles/genisoimage.dir/dvd_file.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
    ```
    
    Rather than patching genisoimage further, pass -fcommon to preserve the
    legacy GCC behaviour.
    2a701a1c42
  3. fanquake added the label Build system on Jul 19, 2020
  4. fanquake added the label Needs gitian build on Jul 19, 2020
  5. hebasto commented at 7:43 am on July 19, 2020: member
    Concept ACK. Why “draft”?
  6. fanquake marked this as ready for review on Jul 19, 2020
  7. fanquake commented at 7:50 am on July 19, 2020: member

    Concept ACK. Why “draft”?

    Thanks. Just a miss-click.

  8. hebasto approved
  9. hebasto commented at 8:51 am on July 19, 2020: member

    ACK 2a701a1c42c37e48aae70156692aa08aaae11088, tested on Fedora 32 (x86_64, GCC 10.1.1):

    0$ make native_cdrkit -C depends HOST=x86_64-apple-darwin16
    1...
    2Postprocessing native_cdrkit...
    3Caching native_cdrkit...
    4make: Leaving directory '/home/hebasto/bitcoin/depends'
    
  10. DrahtBot commented at 1:12 am on July 20, 2020: member

    Gitian builds

    File commit 090d87716074434bdc6c7656ec44d049197a793a(master) commit 5ba391e5aa8b87d68016c868027c5b53c9cacbf7(master and this pull)
    *-aarch64-linux-gnu-debug.tar.gz d542e22253bfbc5d... 6fb3ac58db294cbe...
    *-aarch64-linux-gnu.tar.gz 193f58337d630a9c... 0444d0531d743585...
    *-arm-linux-gnueabihf-debug.tar.gz 0ffc76e652e16ac5... 7417ec81ce443725...
    *-arm-linux-gnueabihf.tar.gz bb43d47acca847f7... 3182bba48fb3b9f5...
    *-osx-unsigned.dmg be93c37f3bff1d45... b34f4d4c93d82882...
    *-osx64.tar.gz 38dfd8bfad69a3e1... fb05e5e660eb5db3...
    *-riscv64-linux-gnu-debug.tar.gz a185ee98495b744a... d192c23dbbaceef6...
    *-riscv64-linux-gnu.tar.gz 6ea6406aecfaa475... 45d3e21d5fc1841f...
    *-win64-debug.zip deffde68d2da8e5a... af1f15230e826f9b...
    *-win64-setup-unsigned.exe e67f248b865c0957... 98ee96255171dfb3...
    *-win64.zip 4c2819466e396e52... cd7e9f78d0f10099...
    *-x86_64-linux-gnu-debug.tar.gz c68ff2e826ebf8d0... bd6c87498d66eced...
    *-x86_64-linux-gnu.tar.gz 1ca73f48f2e0e75c... ceba69d7fa0c8ecd...
    *.tar.gz 4cde889986ffeb0a... 130115ad4e02a4b4...
    bitcoin-core-linux-0.21-res.yml f0ae4d66be885a50... 53157a2a4b4c46f7...
    bitcoin-core-osx-0.21-res.yml f7be4db59b1fd9fe... f3a3e7e576182d30...
    bitcoin-core-win-0.21-res.yml f49122cdfcdb24c0... da56b0c4b7ae6ae0...
    linux-build.log e4e7f05255872344... fdecde5c672769b9...
    osx-build.log da95930bfb852c4f... 751aea356764ad51...
    win-build.log 803468cf5cd4ac02... 58d156b16ee26101...
    bitcoin-core-linux-0.21-res.yml.diff 02ead0480302321e...
    bitcoin-core-osx-0.21-res.yml.diff eb91b00a488c109c...
    bitcoin-core-win-0.21-res.yml.diff 6d7bf5df0ddd4810...
    linux-build.log.diff 95be5bdd6b3e2290...
    osx-build.log.diff cbb3256e16fdec65...
    win-build.log.diff e8b3d98dce7af700...
  11. DrahtBot removed the label Needs gitian build on Jul 20, 2020
  12. laanwj commented at 11:53 am on July 22, 2020: member
    ACK 2a701a1c42c37e48aae70156692aa08aaae11088 Seems like a good workaround until genisoimage is patched itself.
  13. laanwj merged this on Jul 22, 2020
  14. laanwj closed this on Jul 22, 2020

  15. fanquake deleted the branch on Jul 22, 2020
  16. sidhujag referenced this in commit 72a7a0e88b on Jul 24, 2020
  17. deadalnix referenced this in commit 5da31f57d8 on Aug 24, 2020
  18. DrahtBot locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me