Comments (10)
cc: @ddunbar
from swift-llbuild.
I haven't tried the docker test, but I tried this locally with your launch.swift and it works.
I suspect the problem you are hitting is related to the opening of the database. Will swift-build-tool have permissions to open .atllbuild/build.db?
from swift-llbuild.
Oh, actually that wouldn't explain why the same swift-build-tool invocation works inside the container. I verified I can repro w/ your docker container, investigating...
from swift-llbuild.
The problem is in your launch.swift, it has the wrong path to swift-build-tool, which is at /usr/local/bin, not /usr/bin.
If you fix that then you will get further (link still fails, probably because container doesn't have /usr/bin/clang++ I would guess?)
from swift-llbuild.
Updating path in reproduction case to /usr/local/bin.
clang++ is installed; and can link programs, otherwise this would never work. In reality this always works, except when NSTask spawned the process.
I don't know why the linker fails in this situation; that is the bug.
I have also tested if we can do NSTask->shell->sbt->linker, and the answer appears to be that any use of NSTask will break the linker. I have no theories for why that is so; the obvious candidates like environment variables (even if NSTask tries to break them) would be restored by the shell.
I am currently working around successfully with the POSIX "system(3)" call which is not affected by this issue.
from swift-llbuild.
In this case the problem is simply that NSTask isn't preserving the environment, so PATH isn't propagated to subprocess by NSTask.
Going NSTask -> shell works for me, but you have to remember to use "sh -l" to cause the environment to be reinitialized.
/cc @parkera
from swift-llbuild.
Thanks for tracking that down. Philippe, maybe you can take a look at this one?
from swift-llbuild.
Hmm looks like we don't do anything with the env but pass nil. Seems like an easy fix.
from swift-llbuild.
I pushed a change that should resolve this: apple/swift-corelibs-foundation@b3637a7
It would be good if this could be verified that the environment passing is correct. I did not get a chance yet to try it out with docker.
from swift-llbuild.
Needs verification
from swift-llbuild.
Related Issues (20)
- [SR-13897] Can't build swift-llbuild2 with development Swift toolchain HOT 2
- [SR-13472] Create a Jenkins CI job to run the llbuild tests under ASan/TSan HOT 2
- [SR-13406] llbuild/unittests/Basic/LaneBasedExecutionQueueTest.cpp is not included for linux testing
- [SR-11730] [llbuild] Improve GraphViz as export format option to llbuild-analyze HOT 9
- [SR-11729] [llbuild] Add Chromium Tracing as export format option to llbuild-analyze
- [SR-11437] Latest llbuild Package.swift causes resolution errors in SwiftPM & sourcekit-lsp HOT 5
- [SR-9735] Ninja build to nonexistent subdirectories fails HOT 1
- [SR-8527] llbuild-ui doesn't load db with build.db produced by Xcode10b5
- [SR-8018] llbuild fails to build with SwiftPM because of the DEBUG define
- [SR-7447] llbuild/BuildSystem/BuildSystem.h:207:21: error: no type named 'vector' in namespace 'std' HOT 2
- [SR-7323] SPM can't handle spaces in path to Xcode HOT 2
- LLBuild tests suite failing on Ubuntu 22.04 with Python 3.10
- FB11020478 - Xcode 14 incremental builds are all serial HOT 6
- Overriding Xcode's llbuild with a custom llbuild binary HOT 1
- `llbuildSwift` fails to build with SwiftPM release configuration on Windows x86_64 HOT 5
- llbuild fails to build with _FORTIFY_SOURCE=2
- llbuild cannot build cmake projects ('|' operator not supported)
- [Xcode 15.1 Beta 2] Two tests failed due to "database is locked Possibly there are two concurrent builds running in the same filesystem location" HOT 4
- llbuild: 'sqlite3.h' file not found HOT 5
- Turning off whole-module optimization not (fully) supported?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swift-llbuild.