swift-corelibs-dev build-script with --foundation is not working for me

Hi,

a couple of days ago i ran into swift on linux. The whole thing makes so much sense for us. Developing our tools in swift could be a huge benefit. I am excited to get deeper into swift for linux.

I build swift on Ubuntu successfully (without errors) from scratch with this options:

./utils/build-script --release --foundation --verbose-build --build-stdlib-deployment-targets all -l -b -p --skip-test-linux --build-swift-static-stdlib --build-swift-static-sdk-overlay --xctest -c

My goal is to have Foundation in static compiled binaries.
As mentioned everything in the build process works fine, but the execution of a simple script as shown below failed.

import Foundation

print("Hello Swift.")
I get the following error:
/bin/swiftc /home/hello.swift -o /home/hello
/home/hello.swift:1:8: error: no such module 'Foundation'
How to build Swift with the current state of foundation?
Can you please give me a little kick into the right direction? The web is not very useful in this early state, but i am really want to get into it.

Thanks a lot,
Kris

Currently swift-corelibs-foundation only builds as a dynamic library. I wonder if the option —build-swift-static-stdlib is causing issue with that.

···

On Jan 26, 2017, at 12:57 AM, Kris Simon via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Hi,

a couple of days ago i ran into swift on linux. The whole thing makes so much sense for us. Developing our tools in swift could be a huge benefit. I am excited to get deeper into swift for linux.

I build swift on Ubuntu successfully (without errors) from scratch with this options:

./utils/build-script --release --foundation --verbose-build --build-stdlib-deployment-targets all -l -b -p --skip-test-linux --build-swift-static-stdlib --build-swift-static-sdk-overlay --xctest -c

My goal is to have Foundation in static compiled binaries.
As mentioned everything in the build process works fine, but the execution of a simple script as shown below failed.

import Foundation

print("Hello Swift.")
I get the following error:
/bin/swiftc /home/hello.swift -o /home/hello
/home/hello.swift:1:8: error: no such module 'Foundation'
How to build Swift with the current state of foundation?
Can you please give me a little kick into the right direction? The web is not very useful in this early state, but i am really want to get into it.

Thanks a lot,
Kris
_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

Hi Philippe,

thanks a lot for your reply. Does this mean that i always need the swift runtime on the target linux machine?
We tried a code without Foundation and get stuck with libi18n.so.55 that is not available in that version on our target.

Can you mention some resources to get deeper into the linux possibilities fpr swift coding. I dig araound for a couple of days and for me it seams that it is not very useful if i need swift on every (only) Ubuntu distribution. Maybe i get something wrong here.
I miss a list of do's and dont's. what is possible and what not. How to deploy an application to other hosts, ect.

Is there some useful info around the web that I misse?

Thanks a lot,
kris.

···

On 26 Jan 2017, at 17:44, Philippe Hausler via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:

Currently swift-corelibs-foundation only builds as a dynamic library. I wonder if the option —build-swift-static-stdlib is causing issue with that.

On Jan 26, 2017, at 12:57 AM, Kris Simon via swift-corelibs-dev <swift-corelibs-dev@swift.org <mailto:swift-corelibs-dev@swift.org>> wrote:

Hi,

a couple of days ago i ran into swift on linux. The whole thing makes so much sense for us. Developing our tools in swift could be a huge benefit. I am excited to get deeper into swift for linux.

I build swift on Ubuntu successfully (without errors) from scratch with this options:

./utils/build-script --release --foundation --verbose-build --build-stdlib-deployment-targets all -l -b -p --skip-test-linux --build-swift-static-stdlib --build-swift-static-sdk-overlay --xctest -c

My goal is to have Foundation in static compiled binaries.
As mentioned everything in the build process works fine, but the execution of a simple script as shown below failed.

import Foundation

print("Hello Swift.")
I get the following error:
/bin/swiftc /home/hello.swift -o /home/hello
/home/hello.swift:1:8: error: no such module 'Foundation'
How to build Swift with the current state of foundation?
Can you please give me a little kick into the right direction? The web is not very useful in this early state, but i am really want to get into it.

Thanks a lot,
Kris
_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org <mailto:swift-corelibs-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev

_______________________________________________
swift-corelibs-dev mailing list
swift-corelibs-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev