Skip to content
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

[SR-3219] swiftGlibc build order wrong(?) #45807

Closed
swift-ci opened this issue Nov 16, 2016 · 3 comments
Closed

[SR-3219] swiftGlibc build order wrong(?) #45807

swift-ci opened this issue Nov 16, 2016 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-3219
Radar None
Original Reporter willstanton1@yahoo.com (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Linux 4.4.30-32.54.amzn1.x86_64 #1 SMP Thu Nov 10 15:52:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, BuildScript
Assignee None
Priority Medium

md5: 8c3d5a13bc73ee07b8a58989dd877c62

Issue Description:

SwiftGlibc module is not generated when needed, sometimes?, causing build and build-script to stop.
1st occurrence for me, but https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20161107/003449.html encountered the issue recently and references other previous occurrences.

The error occurred on a clean build on AWS Linux like CentOS C++ 4.8 (in case it's regex related), cmake-3.6.3 (a couple days after an update from 3.6.2).

Calling `ninja make lib-swift-linux-x86_64-glibc.modulemap` after the error seemed to generate the SwiftGlibc module, allowing the build to proceed on re-invocation of the build script.
build.ninja attached, though I did tinker with it trying to solve the problem (possibly duplicating a build directive/target).

Build order may need to be verified.

The error encountered was (reproduced after failure of build-script):
[1/51] Compiling /home/ec2-user/swift/...b/public/Platform/linux/x86_64/Glibc.o
FAILED: stdlib/public/Platform/linux/x86_64/Glibc.o
cd /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform && /home/ec2-user/swift/swift/utils/line-directive /home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift /home/ec2-user/swift/swift/stdlib/public/Platform/Platform.swift /home/ec2-user/swift/swift/stdlib/public/Platform/TiocConstants.swift /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/8/tgmath.swift – /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/./bin/swiftc -c -sdk / -target x86_64-unknown-linux-gnu -resource-dir /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift -O -D INTERNAL_CHECKS_ENABLED -I /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/./lib/swift/linux/x86_64 -module-cache-path /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/./module-cache -no-link-objc-runtime -autolink-force-load -module-link-name swiftGlibc -force-single-frontend-invocation -parse-as-library -o /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/linux/x86_64/Glibc.o /home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift /home/ec2-user/swift/swift/stdlib/public/Platform/Platform.swift /home/ec2-user/swift/swift/stdlib/public/Platform/TiocConstants.swift /home/ec2-user/swift/build/Ninja-ReleaseAssert/swift-linux-x86_64/stdlib/public/Platform/8/tgmath.swift
/home/ec2-user/swift/swift/stdlib/public/Platform/Glibc.swift:13:19: error: no such module 'SwiftGlibc'
@_exported import SwiftGlibc // Clang module
^

@rintaro
Copy link
Mannequin

rintaro mannequin commented Nov 17, 2016

#5821
willstanton1@yahoo.com (JIRA User) While waiting for approval, could you try this patch?

@swift-ci
Copy link
Collaborator Author

Comment by W S (JIRA)

@rintaro Hoping to try within 24 hrs; thanks for taking a look!

@swift-ci
Copy link
Collaborator Author

Comment by Umberto Raimondi (JIRA)

Just to leave this documented somewhere, i got the same error compiling Swift on Raspbian Nov16 on a ARMv6 Raspberry1, so this could still be an issue sometime.

Running the same command suggested by W.S., that is now `ninja swiftGlibc-linux-armv6-static`, (from build/Ninja-ReleaseAssert/swift-linux-armv6/stdlib/public/Platform ) helped to get past that error and libswiftGlibc.so is where it should be now.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. build-script Area → utils: The build script
Projects
None yet
Development

No branches or pull requests

1 participant