rails-sqlserver / heroku-buildpack-freetds

This is a Heroku buildpack for vendoring the FreeTDS binaries into your project.
MIT License
10 stars 31 forks source link

"grep: command not found" when trying to build the buildpack #23

Open markiz opened 1 year ago

markiz commented 1 year ago

After this PR was merged, we immediately started seeing the following error during heroku deployment

-----> FreeTDS app detected
       BIN_DIR=/tmp/codon/tmp/buildpacks/89c5ba58d4a923295058e848b2f0751fa8f4f45e/bin, ROOT_DIR=/tmp/codon/tmp/buildpacks/89c5ba58d4a923295058e848b2f0751fa8f4f45e, BUILD_DIR=/tmp/build_c95bba3f, CACHE_DIR=/tmp/codon/tmp/cache, pwd=/tmp/codon/tmp/buildpacks/89c5ba58d4a923295058e848b2f0751fa8f4f45e
-----> [2023-01-18 09:57:46] FreeTDS 1.1.15 building in /tmp/build_c95bba3f
-----> [2023-01-18 09:57:46] Creating .profile.d entry
       configured APP env vars:
         export PATH="/app/freetds/bin:$PATH"
         # tiny_tds extconf.rb uses FREETDS_DIR
         # https://github.com/rails-sqlserver/tiny_tds/blob/5046755ca91594003f8b3ca541d136f3ed859973/ext/tiny_tds/extconf.rb#L36-L38
         export FREETDS_DIR="/app/freetds"
         export LD_LIBRARY_PATH="/app/freetds/lib:/usr/local/lib"
         export LD_RUN_PATH="/app/freetds/lib:/usr/local/lib"
         export LIBRARY_PATH="/app/freetds/lib:/usr/local/lib"
         export SYBASE="/app/freetds"
       Unpacking cached files...
/tmp/codon/tmp/buildpacks/89c5ba58d4a923295058e848b2f0751fa8f4f45e/bin/compile: line 113: grep: command not found
       END Running script: compile
 !     Push rejected, failed to compile FreeTDS app.
 !     Push failed

Switching to the commit just before the last one resolved the issue.

This is on heroku-18 stack, not sure about the recent versions.

robcole commented 1 year ago

Running into this as well on the Heroku-20 stack.

bf4 commented 1 year ago

Hmm, odd. I recommend you pin the last tag till this is resolved, then.

sumirolabs commented 1 year ago

Same here, opened ticket in Heroku today.

bf4 commented 1 year ago

In the meantime, I reverted the change https://github.com/rails-sqlserver/heroku-buildpack-freetds/pull/24 (not sure why I didn't think of that before)

Fwiw, right now, my buildpack config is to use https://github.com/rails-sqlserver/heroku-buildpack-freetds#v1.1.3

bf4 commented 1 year ago

I encountered this error myself and believe I have fixed it on master (so far unreleased)