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-151] Stdlib not being linked on swift build #42773

Closed
swift-ci opened this issue Dec 9, 2015 · 34 comments
Closed

[SR-151] Stdlib not being linked on swift build #42773

swift-ci opened this issue Dec 9, 2015 · 34 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Dec 9, 2015

Previous ID SR-151
Radar None
Original Reporter kiliankoe (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment
  • OS X 10.11.1

  • Apple Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f829) Target: x86_64-apple-macosx10.9.

Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee @ddunbar
Priority Medium

md5: f9e35afc3998fdc2ff1af4f08db14241

Issue Description:

Hi,

as pushed over swift-users@ previously, I'm currently experiencing an issue where `swift build` apparently fails to link the standard library.

The project being built here is just a minimal hello-world example with nothing but a print() statement. Everything seems to run just fine in the REPL.

Here's the verbose output when trying to build:

```
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -module-name foo -incremental -emit-dependencies -emit-module -emit-module-path /Users/kilian/Desktop/foo/.build/debug/foo.swiftmodule -output-file-map /Users/kilian/Desktop/foo/.build/debug/foo.o/foo/output-file-map.json -c /Users/kilian/Desktop/foo/Sources/main.swift -I /Users/kilian/Desktop/foo/.build/debug -j8 -Onone -g -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /usr/local/include
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -o /Users/kilian/Desktop/foo/.build/debug/foo /Users/kilian/Desktop/foo/.build/debug/foo.o/Sources/main.swift.o -Xlinker -all_load -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/usr/local/lib
Undefined symbols for architecture x86_64:
"TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1_SS", referenced from:
_main in main.swift.o
"TFs5printFTGSaP9separatorSS10terminatorSS_T
", referenced from:
_main in main.swift.o
"TIFs5printFTGSaP9separatorSS10terminatorSS_T_A0", referenced from:
_main in main.swift.o
"TIFs5printFTGSaP9separatorSS10terminatorSS_T_A1
", referenced from:
_main in main.swift.o
"__TMSS", referenced from:
_main in main.swift.o
"TTSg5PTFs27_allocateUninitializedArrayurFBwTGSax_Bp*", referenced from:
_main in main.swift.o
"TZvOs7Process11_unsafeArgvGSpGSpVs4Int8*_", referenced from:
_main in main.swift.o
"__TZvOs7Process5_argcVs5Int32", referenced from:
_main in main.swift.o
"_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_func5", referenced from:
_main in main.swift.o
"_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token5", referenced from:
_main in main.swift.o
ld: symbol(s) not found for architecture x86_64
<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", "-v", "-f", "/Users/kilian/Desktop/foo/.build/debug/foo.o/llbuild.yaml"]
```

@mxcl
Copy link

mxcl commented Dec 9, 2015

Spot anything missing @ddunbar?

@BenchR267
Copy link
Member

Unfortunately I am experiencing the same issue on my Mac.. 'swift --version' prints the following:

Apple Swift version 2.2-dev (LLVM 7bae82deaa, Clang 53d04af5ce, Swift 5995ef2)
Target: x86_64-apple-macosx10.9

In my case types like CollectionType are not defined due to the log. So the stdlib is not linked like in kiliankoe (JIRA User)s problem.. On Linux it's working well, but on OS X even the Dealer example project from Github does not compile out of the box.

@mxcl
Copy link

mxcl commented Dec 14, 2015

Gentle ping @ddunbar.

Could it be the PM’s internal SDK selection has gone wrong, or is this a higher level?

@ddunbar
Copy link
Member

ddunbar commented Dec 15, 2015

What OS version on you on? What is your linker version? (`ld -v`)

@ddunbar
Copy link
Member

ddunbar commented Dec 15, 2015

Can you also include the output of:
/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/bin/swiftc -o /Users/kilian/Desktop/foo/.build/debug/foo /Users/kilian/Desktop/foo/.build/debug/foo.o/Sources/main.swift.o -Xlinker -all_load -target x86_64-apple-macosx10.10 -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -L/usr/local/lib -v
(note extra -v at end).

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

Hi, I'm on OS X 10.11.2 (15C50).

The output from `ld -v` is:

