rowland / fb

Firebird Extension Library for Ruby
64 stars 36 forks source link

can't install on Mac OS X #13

Closed newellista closed 13 years ago

newellista commented 13 years ago

FYI, I installed FirebirdSS-2.1.4-18393-x86_64.pkg.zip into /Library/Frameworks/Firebird.framework

I noticed that the install is looking for re.h. I'm not sure if that is supposed to be part of the Firebird install, but the /Library/Frameworks/Firebird.framework/Headers directory only contains:

cd /Library/Frameworks/Firebird.framework/Headers lvoows07:Headers$ ll total 624 drwxr-xr-x 6 firebird 204 Mar 14 07:52 ./ drwxr-xr-x 6 firebird 204 Mar 14 07:52 ../ -rw-r--r-- 1 firebird 1061 Mar 14 07:52 ib_util.h -rw-r--r-- 1 firebird 202068 Mar 14 07:52 ibase.h -rw-r--r-- 1 firebird 105754 Mar 14 07:52 iberror.h -rw-r--r-- 1 firebird 2273 Mar 14 07:52 perf.h

Any help would be appreciated.

Thanks,

Steve $ gem install fb Building native extensions. This could take a while... ERROR: Error installing fb: ERROR: Failed to build gem native extension.

    /Users/snewell/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb

checking for isc_attach_database() in -lfbclient... no checking for isc_attach_database() in -lgds... no creating Makefile

