8000 build: pass -fcommon when building genisoimage by fanquake · Pull Request #19553 · bitcoin/bitcoin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

build: pass -fcommon when building genisoimage #19553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

fanquake
Copy link
Member
@fanquake fanquake commented Jul 19, 2020

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

[ 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, just pass -fcommon to preserve
the legacy GCC behaviour.

Noticed while testing #19530.

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.
@hebasto
Copy link
Member
hebasto commented Jul 19, 2020

Concept ACK. Why "draft"?

@fanquake fanquake marked this pull request as ready for review July 19, 2020 07:49
@fanquake
Copy link
Member Author

Concept ACK. Why "draft"?

Thanks. Just a miss-click.

Copy link
Member
@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

$ make native_cdrkit -C depends HOST=x86_64-apple-darwin16
...
Postprocessing native_cdrkit...
Caching native_cdrkit...
make: Leaving directory '/home/hebasto/bitcoin/depends'

@DrahtBot
Copy link
Contributor

Gitian builds

File commit 090d877
(master)
commit 5ba391e
(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...

@laanwj
Copy link
Member
laanwj commented Jul 22, 2020

ACK 2a701a1
Seems like a good workaround until genisoimage is patched itself.

@laanwj laanwj merged commit c7b4968 into bitcoin:master Jul 22, 2020
@fanquake fanquake deleted the retain_fno_common_genisoimage branch July 22, 2020 12:02
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 24, 2020
2a701a1 build: pass -fcommon when building genisoimage (fanquake)

Pull request description:

  Starting with the 10.1 release, GCC [defaults to -fno-common](https://gcc.gnu.org/gcc-10/porting_to.html). 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, just pass -fcommon to preserve
  the legacy GCC behaviour.

  Noticed [while testing bitcoin#19530](bitcoin#19530 (comment)).

ACKs for top commit:
  laanwj:
    ACK 2a701a1
  hebasto:
    ACK 2a701a1, tested on Fedora 32 (x86_64, GCC 10.1.1):

Tree-SHA512: 0e6dd1b4c7c3f5b6997616da27a7ea54f757c81677766ee6813c776356527787a32b959f834e699fee9798553b13bcb142469f442c5e7a04f810f2c06e3a9505
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Aug 24, 2020
Summary:
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.

Backport of core [[bitcoin/bitcoin#19553 | PR19553]].
Fixes the OSX depends build on Arch.

Test Plan:
  cd depends
  make build-osx

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D7238
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0