kylef / heroku-buildpack-swift

Heroku build pack for Swift
BSD 3-Clause "New" or "Revised" License
508 stars 0 forks source link

Push rejected, failed to compile Swift app #35

Closed ayush123007 closed 6 years ago

ayush123007 commented 6 years ago

hi i want to deploy my perfect swift application first time and i am facing Push rejected, failed to compile Swift app. i am using your build pack.

error looks like Push rejected, failed to compile Swift app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to safe-sea-83276. remote: ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com

JunyuKuang commented 6 years ago

Same here. Did you solved that?

kylef commented 6 years ago

Is there any more info or any logs?

givip commented 6 years ago

@kylef I assume I have the same issue, the reason is on clang step

$ git push heroku master
Counting objects: 16, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (16/16), 2.58 KiB | 2.58 MiB/s, done.
Total 16 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Swift app detected
remote: Cloning into 'swiftenv'...
remote: -----> Installing 4.0
remote: Downloading https://swift.org/builds/swift-4.0-release/ubuntu1604/swift-4.0-RELEASE/swift-4.0-RELEASE-ubuntu16.04.tar.gz
remote: /tmp/swiftenv-4.0- /tmp/build_a79beb4e54eeb8948b41436ceaf1ed1e
remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
remote:                                  Dload  Upload   Total   Spent    Left  Speed
remote: 100  166M  100  166M    0     0  9302k      0  0:00:18  0:00:18 --:--:-- 9779k
remote: /tmp/build_a79beb4e54eeb8948b41436ceaf1ed1e
remote: 4.0 has been installed.
remote: -----> Installing clang-3.7.0
remote: xz: (stdin): File format not recognized
remote:  !     Push rejected, failed to compile Swift app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !   Push rejected to app1.
remote: 
To https://git.heroku.com/app123.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/app123.git'
givip commented 6 years ago

I think llvm.org is temporary unavailable. http://releases.llvm.org/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz returns 503 http code

ayush123007 commented 6 years ago

Hi, sorry for late reply still i am facing same problem this time i am just only pushing basic application and logs are.

732/LinuxBridge/include/LinuxBridge.h:6:10: fatal error: 'uuid/uuid.h' file not found remote: #include <uuid/uuid.h> remote: ^ remote: 1 error generated. remote: error: terminated(1): /app/tmp/cache/swiftenv/versions/4.0/usr/bin/swift-build-tool -f /app/tmp/cache/.build/release.yaml main remote: Fetching https://github.com/PerfectlySoft/Perfect-HTTPServer.git remote: Fetching https://github.com/PerfectlySoft/Perfect-COpenSSL.git remote: Fetching https://github.com/PerfectlySoft/Perfect-Crypto.git remote: Fetching https://github.com/PerfectlySoft/Perfect-HTTP.git remote: Fetching https://github.com/PerfectlySoft/Perfect-Net.git remote: Fetching https://github.com/PerfectlySoft/Perfect-Thread.git remote: Fetching https://github.com/PerfectlySoft/PerfectLib.git remote: Fetching https://github.com/PerfectlySoft/Perfect-LinuxBridge.git remote: Fetching https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git remote: Cloning https://github.com/PerfectlySoft/Perfect-LinuxBridge.git remote: Resolving https://github.com/PerfectlySoft/Perfect-LinuxBridge.git at 2.0.2 remote: Cloning https://github.com/PerfectlySoft/Perfect-Thread.git remote: Resolving https://github.com/PerfectlySoft/Perfect-Thread.git at 2.0.12 remote: Cloning https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git remote: Resolving https://github.com/PerfectlySoft/Perfect-COpenSSL-Linux.git at 2.0.4 remote: Cloning https://github.com/PerfectlySoft/Perfect-HTTP.git remote: Resolving https://github.com/PerfectlySoft/Perfect-HTTP.git at 2.2.4 remote: Cloning https://github.com/PerfectlySoft/PerfectLib.git remote: Resolving https://github.com/PerfectlySoft/PerfectLib.git at 2.0.11 remote: Cloning https://github.com/PerfectlySoft/Perfect-HTTPServer.git remote: Resolving https://github.com/PerfectlySoft/Perfect-HTTPServer.git at 2.3.4 remote: Cloning https://github.com/PerfectlySoft/Perfect-COpenSSL.git remote: Resolving https://github.com/PerfectlySoft/Perfect-COpenSSL.git at 2.0. remote: Cloning https://github.com/PerfectlySoft/Perfect-Crypto.git remote: Resolving https://github.com/PerfectlySoft/Perfect-Crypto.git at 1.1.1 remote: Cloning https://github.com/PerfectlySoft/Perfect-Net.git remote: Resolving https://github.com/PerfectlySoft/Perfect-Net.git at 2.1.18 remote: ! Push rejected, failed to compile Swift app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to iufc. remote: To https://git.heroku.com/iufc.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/iufc.git' NPANDURA-M-59NJ:iufc_scratch ayushadav$ ./bin/pre_compile

kamcma commented 6 years ago

I might be getting the something similar.

-----> Swift app detected
Cloning into 'swiftenv'...
-----> Building Package
error: terminated(128): git -C /app/tmp/cache/.build/repositories/tls.git-2845076687973633621 remote update -p
Updating https://github.com/vapor/vapor.git
Updating https://github.com/vapor/console.git
Updating https://github.com/vapor/core.git
Updating https://github.com/vapor/tls.git
Updating https://github.com/vapor/template-kit.git
Updating https://github.com/vapor/sockets.git
Updating https://github.com/vapor/database-kit.git
Updating https://github.com/vapor/engine.git
 !     Push rejected, failed to compile Swift app.
 !     Push failed
henkvanderspek commented 6 years ago

I'm seeing the same as @ayush123007. Adding below to 'bin/pre_compile' didn't help:

#!/usr/bin/env bash apt-get install uuid-dev

Keno42 commented 6 years ago

I could install uuid-dev by using https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt

  1. Command-line heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt

  2. Aptfile Put down uuid-dev to a file named Aptfile

bin/pre_compile did not work for this.

brntphish commented 6 years ago

Has this been resolved by anyone? I get failures on: remote: -----> Installing swiftenv remote: fatal: Not a git repository (or any of the parent directories): .git

kylef commented 6 years ago

The original issue is about a temporary problem where llvm hosted binary clang was un-installable. This has been resolved now.

remote: -----> Installing clang-3.7.0 remote: xz: (stdin): File format not recognized

I think llvm.org is temporary unavailable. http://releases.llvm.org/3.7.0/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz returns 503 http code


There have been some others tacking onto the end of this issue with their unrelated problems than what the issue is about. Perhaps the way they are manifesting is looking similar so I can understand the confusion. If you are still facing a problem please file a separate issue with further details / steps to reproduce please, it's a little clear on what each individual problem is there as there is various separated discussions on the same issue about separate issues.

Some of you seem to be having a problem with Vapor dependencies. If you are using Vapor and need to install dependencies that it requires please see comment at https://github.com/kylef/heroku-buildpack-swift/issues/35#issuecomment-367270432 which I believe closes that problem. It would appear that there is a Vapor example which doesn't need to install any other dependencies at https://github.com/vapor-community/example so perhaps that isn't about Vapor but another dependency that you are depending on.


@brntphish I'm able to deploy the example application, do you have some specific details on what you are doing and how it differs from the demo application mentioned in the README? Please create a separate issue so this problem is properly tracked.

screen shot 2018-04-11 at 11 21 56