make gcc -I. -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Library/Frameworks/Firebird.framework/Headers -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -DOS_UNIX -o fb.o -c fb.c fb.c:24:16: error: re.h: No such file or directory fb.c: In function ‘fb_sql_type_from_code’: fb.c:322: warning: assignment discards qualifiers from pointer target type fb.c:326: warning: assignment discards qualifiers from pointer target type fb.c:331: warning: assignment discards qualifiers from pointer target type fb.c:332: warning: assignment discards qualifiers from pointer target type fb.c:333: warning: assignment discards qualifiers from pointer target type fb.c:339: warning: assignment discards qualifiers from pointer target type fb.c:340: warning: assignment discards qualifiers from pointer target type fb.c:341: warning: assignment discards qualifiers from pointer target type fb.c:346: warning: assignment discards qualifiers from pointer target type fb.c:351: warning: assignment discards qualifiers from pointer target type fb.c:352: warning: assignment discards qualifiers from pointer target type fb.c:353: warning: assignment discards qualifiers from pointer target type fb.c:358: warning: assignment discards qualifiers from pointer target type fb.c:362: warning: assignment discards qualifiers from pointer target type fb.c:366: warning: assignment discards qualifiers from pointer target type fb.c:369: warning: assignment discards qualifiers from pointer target type fb.c:373: warning: assignment discards qualifiers from pointer target type fb.c:377: warning: assignment discards qualifiers from pointer target type fb.c:381: warning: assignment discards qualifiers from pointer target type fb.c:386: warning: assignment discards qualifiers from pointer target type fb.c:387: warning: assignment discards qualifiers from pointer target type fb.c:388: warning: assignment discards qualifiers from pointer target type fb.c:393: warning: assignment discards qualifiers from pointer target type fb.c: In function ‘fb_connection_close_cursors’: fb.c:492: error: ‘struct RArray’ has no member named ‘len’ fb.c:493: error: ‘struct RArray’ has no member named ‘ptr’ fb.c: In function ‘fb_connection_drop_cursors’: fb.c:501: error: ‘struct RArray’ has no member named ‘len’ fb.c:502: error: ‘struct RArray’ has no member named ‘ptr’ fb.c:504: error: ‘struct RArray’ has no member named ‘len’ fb.c: At top level: fb.c:618: warning: initialization discards qualifiers from pointer target type fb.c:618: warning: initialization discards qualifiers from pointer target type fb.c:619: warning: initialization discards qualifiers from pointer target type fb.c:620: warning: initialization discards qualifiers from pointer target type fb.c:627: warning: initialization discards qualifiers from pointer target type fb.c:628: warning: initialization discards qualifiers from pointer target type fb.c:629: warning: initialization discards qualifiers from pointer target type fb.c:636: warning: initialization discards qualifiers from pointer target type fb.c:636: warning: initialization discards qualifiers from pointer target type fb.c:637: warning: initialization discards qualifiers from pointer target type fb.c:644: warning: initialization discards qualifiers from pointer target type fb.c:645: warning: initialization discards qualifiers from pointer target type fb.c:645: warning: initialization discards qualifiers from pointer target type fb.c:652: warning: initialization discards qualifiers from pointer target type fb.c:653: warning: initialization discards qualifiers from pointer target type fb.c:654: warning: initialization discards qualifiers from pointer target type fb.c:654: warning: initialization discards qualifiers from pointer target type fb.c:655: warning: initialization discards qualifiers from pointer target type fb.c:655: warning: initialization discards qualifiers from pointer target type fb.c:656: warning: initialization discards qualifiers from pointer target type fb.c:657: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘trans_parseopts’: fb.c:696: warning: assignment makes pointer from integer without a cast fb.c:745: warning: assignment discards qualifiers from pointer target type fb.c:753: warning: assignment discards qualifiers from pointer target type fb.c:768: warning: assignment discards qualifiers from pointer target type fb.c:773: warning: assignment discards qualifiers from pointer target type fb.c:777: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:788: warning: assignment discards qualifiers from pointer target type fb.c:793: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:799: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:801: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:804: warning: assignment discards qualifiers from pointer target type fb.c:828: warning: assignment discards qualifiers from pointer target type fb.c:852: warning: assignment discards qualifiers from pointer target type fb.c:866: warning: assignment discards qualifiers from pointer target type fb.c:878: warning: assignment discards qualifiers from pointer target type fb.c:915: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:920: warning: format not a string literal and no format arguments fb.c: In function ‘fb_cursor_set_inputparams’: fb.c:1499: error: ‘struct RString’ has no member named ‘len’ fb.c:1501: error: ‘struct RString’ has no member named ‘len’ fb.c:1503: error: ‘struct RString’ has no member named ‘ptr’ fb.c:1503: error: ‘struct RString’ has no member named ‘len’ fb.c:1503: error: ‘struct RString’ has no member named ‘ptr’ fb.c:1503: error: ‘struct RString’ has no member named ‘len’ fb.c:1504: error: ‘struct RString’ has no member named ‘len’ fb.c:1514: error: ‘struct RString’ has no member named ‘len’ fb.c:1516: error: ‘struct RString’ has no member named ‘len’ fb.c:1518: error: ‘struct RString’ has no member named ‘ptr’ fb.c:1518: error: ‘struct RString’ has no member named ‘len’ fb.c:1518: error: ‘struct RString’ has no member named ‘ptr’ fb.c:1518: error: ‘struct RString’ has no member named ‘len’ fb.c:1519: error: ‘struct RString’ has no member named ‘len’ fb.c:1561: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:1578: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c:1621: error: ‘struct RString’ has no member named ‘len’ fb.c:1622: error: ‘struct RString’ has no member named ‘ptr’ fb.c: In function ‘fb_cursor_execute_withparams’: fb.c:1710: error: ‘struct RArray’ has no member named ‘len’ fb.c:1710: error: ‘struct RArray’ has no member named ‘ptr’ fb.c:1711: error: ‘struct RArray’ has no member named ‘len’ fb.c:1721: error: ‘struct RArray’ has no member named ‘len’ fb.c:1721: error: ‘struct RArray’ has no member named ‘ptr’ fb.c: In function ‘fb_cursor_fields_hash’: fb.c:1850: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘fb_cursor_fetch’: fb.c:2017: warning: passing argument 2 of ‘fb_mktime’ discards qualifiers from pointer target type fb.c:2025: warning: passing argument 2 of ‘fb_mktime’ discards qualifiers from pointer target type fb.c:2060: error: ‘struct RString’ has no member named ‘ptr’ fb.c:2074: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’ fb.c: In function ‘cursor_execute2’: fb.c:2149: warning: assignment makes pointer from integer without a cast fb.c:2202: error: ‘struct RArray’ has no member named ‘len’ fb.c:2202: error: ‘struct RArray’ has no member named ‘ptr’ fb.c:2222: error: ‘struct RArray’ has no member named ‘len’ fb.c:2222: error: ‘struct RArray’ has no member named ‘ptr’ fb.c: In function ‘fb_hash_from_ary’: fb.c:2304: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘cursor_drop’: fb.c:2467: error: ‘struct RArray’ has no member named ‘len’ fb.c:2468: error: ‘struct RArray’ has no member named ‘ptr’ fb.c:2469: error: ‘struct RArray’ has no member named ‘ptr’ fb.c: In function ‘dbp_add_string’: fb.c:2522: warning: implicit conversion shortens 64-bit value into a 32-bit value fb.c: In function ‘connection_create_dbp’: fb.c:2545: warning: passing argument 3 of ‘dbp_add_string’ makes pointer from integer without a cast fb.c:2546: warning: passing argument 3 of ‘dbp_add_string’ makes pointer from integer without a cast fb.c:2548: warning: passing argument 3 of ‘dbp_add_string’ makes pointer from integer without a cast fb.c:2551: warning: passing argument 3 of ‘dbp_add_string’ makes pointer from integer without a cast fb.c: At top level: fb.c:2557: warning: initialization discards qualifiers from pointer target type fb.c:2558: warning: initialization discards qualifiers from pointer target type fb.c:2559: warning: initialization discards qualifiers from pointer target type fb.c:2560: warning: initialization discards qualifiers from pointer target type fb.c:2561: warning: initialization discards qualifiers from pointer target type fb.c:2562: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_table_names’: fb.c:2634: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_generator_names’: fb.c:2647: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_view_names’: fb.c:2660: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_role_names’: fb.c:2671: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_procedure_names’: fb.c:2683: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_trigger_names’: fb.c:2695: warning: initialization discards qualifiers from pointer target type fb.c: In function ‘connection_columns’: fb.c:2709: error: ‘RE_OPTION_IGNORECASE’ undeclared (first use in this function) fb.c:2709: error: (Each undeclared identifier is reported only once fb.c:2709: error: for each function it appears in.) fb.c:2720: warning: initialization discards qualifiers from pointer target type fb.c:2726: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘connection_index_columns’: fb.c:2776: warning: initialization discards qualifiers from pointer target type fb.c:2785: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘connection_indexes’: fb.c:2807: warning: initialization discards qualifiers from pointer target type fb.c:2815: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘hash_from_connection_string’: fb.c:2889: error: ‘struct RArray’ has no member named ‘len’ fb.c:2892: error: ‘struct RArray’ has no member named ‘len’ fb.c: In function ‘database_initialize’: fb.c:2934: warning: passing argument 2 of ‘default_string’ discards qualifiers from pointer target type fb.c:2934: warning: passing argument 3 of ‘default_string’ discards qualifiers from pointer target type fb.c:2935: warning: passing argument 2 of ‘default_string’ discards qualifiers from pointer target type fb.c:2935: warning: passing argument 3 of ‘default_string’ discards qualifiers from pointer target type fb.c:2936: warning: passing argument 2 of ‘default_string’ discards qualifiers from pointer target type fb.c:2936: warning: passing argument 3 of ‘default_string’ discards qualifiers from pointer target type fb.c:2939: warning: passing argument 2 of ‘default_int’ discards qualifiers from pointer target type fb.c: In function ‘database_connect’: fb.c:3024: warning: passing argument 3 of ‘isc_attach_database’ makes pointer from integer without a cast make: *\ [fb.o] Error 1

