0

I am trying to deploy an application on BlueMix. I can run the application locally on my computer, but cannot deploy it on BlueMix.

I believe the error is being caused by some Library or function under a library that is missing. Looking at the trace it is probably Foundation.OperationsDispatch.

How can I include the missing library or fix the above problem.

The error log is the following:

       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
swift-build: error: exit(1): /tmp/cache/swift-3.0/swift-3.0-RELEASE-ubuntu14.04/usr/bin/swift-build-tool -f /tmp/staged/app/.build/release.yaml
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_queueXwGSqCS_14OperationQueue_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_cancelledSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm10_executingSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_finishedSb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_readySb' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm13_dependenciesGVs3SetS0__' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm6_groupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm9_depGroupC8Dispatch13DispatchGroup' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationg7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operations7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operationm7_groupsGSaC8Dispatch13DispatchGroup_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation12_leaveGroupsfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation6finishfT_T_' is not defined locally
       /usr/bin/ld.gold: error: hidden symbol '_TFC10Foundation9Operation15_waitUntilReadyfT_T_' is not defined locally
       clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
       <unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
Staging failed: Buildpack compilation step failed
zirinisp
  • 9,971
  • 5
  • 32
  • 38

2 Answers2

1

This is a bug in Swift on Linux that was fixed by the following commit: https://github.com/apple/swift/commit/fd61338444ac42d8715fd9e637b238e035f17f8d

Unfortunately that didn't make Swift 3.0 GA, but it should be in the latest Swift 3.0.1 Preview.

Chris Bailey
  • 292
  • 1
  • 3
  • I will try to use swift version 3.0.1, as the code runs fine on the IBM Swift Sandbox when i select 3.0.1 – zirinisp Oct 13 '16 at 07:18
  • Do you know how to run swift 3.0.1 on IBM Bluemix i have tried various entries on the .swift-version and none of them worked. Bluemix complaints that it could not download the custom swift version. Some debugging showed that blue mix is not using the correct url – zirinisp Oct 13 '16 at 14:56
  • The buildpack supports downloading only development and official release versions of Swift (not preview versions). The latest (trunk) development version is oct-14 (https://swift.org/download/#snapshots). You can try that version instead of the preview version. Chris, do you know if oct-14 has the fix for this bug? – rolivieri Oct 15 '16 at 19:17
  • Just updated the buildpack code in the develop branch (it is not installed yet). Hence, one workaround for using a swift preview version is as follows: use 3.0.1-PREVIEW-3 in your .swift-version file and then to push the application use this command: cf push -b https://github.com/IBM-Swift/swift-buildpack.git#develop – rolivieri Oct 15 '16 at 23:17
  • Using 3.0.1-PREVIEW-3 I get the following error: WARNING: Custom Swift version for your app: swift-3.0.1-PREVIEW-3 WARNING: The buildpack will attempt to download requested version from Swift.org ERROR: Could not find/download requested custom Swift version from Swift.org: https://swift.org/builds/swift-3.0.1-preview-3-release/ubuntu1404/swift-3.0.1-PREVIEW-3-RELEASE/swift-3.0.1-PREVIEW-3-RELEASE-ubuntu14.04.tar.gz Staging failed: Buildpack compilation step failed – zirinisp Oct 19 '16 at 05:48
  • @rolivieri i did not see the cf push -b command. I will try it out – zirinisp Oct 19 '16 at 05:50
  • Target: https://api.ng.bluemix.net Updating app KiteSpotterServer in org PazLabs / space Space1 as info@paz-labs.com... FAILED Server error, status code: 400, error code: 100001, message: The app is invalid: buildpack github.com/IBM-Swift/swift-buildpack.git#develop is not valid public url or a known buildpack name Finished: FAILED I guess I will just have to wait for the whole thing to mature and build locally for the moment. – zirinisp Oct 19 '16 at 05:53
  • zirinisp, I just tried this again and it worked as long as I used 3.0.1-PREVIEW-3 in the .swift-version file. You should see something along these lines when pushing the app: "-----> Getting swift-3.0.1-PREVIEW-3 -----> Unpacking swift-3.0.1-PREVIEW-3.tar.gz..." I would recommend you delete your current app (using cf delete ) and then push your application one more time. Make sure you use cf push -b https://github.com/IBM-Swift/swift-buildpack.git#develop. Let us know if you are still having problems after trying this. – rolivieri Oct 19 '16 at 18:51
0

Does your application subclass Operation?

The linker errors look very similar to those in https://bugs.swift.org/browse/SR-2170. There is a known problem with Swift 3.0 on Linux which prevents subclassing of open classes defined in Foundation because the Foundation library is not being generated with the proper linker visibility for internal members of open classes.

Dave Grove
  • 156
  • 2