@(#)PROGRAM:ld PROJECT:ld64-253.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81)

And the output of the verbose version from before:

Apple Swift version 2.2-dev (LLVM 46be9ff861, Clang 4deb154edc, Swift 778f829)
Target: x86_64-apple-macosx10.10
/usr/bin/ld /Users/kilian/Desktop/foo/.build/debug/foo.o/Sources/main.swift.o -all_load -L /usr/local/lib -syslibroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -lobjc -lSystem -arch x86_64 -L /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx -rpath /Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2015-12-01-a.xctoolchain/usr/lib/swift/macosx -macosx_version_min 10.10.0 -no_objc_category_merging -o /Users/kilian/Desktop/foo/.build/debug/foo
Undefined symbols for architecture x86_64:
"TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1_SS", referenced from:
_main in main.swift.o
"TFs5printFTGSaP9separatorSS10terminatorSS_T
", referenced from:
_main in main.swift.o
"TIFs5printFTGSaP9separatorSS10terminatorSS_T_A0", referenced from:
_main in main.swift.o
"TIFs5printFTGSaP9separatorSS10terminatorSS_T_A1
", referenced from:
_main in main.swift.o
"__TMSS", referenced from:
_main in main.swift.o
"TTSg5PTFs27_allocateUninitializedArrayurFBwTGSax_Bp*", referenced from:
_main in main.swift.o
"TZvOs7Process11_unsafeArgvGSpGSpVs4Int8*_", referenced from:
_main in main.swift.o
"__TZvOs7Process5_argcVs5Int32", referenced from:
_main in main.swift.o
"_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_func5", referenced from:
_main in main.swift.o
"_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token5", referenced from:
_main in main.swift.o
ld: symbol(s) not found for architecture x86_64

@ddunbar
Copy link
Member

ddunbar commented Dec 15, 2015

I don't yet have a good clue here... I do notice you are on Xcode 7.0, but I wouldn't actually expect that to fail. If possible, it may be worth upgrading to the latest Xcode and trying that, it would at least be valuable information to know if it fails in the same manner.

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

For what it's worth, I've made sure to install the most current version of Xcode, choosing it via xcode-select and have also installed the latest dev snapshots of the Swift packages unfortunately to no avail. The output stays pretty much the same.

@mxcl
Copy link

mxcl commented Dec 16, 2015

What’s your `PATH`?

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

`/Users/kilian/.rvm/gems/ruby-2.2.3/bin:/Users/kilian/.rvm/gems/ruby-2.2.3@global/bin:/Users/kilian/.rvm/rubies/ruby-2.2.3/bin:/Users/kilian/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Library/TeX/texbin:/Users/kilian/scripts:/Users/kilian/develop/go/bin`

I've aliased the swift tools explicitly like this:
```
alias schwift='/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift'
alias schwift-build='/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift-build'
alias schwiftc='/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swiftc'
alias schwiftxcrun='xcrun launch-with-toolchain /Library/Developer/Toolchains/swift-latest.xctoolchain'
```

But throwing the entire directory into my path via `export PATH="/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH"` doesn't make a difference it seems.

@mxcl
Copy link

mxcl commented Dec 16, 2015

I just verified that basic packages should build without the whole toolchain in the PATH:

@BenchR267
Copy link
Member

I just cloned the example-package-dealer from github and executed the SPM on the same way you did. I get the following response:

@ddunbar
Copy link
Member

ddunbar commented Dec 16, 2015

I just tried on a clean install of 10.11 and it built without issue. I tried with Xcode 7.0, 7.1, and 7.2, all work ok.

Can you try:
env -i PATH=/bin:/usr/bin /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift build
to verify that nothing else from the environment is interacting here?

If that doesn't work, we are going to need to dig in on exactly why the mechanism that should be working isn't here. The way that this mechanism is supposed to work is as follows:

1. In main.o, there should be an auto linking directive telling ld to link swiftCore. You can verify whether or not that exists by running:
otool -lV .build/debug/Dealer.o/main.swift.o

That should come up with output like:

Link command 5
cmd LC_LINKER_OPTION
...
string #1 -lswiftCore

2. Try rerunning the swiftc link invocation (as reported by swift build -v) and add an explicit -lswiftCore. Does that resolve the issue?

3. Finally, you can also add "-t -v" to the linker invocation to see exactly what files the linker is including. That may illuminate the problem...

@BenchR267
Copy link
Member

Awesome![]( 'env -i PATH=/bin:/usr/bin /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift build' is working for me)

Actually it's working as it should since I executed this command... I changed the PATH variable a few minutes ago, maybe this change did it?

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

`env -i PATH=/bin:/usr/bin /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift build` seems to have no effect. Interestingly enough `env -i PATH=/bin:/usr/bin echo $PATH` or `PATH=/bin:/usr/bin echo $PATH` similarly just output my normal PATH. I've manually exported PATH to be set to `/bin:/usr/bin` and then ran swift build again running into the same issues as before.

Regarding 1:
I've saved the output of the command to hastebin here: http://hastebin.com/genariqera.sql

Regarding 2:
Adding `-lswiftCore` directly to the end of the command (assuming that is correct) results in this: http://hastebin.com/bomayakara.avrasm

Regarding 3:
It seems I'm failing to find out what command to add those flags to :/ I was guessing the linker invocation to be the first command to be output by running swift build?

Thanks for all the help along the way by the way![]( I really appreciate it)

@ddunbar
Copy link
Member

ddunbar commented Dec 18, 2015

@BenchR267 Most likely the change to PATH did resolve the issue

kiliankoe (JIRA User) What you showed for env -i is expected. What the "-i" flag does is that it erases all of the other environment variables other than the ones that are set. What I was trying to probe for was whether it could be the case that some other environment variable was what was causing the problem (e.g., various tools on our platform look at SDKROOT and TOOLCHAINS, and I thought it might be possible that if you had some of those set it was introducing the issue).

The command I expected you to add the flags to was the last command to be output (which is the one invoking the linker), not the first.

@jckarter Do you have any idea what might be going on here? Can you tell from the mangling if we are getting the wrong compiler at some point, or something?

@jckarter
Copy link
Member

It's a possibility. There was a mangling change after Xcode 7.0 (or maybe 7.1, I forget), so if you're building with open-source Swift but linking to the stdlib from the SDK, those symbols might be missing.

@swift-ci
Copy link
Collaborator Author

Comment by Eli Perkins (JIRA)

For what it's worth, my environment is also replicating this issue.

$ git clone https://github.com/apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 18, done.
remote: Total 18 (delta 0), reused 0 (delta 0), pack-reused 18
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
$ cd example-package-dealer
$ swift build
Compiling Swift Module 'FisherYates' (1 sources)
Linking Library:  .build/debug/FisherYates.a
Compiling Swift Module 'PlayingCard' (3 sources)
Linking Library:  .build/debug/PlayingCard.a
Compiling Swift Module 'DeckOfPlayingCards' (1 sources)
Linking Library:  .build/debug/DeckOfPlayingCards.a
Compiling Swift Module 'Dealer' (1 sources)
Linking Executable:  .build/debug/Dealer
Undefined symbols for architecture x86_64:
  "__TFEsPs14CollectionTypeg7isEmptySb", referenced from:
      __TFV18DeckOfPlayingCards4Deck4dealfT_GSqV11PlayingCard11PlayingCard_ in DeckOfPlayingCards.a(Deck.swift.o)
  "__TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS", referenced from:
      _main in main.swift.o
      __TFV11PlayingCard11PlayingCardg11descriptionSS in PlayingCard.a(PlayingCard.swift.o)
      __TFO11PlayingCard4Rankg11descriptionSS in PlayingCard.a(Rank.swift.o)
      __TFO11PlayingCard4SuitCfT8rawValueSS_GSqS0__ in PlayingCard.a(Suit.swift.o)
      __TFO11PlayingCard4Suitg8rawValueSS in PlayingCard.a(Suit.swift.o)
  "__TFSSCfT26_builtinUTF16StringLiteralBp17numberOfCodeUnitsBw_SS", referenced from:
      __TFO11PlayingCard4Suitg11descriptionSS in PlayingCard.a(Suit.swift.o)
  "__TFSSCfT26stringInterpolationSegmentSS_SS", referenced from:
      __TFV11PlayingCard11PlayingCardg11descriptionSS in PlayingCard.a(PlayingCard.swift.o)
      __TFO11PlayingCard4Rankg11descriptionSS in PlayingCard.a(Rank.swift.o)
...
      __TTWV11PlayingCard11PlayingCards10ComparableS_ZFS1_oi2gefTxx_Sb in PlayingCard.a(PlayingCard.swift.o)
      __TTWO11PlayingCard4Ranks10ComparableS_ZFS1_oi2gefTxx_Sb in PlayingCard.a(Rank.swift.o)
      __TTWO11PlayingCard4Suits10ComparableS_ZFS1_oi2gefTxx_Sb in PlayingCard.a(Suit.swift.o)
  "__TZFsoi2leuRxs10ComparablerFTxx_Sb", referenced from:
      __TTWV11PlayingCard11PlayingCards10ComparableS_ZFS1_oi2lefTxx_Sb in PlayingCard.a(PlayingCard.swift.o)
      __TTWO11PlayingCard4Ranks10ComparableS_ZFS1_oi2lefTxx_Sb in PlayingCard.a(Rank.swift.o)
      __TTWO11PlayingCard4Suits10ComparableS_ZFS1_oi2lefTxx_Sb in PlayingCard.a(Suit.swift.o)
  "__TZvOs7Process11_unsafeArgvGSpGSpVs4Int8__", referenced from:
      _main in main.swift.o
  "__TZvOs7Process5_argcVs5Int32", referenced from:
      _main in main.swift.o
  "_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_func5", referenced from:
      _main in main.swift.o
  "_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token5", referenced from:
      _main in main.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2016-01-11-a.xctoolchain/usr/bin/swift-build-tool", "-f", "/Users/elperkins/src/example-package-dealer/.build/debug/Dealer.o/llbuild.yaml"]

And same using `env -i`

env -i PATH=/bin:/usr/bin /Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin/swift build
Compiling Swift Module 'FisherYates' (1 sources)
Linking Library:  .build/debug/FisherYates.a
Compiling Swift Module 'PlayingCard' (3 sources)
Linking Library:  .build/debug/PlayingCard.a
Compiling Swift Module 'DeckOfPlayingCards' (1 sources)
Linking Library:  .build/debug/DeckOfPlayingCards.a
Compiling Swift Module 'Dealer' (1 sources)
Linking Executable:  .build/debug/Dealer
Undefined symbols for architecture x86_64:
  "__TFEsPs14CollectionTypeg7isEmptySb", referenced from:
      __TFV18DeckOfPlayingCards4Deck4dealfT_GSqV11PlayingCard11PlayingCard_ in DeckOfPlayingCards.a(Deck.swift.o)
  "__TFSSCfT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS", referenced from:
      _main in main.swift.o
      __TFV11PlayingCard11PlayingCardg11descriptionSS in PlayingCard.a(PlayingCard.swift.o)
      __TFO11PlayingCard4Rankg11descriptionSS in PlayingCard.a(Rank.swift.o)
      __TFO11PlayingCard4SuitCfT8rawValueSS_GSqS0__ in PlayingCard.a(Suit.swift.o)
      __TFO11PlayingCard4Suitg8rawValueSS in PlayingCard.a(Suit.swift.o)
  "__TFSSCfT26_builtinUTF16StringLiteralBp17numberOfCodeUnitsBw_SS", referenced from:
      __TFO11PlayingCard4Suitg11descriptionSS in PlayingCard.a(Suit.swift.o)
...
      _main in main.swift.o
  "__TZvOs7Process5_argcVs5Int32", referenced from:
      _main in main.swift.o
  "_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_func5", referenced from:
      _main in main.swift.o
  "_globalinit_33_1BDF70FFC18749BAB495A73B459ED2F0_token5", referenced from:
      _main in main.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/Library/Developer/Toolchains/swift-2.2-SNAPSHOT-2016-01-06-a.xctoolchain/usr/bin/swift-build-tool", "-f", "/Users/elperkins/src/example-package-dealer/.build/debug/Dealer.o/llbuild.yaml"]
$ otool -lV .build/debug/Dealer.o/main.swift.o
...
Load command 3
            cmd LC_DYSYMTAB
...
Load command 4
     cmd LC_LINKER_OPTION
 cmdsize 24
   count 1
  string #&#8203;1 -lswiftCore
Load command 5
     cmd LC_LINKER_OPTION
 cmdsize 24
   count 1
  string #&#8203;1 -lobjc
$ swift --version
Apple Swift version 2.2-dev (LLVM 3ebdbb2c7e, Clang f66c5bb67b, Swift 42591f7cba)
Target: x86_64-apple-macosx10.9
$ xcodebuild -version
Xcode 7.3
Build version 7D111g

OS X 10.11.4 Beta (15E27e)

If there's any more context I can provide, I'd be glad to!

@swift-ci
Copy link
Collaborator Author

Comment by Stepan Hruda (JIRA)

Happens to me as well.

  • OS X 10.11.3

  • happening on both DEVELOPMENT-SNAPSHOT-2016-02-08-a and DEVELOPMENT-SNAPSHOT-2016-02-25-a, probably on earlier snapshots too

  • happening with xcode-select path being set either to Xcode 7.2 or prerelease Xcode 7.3

  • replacing PATH doesn't help

Happy to help with additional investigation on my environment.

@mxcl
Copy link

mxcl commented Feb 29, 2016

@jckarter or @ddunbar, is there flags for controlling the stdlib linking part?

@jckarter
Copy link
Member

@belkadan knows the driver better than me. Does `-L` help at all?

@swift-ci
Copy link
Collaborator Author

Comment by Loïc Dalbin (JIRA)

I have the same problem, but if I reuse the same command removing the -L/usr/local/lib at the end, its build correctly.

swift build -vv   
...
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swift-build-tool -v -f /Users/loic/Temp/example-package-dealer/.build/debug/Dealer.o/llbuild.yaml
/Library/Developer/Toolchains/swift-DEVELOPMENT-SNAPSHOT-2016-02-08-a.xctoolchain/usr/bin/swiftc -o /Users/loic/Temp/example-package-dealer/.build/debug/Dealer /Users/loic/Temp/example-package-dealer/.build/debug/Dealer.o/main.swift.o -target x86_64-apple-macosx10.10 -Xlinker -all_load -g -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk /Users/loic/Temp/example-package-dealer/.build/debug/DeckOfPlayingCards.a /Users/loic/Temp/example-package-dealer/.build/debug/PlayingCard.a /Users/loic/Temp/example-package-dealer/.build/debug/FisherYates.a -L/usr/local/lib

Undefined symbols for architecture x86_64:
  "__TFEsPs14CollectionTypeg7isEmptySb", referenced from:
      __TFV18DeckOfPlayingCards4Deck4dealfT_GSqV11PlayingCard11PlayingCard_ in DeckOfPlayingCards.a(Deck.swift.o)
.....

Full log : https://gist.github.com/dalbin/45d75965b8ed28a47e10

@mxcl
Copy link

mxcl commented Feb 29, 2016

dalbin (JIRA User) interesting.

Please note: the latest snapshot doesn't add -L/usr/local/lib anymore—you should upgrade.

However, I wonder what is going on here.

@swift-ci
Copy link
Collaborator Author

Comment by Loïc Dalbin (JIRA)

Thank you, I have upgraded and now it's works perfectly.

@swift-ci
Copy link
Collaborator Author

Comment by Eli Perkins (JIRA)

Ah![]( Interesting. Exhibited the same thing as dalbin (JIRA User), upgrading to DEVELOPMENT-SNAPSHOT-2016-02-25-a fixes it)

@BenchR267
Copy link
Member

Awesome, it's working!

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

Same here, latest version as of now seems to be working just fine on my end as well. Thank you!!

@swift-ci
Copy link
Collaborator Author

Comment by Loïc Dalbin (JIRA)

By the way, I can't build https://github.com/IBM-Swift/Kitura which link to libraries in /usr/local/lib

@mxcl
Copy link

mxcl commented Feb 29, 2016

You can add -Xlinker -L/usr/local/lib to add it back, but then you have this other bug.

Could one of your for whom it is fixed list your /usr/local/lib directory for me?

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

Here's a listing of the contents of my `/usr/local/lib` directory: http://hastebin.com/kenulimuju.avrasm

@mxcl
Copy link

mxcl commented Feb 29, 2016

And there we have it:

libswiftAppKit.dylib
libswiftCore.dylib
libswiftCoreData.dylib
libswiftCoreGraphics.dylib
libswiftCoreImage.dylib
libswiftDarwin.dylib
libswiftDispatch.dylib
libswiftFoundation.dylib
libswiftObjectiveC.dylib

I guess this is the Homebrew installed swift?

@swift-ci
Copy link
Collaborator Author

Comment by Kilian Koeltzsch (JIRA)

If I'm not entirely mistaken I've never installed swift itself through Homebrew (definitely not currently), but I have done so with several tools built with swift (e.g. swiftgen, swiftlint, chswift, alcatraz, etc.). Not sure if that makes a difference though or not.

@swift-ci
Copy link
Collaborator Author

Comment by Stepan Hruda (JIRA)

@mxcl you are correct, sir:

libswiftCore.dylib -> ../Cellar/swiftgen/0.7.6/lib/libswiftCore.dylib

@masters3d
Copy link
Contributor

I am having a similar issue but only during `swift test`

https://bugs.swift.org/browse/SR-1276

@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.
Projects
None yet
Development

No branches or pull requests

6 participants