rowland commented 13 years ago

Version 0.6.7 (the latest on RubyGems.org) doesn't build against Ruby 1.9.x. The latest here on github has been building against 1.9.1 and 1.9.2 for some time now, but I haven't pushed it to RubyGems.org because, although it passes all the tests, it hasn't been run in a production environment. In particular, character encodings have not been addressed at all.

newellista commented 13 years ago

Since I don't need character encodings, I'll give the latest a try. Thanks for your help.

newellista commented 13 years ago

Couple of questions:

  1. Have you or anyone else ever built this on a Mac? If so, any hints on getting it built? I run ruby extconf.rb and it is unable to locate isc_attach_database(). Suggestions?
  2. Once I have it compiled, will I be able to access a remote database? Specifically, I'd like to run my ruby code on a Mac, at least during development, but it will need to access a database hosted on a Windows machine. Should that work? Or am I wasting my time.

Thanks again for your work.

Steve

rowland commented 13 years ago

Yes, I develop it first on a Mac (although I haven't tried Lion yet) and test later on Linux and Windows.

Something about how Mac frameworks and Ruby work causes the library test to fail, but it still creates the Makefile.

You'll still be able to build and connect to local and remote databases, provided you have Firebird installed. I've not seen a Firebird client-only package for Mac.

Best regards,

Brent

On Aug 10, 2011, at 8:30 AM, newellista wrote:

Couple of questions:

  1. Have you or anyone else ever built this on a Mac? If so, any hints on getting it built? I run ruby extconf.rb and it is unable to locate isc_attach_database(). Suggestions?
  2. Once I have it compiled, will I be able to access a remote database? Specifically, I'd like to run my ruby code on a Mac, at least during development, but it will need to access a database hosted on a Windows machine. Should that work? Or am I wasting my time.

Thanks again for you work.

Steve

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1773572

newellista commented 13 years ago

Great. So, on Snow Leopard, how do I build and install it?

I ran the following:

$ ruby extconf.rb checking for isc_attach_database() in -lfbclient... no checking for isc_attach_database() in -lgds... no creating Makefile $ make gcc -I. -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Library/Frameworks/Firebird.framework/Headers -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -DOS_UNIX -o fb.o -c fb.c gcc -dynamic -bundle -o fb.bundle fb.o -L. -L/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/lib -L. -L/usr/local/lib -framework Firebird -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc

Now what?

do I run:

$ make site-install

??

Thanks,

Steve

On Aug 10, 2011, at 11:51 AM, rowland wrote:

Yes, I develop it first on a Mac (although I haven't tried Lion yet) and test later on Linux and Windows.

Something about how Mac frameworks and Ruby work causes the library test to fail, but it still creates the Makefile.

You'll still be able to build and connect to local and remote databases, provided you have Firebird installed. I've not seen a Firebird client-only package for Mac.

Best regards,

Brent

On Aug 10, 2011, at 8:30 AM, newellista wrote:

Couple of questions:

  1. Have you or anyone else ever built this on a Mac? If so, any hints on getting it built? I run ruby extconf.rb and it is unable to locate isc_attach_database(). Suggestions?
  2. Once I have it compiled, will I be able to access a remote database? Specifically, I'd like to run my ruby code on a Mac, at least during development, but it will need to access a database hosted on a Windows machine. Should that work? Or am I wasting my time.

Thanks again for you work.

Steve

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1773572

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1774914

rowland commented 13 years ago

"make install" will work. However, you may prefer "ruby fb.gemspec" and then "gem install fb-0.6.8.gem"

Brent

On Aug 10, 2011, at 11:14 AM, newellista wrote:

Great. So, on Snow Leopard, how do I build and install it?

I ran the following:

$ ruby extconf.rb checking for isc_attach_database() in -lfbclient... no checking for isc_attach_database() in -lgds... no creating Makefile $ make gcc -I. -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Library/Frameworks/Firebird.framework/Headers -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -DOS_UNIX -o fb.o -c fb.c gcc -dynamic -bundle -o fb.bundle fb.o -L. -L/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/lib -L. -L/usr/local/lib -framework Firebird -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc

Now what?

do I run:

$ make site-install

??

Thanks,

Steve

On Aug 10, 2011, at 11:51 AM, rowland wrote:

Yes, I develop it first on a Mac (although I haven't tried Lion yet) and test later on Linux and Windows.

Something about how Mac frameworks and Ruby work causes the library test to fail, but it still creates the Makefile.

You'll still be able to build and connect to local and remote databases, provided you have Firebird installed. I've not seen a Firebird client-only package for Mac.

Best regards,

Brent

On Aug 10, 2011, at 8:30 AM, newellista wrote:

Couple of questions:

  1. Have you or anyone else ever built this on a Mac? If so, any hints on getting it built? I run ruby extconf.rb and it is unable to locate isc_attach_database(). Suggestions?
  2. Once I have it compiled, will I be able to access a remote database? Specifically, I'd like to run my ruby code on a Mac, at least during development, but it will need to access a database hosted on a Windows machine. Should that work? Or am I wasting my time.

Thanks again for you work.

Steve

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1773572

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1774914

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1775170

newellista commented 13 years ago

Thanks

On Aug 10, 2011, at 12:29 PM, rowland wrote:

"make install" will work. However, you may prefer "ruby fb.gemspec" and then "gem install fb-0.6.8.gem"

Brent

On Aug 10, 2011, at 11:14 AM, newellista wrote:

Great. So, on Snow Leopard, how do I build and install it?

I ran the following:

$ ruby extconf.rb checking for isc_attach_database() in -lfbclient... no checking for isc_attach_database() in -lgds... no creating Makefile $ make gcc -I. -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/x86_64-darwin10.7.0 -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1/ruby/backward -I/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Library/Frameworks/Firebird.framework/Headers -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -DOS_UNIX -o fb.o -c fb.c gcc -dynamic -bundle -o fb.bundle fb.o -L. -L/Users/snewell/.rvm/rubies/ruby-1.9.2-p180/lib -L. -L/usr/local/lib -framework Firebird -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -lruby.1.9.1 -lpthread -ldl -lobjc

Now what?

do I run:

$ make site-install

??

Thanks,

Steve

On Aug 10, 2011, at 11:51 AM, rowland wrote:

Yes, I develop it first on a Mac (although I haven't tried Lion yet) and test later on Linux and Windows.

Something about how Mac frameworks and Ruby work causes the library test to fail, but it still creates the Makefile.

You'll still be able to build and connect to local and remote databases, provided you have Firebird installed. I've not seen a Firebird client-only package for Mac.

Best regards,

Brent

On Aug 10, 2011, at 8:30 AM, newellista wrote:

Couple of questions:

  1. Have you or anyone else ever built this on a Mac? If so, any hints on getting it built? I run ruby extconf.rb and it is unable to locate isc_attach_database(). Suggestions?
  2. Once I have it compiled, will I be able to access a remote database? Specifically, I'd like to run my ruby code on a Mac, at least during development, but it will need to access a database hosted on a Windows machine. Should that work? Or am I wasting my time.

Thanks again for you work.

Steve

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1773572

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1774914

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1775170

Reply to this email directly or view it on GitHub: https://github.com/rowland/fb/issues/13#issuecomment-1775308