rails-sqlserver / tiny_tds

TinyTDS - Simple and fast FreeTDS bindings for Ruby using DB-Library.
Other
606 stars 190 forks source link

Push to Heroku fails with release 2.1.0 #463

Open RickEaton opened 4 years ago

RickEaton commented 4 years ago

When pushing app to Heroku-18, tiny_tds gem build fails.

Environment: Heroku 18 Ruby 2.5.0, 2.7.0, 2.7.1 Rails 6 Using heroku-buildpack-freetds

Initially, it wasn't clear if this problem was caused by a problem with the buildpack, tiny_tds, or something else. However, the deployment works with the environment above using tiny_tds release 1.3.0 and only breaks when moving to 2.1.0.

Here is the relevant portion of the push to heroku:

Installing tiny_tds 2.1.0 with native extensions remote: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. remote:
remote: current directory: remote: /tmp/build_b9a97fdea10e378475059a1e02f1256f/vendor/bundle/ruby/2.7.0/gems/tiny_tds-2.1.0/ext/tiny_tds remote: /tmp/build_b9a97fdea10e378475059a1e02f1256f/vendor/ruby-2.7.1/bin/ruby -I remote: /tmp/build_b9a97fdea10e378475059a1e02f1256f/vendor/ruby-2.7.1/lib/ruby/2.7.0 -r remote: ./siteconf20200420-282-1gqju9i.rb extconf.rb remote: checking for sybfront.h... no remote: checking for sybdb.h... no remote: checking for tdsdbopen() in -lsybdb... yes remote: checking for dbanydatecrack() in -lsybdb... yes remote: Failed! Do you have FreeTDS 0.95.80 or higher installed? remote: extconf.rb failed remote: Could not create Makefile due to some reason, probably lack of necessary remote: libraries and/or headers. Check the mkmf.log file for more details. You may remote: need configuration options. remote:

The contents of mkmf.log are:

"gcc -o conftest -I/app/vendor/ruby-2.7.0/include/ruby-2.7.0/x86_64-linux -I/app/vendor/ruby-2.7.0/include/ruby-2.7.0/ruby/backward -I/app/vendor/ruby-2.7.0/include/ruby-2.7.0 -I. -I/usr/local/include -I/usr/local/include/freetds -O3 -g -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -fPIC conftest.c -L. -L/app/vendor/ruby-2.7.0/lib -Wl,-rpath,/app/vendor/ruby-2.7.0/lib -L/usr/local/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib/freetds -Wl,-rpath,/usr/local/lib/freetds -L. -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,-rpath,'/../lib' -Wl,-rpath,'/../lib' -lruby -lm -lc" In file included from /app/vendor/ruby-2.7.0/include/ruby-2.7.0/ruby/ruby.h:29:0, from /app/vendor/ruby-2.7.0/include/ruby-2.7.0/ruby.h:33, from conftest.c:1: /app/vendor/ruby-2.7.0/include/ruby-2.7.0/ruby/defines.h:126:10: fatal error: stdio.h: No such file or directory

include

^~~~~ compilation terminated. checked program was: / begin / 1: #include "ruby.h" 2: 3: int main(int argc, char argv) 4: { 5: return !!argv[argc]; 6: } / end /

Stanleyyork commented 2 years ago

@RickEaton did you ever get a resolution on this? Been working/struggling on this for a week (including following the other issue thread here).

wpolicarpo commented 2 years ago

@Stanleyyork if you're able to create a minimal reproducible app I could play with, I can help you track down the issue.