Navigation Menu

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-60] exit status 127 when compiling a C dependency #818

Closed
harlanhaskins opened this issue Dec 4, 2015 · 7 comments
Closed

[SR-60] exit status 127 when compiling a C dependency #818

harlanhaskins opened this issue Dec 4, 2015 · 7 comments
Assignees

Comments

@harlanhaskins
Copy link
Collaborator

Previous ID SR-60
Radar None
Original Reporter @harlanhaskins
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s llbuild
Labels Bug
Assignee @ddunbar
Priority Medium

md5: a9392c86279ac6b5993728f91ac4a1a8

relates to:

  • SR-81 Cant Build Hello World on Ubuntu 14.04

Issue Description:

I looked through my system and it turns out the header doesn't resolve. swift-build-tool doesn't seem to have a sophisticated error handling routine for unresolved dependencies.

swift-build: exit(127): ["swift-build-tool", "-v", "-f", "/users/u21/harlan/swiftpq-example/.build/debug/CLibPQ.o/llbuild.yaml"]

@ddunbar
Copy link
Member

ddunbar commented Dec 5, 2015

Yes, swift-build-tool is still missing a lot of diagnostics in cases like this.

Can you make a self contained example that demonstrates this issue? If I try the attached example I just get:

$ swift build
Cloning Packages/CLibPQ
Compiling Swift Module 'swiftpqexample2' (1 sources)
/Volumes/Data/ddunbar/Downloads/swiftpq-example-2/Packages/CLibPQ-1.0.0/module.modulemap:2:12: error: header '/usr/local/include/libpq-fe.h' not found
    header "/usr/local/include/libpq-fe.h"
           ^
/Volumes/Data/ddunbar/Downloads/swiftpq-example-2/main.swift:1:8: error: could not build Objective-C module 'CLibPQ'
import CLibPQ
       ^
<unknown>:0: error: build had 1 command failures
swift-build: exit(1): ["/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swift-build-tool", "-f", "/Volumes/Data/ddunbar/Downloads/swiftpq-example-2/.build/debug/swiftpq-example-2.o/llbuild.yaml"]

and I would rather not try and install system dependencies just to reproduce this bug.

@harlanhaskins
Copy link
Collaborator Author

So, I've actually only been able to reproduce this on Ubuntu 14.04 with the dependency explicitly not available.

@ddunbar
Copy link
Member

ddunbar commented Dec 5, 2015

Can you include the output of

$ strace swift-build-tool -v -f /users/u21/harlan/swiftpq-example/.build/debug/CLibPQ.o/llbuild.yaml

@harlanhaskins
Copy link
Collaborator Author

I actually don't have sudo access on that box, and strace needs it...

@harlanhaskins
Copy link
Collaborator Author

However I can also reproduce it using this package punctual.tar

@colemancda
Copy link

Similar issue in SR-81

@Dante-Broggi
Copy link

Has this been resolved? If so, it should be marked as such.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants