Skip to content

Conversation

MaxDesiatov
Copy link

@MaxDesiatov MaxDesiatov commented Apr 27, 2022

Currently, as can be seen from logs at https://github.com/swiftwasm/swift/runs/6178363121?check_suite_focus=true compilation of Yams 5.0.0 fails with this error:

/home/runner/work/swift/swift/yams/Sources/Yams/YamlError.swift  -Xlinker -soname -Xlinker libYams.so  -L /home/runner/work/swift/swift/host-build/Ninja-Release/swiftpm-linux-x86_64/x86_64-unknown-linux-gnu/yams/lib  -L /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib   -L /usr/lib/gcc/x86_64-linux-gnu/7 -Xlinker -rpath -Xlinker /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib:  lib/libCYaml.a  -ldispatch  /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib/libFoundation.so  -lswiftDispatch  -lgcc  -lgcc_s  -lc  -lgcc  -lgcc_s && :
/usr/bin/ld.gold: error: lib/libCYaml.a(api.c.o): requires dynamic R_X86_64_PC32 reloc against 'yaml_realloc' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: lib/libCYaml.a(scanner.c.o): requires dynamic R_X86_64_PC32 reloc against 'yaml_parser_fetch_more_tokens' which may overflow at runtime; recompile with -fPIC
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

Currently, as can be seen from logs at https://github.com/swiftwasm/swift/runs/6178363121?check_suite_focus=true compilation of Yams fails with this error:

```
/home/runner/work/swift/swift/yams/Sources/Yams/YamlError.swift  -Xlinker -soname -Xlinker libYams.so  -L /home/runner/work/swift/swift/host-build/Ninja-Release/swiftpm-linux-x86_64/x86_64-unknown-linux-gnu/yams/lib  -L /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib   -L /usr/lib/gcc/x86_64-linux-gnu/7 -Xlinker -rpath -Xlinker /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib:  lib/libCYaml.a  -ldispatch  /home/runner/work/swift/swift/host-build/Ninja-Release/foundation-linux-x86_64/lib/libFoundation.so  -lswiftDispatch  -lgcc  -lgcc_s  -lc  -lgcc  -lgcc_s && :
23585
/usr/bin/ld.gold: error: lib/libCYaml.a(api.c.o): requires dynamic R_X86_64_PC32 reloc against 'yaml_realloc' which may overflow at runtime; recompile with -fPIC
23586
/usr/bin/ld.gold: error: lib/libCYaml.a(scanner.c.o): requires dynamic R_X86_64_PC32 reloc against 'yaml_parser_fetch_more_tokens' which may overflow at runtime; recompile with -fPIC
23587
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
23588
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
```
@MaxDesiatov MaxDesiatov added the release Issues with the release version label Apr 27, 2022
@MaxDesiatov MaxDesiatov marked this pull request as ready for review April 27, 2022 19:02
@MaxDesiatov MaxDesiatov requested a review from a team April 27, 2022 19:02
@kateinoigakukun
Copy link
Member

kateinoigakukun commented Apr 28, 2022

Have you investigated what change in Yams triggers the linking failure? Does it include something wrong since 4.0.3?

@MaxDesiatov
Copy link
Author

Not yet, but this is on my list. LMK if you'd like to keep this open and resolve the issues in upstream Yams, or if merging this as a temporary fix is fine too.

@kateinoigakukun
Copy link
Member

OK, I've investigated and fixed the issue: jpsim/Yams#353
It seems Yams 5.0.0 doesn't include any breaking change except for the base Swift version requirement, so it's ok for now to downgrade it. The issue happens from 5.0.0, so we can use 4.0.6.

@kateinoigakukun
Copy link
Member

The PR has been merged just now 😮 It would be better to wait for the new release.

@kateinoigakukun
Copy link
Member

5.0.1 has been released

@MaxDesiatov MaxDesiatov changed the title Use Yams 4.0.2 to fix Ubuntu 18.04 build Use Yams 5.0.1 to fix Ubuntu 18.04 build Apr 28, 2022
@MaxDesiatov
Copy link
Author

Ubuntu CI passes now, ready for review

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) April 28, 2022 21:23
@MaxDesiatov MaxDesiatov merged commit fda8388 into swiftwasm-release/5.7 Apr 28, 2022
@MaxDesiatov MaxDesiatov deleted the maxd/fix-5.7-ubuntu-18.04 branch May 3, 2022 19:42
kateinoigakukun added a commit that referenced this pull request Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release Issues with the release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants