https://bugzilla.redhat.com/show_bug.cgi?id=2223039
Bug ID: 2223039 Summary: Something is preventing unicorn from building on s390x Product: Fedora Version: rawhide OS: Linux Status: NEW Component: unicorn Severity: medium Assignee: redhat@flyn.org Reporter: mike@flyn.org QA Contact: extras-qa@fedoraproject.org CC: epel-packagers-sig@lists.fedoraproject.org, mail@fabian-affolter.ch, redhat@flyn.org Target Milestone: --- Classification: Fedora
Building unicorn on Fedora's s390x build hosts fails with the error message below. I suspect this is due to a compiler change or perhaps a change to a dependency.
Reproducible: Always
Steps to Reproduce: Run "fedpkg build" from the package's Git repository. Actual Results: See https://kojipkgs.fedoraproject.org//work/tasks/8545/103368545/build.log.
Here is a summary:
/usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_ldo_le_mmu_ppc64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_ldo_be_mmu_ppc64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_cmpxchgo_le_mmu_aarch64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_cmpxchgo_be_mmu_aarch64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_sto_be_mmu_s390x' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_ldo_be_mmu_s390x' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_cmpxchgo_be_mmu_s390x' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_cmpxchgo_be_mmu_ppc64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_sto_be_mmu_ppc64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_cmpxchgo_le_mmu_ppc64' /usr/bin/ld: libunicorn.so.2: undefined reference to `helper_atomic_sto_le_mmu_ppc64' collect2: error: ld returned 1 exit status gmake[2]: *** [CMakeFiles/sample_batch_reg.dir/build.make:98: sample_batch_reg] Error 1 gmake[1]: *** [CMakeFiles/Makefile2:779: CMakeFiles/sample_batch_reg.dir/all] Error 2
A similar report upstream: https://github.com/unicorn-engine/unicorn/issues/1840
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
W. Michael Petullo mike@flyn.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #2 from W. Michael Petullo mike@flyn.org --- I disabled the s390x build for now. Ubuntu's package seems to build:
https://packages.ubuntu.com/mantic/libunicorn-dev
I am not yet sure what is causing the problem here.
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
--- Comment #3 from Dan Horák dan@danny.cz --- The problems is missing linking with libatomic. It has been fixed upstream if I see right, please see commits from Dec 28 2023 in the "staged" tree.
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
--- Comment #4 from W. Michael Petullo mike@flyn.org --- I applied the following, and the build still failed:
# These are from the staging branch, and it fixes the build failure on s390x # (12/28/23). Commits: Patch0001: 2362-Add-latomic-for-arm-and-riscv64.patch # 55560a2474f68b1ffa77433361cf591784e28b50 Patch0002: 2363-Fix-typo.patch # f389666ea6eb653f040094ef9c7ee05479e23671 Patch0003: 2364-Add-latomic-to-samples-and-tests.patch # db0acd5ace38ea3d5cdb94c275e324b53d70bce0 Patch0004: 2365-Refine-latomic-fix.patch # e3163ccda178bca42d5a7d123ebd26acd76dae62 Patch0005: 2366-Reflect-in-pkg-config.patch # 60cf9eba40e1edbf49d4e9194c54bd8118b9d849 Patch0006: 2367-Also-add-atomic-to-samples-lib-linkage.patch # e5fa037aebd9c74355200aec8a0cc77f2a15675e
You can review the result at:
https://copr.fedorainfracloud.org/coprs/mikep/scratch/build/7255371/
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
--- Comment #5 from Dan Horák dan@danny.cz --- hmm, I will have a closer look then ...
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
--- Comment #6 from Dan Horák dan@danny.cz --- Interestingly it's problem of the rpm build. When building the upstream sources locally, it has no such problem. Looking further ...
https://bugzilla.redhat.com/show_bug.cgi?id=2223039
--- Comment #7 from Dan Horák dan@danny.cz --- IMO there is something wrong with how the rpm is built. First it builds unicorn, the lib, samples, etc. and all goes well. Then it goes for the python bindings and here the python script builds unicorn for the second time and things go bad. I believe the python bindings should just use the unicorn library built in the first step, probably via the prebuilt subdir and some symlinks. In the current rpms (for all arches) both unicorn and python3-unicorn rpms provide the libunicorn.so.2 file (the python3 subpackage even contains libunicorn.a). This sounds wrong ...
I suppose the "python" version of unicorn is built with some different cmake options (setup.py calls cmake) or something like that.
epel-packagers-sig@lists.fedoraproject.org