[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Installing Ruby, Sqlite3, Sqlite3-Ruby on Cygwin

Charles Roper

4/23/2007 4:49:00 PM

I tried following the steps posted but I get the following error when I
run gem install sqlite3-ruby-1.2.1.gem

charlesr@BRC_IT_OFFICER /cygdrive/t/~Charles/sqlite-3.3.16/bld
$ gem install sqlite3-ruby-1.2.1.gem
Building native extensions. This could take a while...
ERROR: While executing gem ... (RuntimeError)
Error instaling sqlite3-ruby-1.2.1.gem:
ERROR: Failed to build gem native extension.

ruby extconf.rb install sqlite3-ruby-1.2.1.gem
checking for sqlite3.h... no

make
make: *** No rule to make target `ruby.h', needed by
`sqlite3_api_wrap.o'. Stop
7 Answers

Phillip Gawlowski

4/23/2007 4:57:00 PM

0

Charles Roper wrote:
> I tried following the steps posted but I get the following error when I
> run gem install sqlite3-ruby-1.2.1.gem
>
> charlesr@BRC_IT_OFFICER /cygdrive/t/~Charles/sqlite-3.3.16/bld
> $ gem install sqlite3-ruby-1.2.1.gem
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (RuntimeError)
> Error instaling sqlite3-ruby-1.2.1.gem:
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install sqlite3-ruby-1.2.1.gem
> checking for sqlite3.h... no

This line is a good hint: You don't have the SQLite3 sources available
for compilation.


--
Phillip "CynicalRyan" Gawlowski
http://cynicalryan....
http://clothred.rub...

Rule of Open-Source Programming #34:

Every successful project will eventually spawn a sub-project

Charles Roper

4/23/2007 5:47:00 PM

0

Phillip Gawlowski wrote:
> Charles Roper wrote:
>> ruby extconf.rb install sqlite3-ruby-1.2.1.gem
>> checking for sqlite3.h... no
>
> This line is a good hint: You don't have the SQLite3 sources available
> for compilation.

Thanks for the reply Phillip. I don't understand why the sources aren't
available. I've followed the instructions posted originally
(http://www.ruby-...topic/99...) and I'm running my gem
install sqlite3-ruby from the bld directory where all of the sources
appear to reside, including sqlite3.h. So I'm a bit lost as to what to
try next.

Charles

--
Posted via http://www.ruby-....

Brian Candler

4/23/2007 7:41:00 PM

0

On Tue, Apr 24, 2007 at 01:49:03AM +0900, Charles Roper wrote:
> I tried following the steps posted but I get the following error when I
> run gem install sqlite3-ruby-1.2.1.gem
>
> charlesr@BRC_IT_OFFICER /cygdrive/t/~Charles/sqlite-3.3.16/bld
> $ gem install sqlite3-ruby-1.2.1.gem
> Building native extensions. This could take a while...
> ERROR: While executing gem ... (RuntimeError)
> Error instaling sqlite3-ruby-1.2.1.gem:
> ERROR: Failed to build gem native extension.
>
> ruby extconf.rb install sqlite3-ruby-1.2.1.gem
> checking for sqlite3.h... no
>
> make
> make: *** No rule to make target `ruby.h', needed by
> `sqlite3_api_wrap.o'. Stop
> .

You don't have the Ruby header files available.

I could tell you how to fix this if it were Ubuntu or Debian Linux:

apt-get install ruby1.8-dev

But I'm afraid I don't know how to fix it for your Windows setup. Perhaps
the Ruby package you're using comes in several parts, like Debian does.

Charles Roper

4/24/2007 12:08:00 PM

0

Brian Candler wrote:
> On Tue, Apr 24, 2007 at 01:49:03AM +0900, Charles Roper wrote:
>> ruby extconf.rb install sqlite3-ruby-1.2.1.gem
>> checking for sqlite3.h... no
>>
>> make
>> make: *** No rule to make target `ruby.h', needed by
>> `sqlite3_api_wrap.o'. Stop
>> .
>
> You don't have the Ruby header files available.
>
> I could tell you how to fix this if it were Ubuntu or Debian Linux:
>
> apt-get install ruby1.8-dev
>
> But I'm afraid I don't know how to fix it for your Windows setup.
> Perhaps
> the Ruby package you're using comes in several parts, like Debian does.

Thanks Brian. I've obtained the Ruby source files from the Cygwin setup
utility (package manager) and they reside in /usr/src/ruby-1.8.5-3.

Chris Lowis kindly provided me a link to a post he made, but
unfortunately this didn't work either.

It seems that the process is failing at the make install stage:

$ make install
rm -rf tsrc
mkdir -p tsrc
cp ../src/alter.c ../src/analyze.c ../src/attach.c ../src/auth.c
../src/btree.c ../src/btree.h ../src/build.c ../src/callback.c
../src/complete.c ../src/date.c ../src/delete.c ../src/expr.c
../src/func.c ../src/hash.c ../src/hash.h ../src/insert.c
../src/legacy.c ../src/loadext.c ../src/main.c ../src/os.c
../src/os_unix.c ../src/os_win.c ../src/os_os2.c ../src/pager.c
../src/pager.h ../src/parse.y ../src/pragma.c ../src/prepare.c
../src/printf.c ../src/random.c ../src/select.c ../src/shell.c
../src/sqlite.h.in ../src/sqliteInt.h ../src/table.c ../src/tclsqlite.c
../src/tokenize.c ../src/trigger.c ../src/utf.c ../src/update.c
../src/util.c ../src/vacuum.c ../src/vdbe.c ../src/vdbe.h
../src/vdbeapi.c ../src/vdbeaux.c ../src/vdbefifo.c ../src/vdbemem.c
../src/vdbeInt.h ../src/vtab.c ../src/where.c ../ext/fts1/fts1.c
../ext/fts1/fts1.h ../ext/fts1/fts1_hash.c ../ext/fts1/fts1_hash.h
../ext/fts1/fts1_porter.c ../ext/fts1/fts1_tokenizer.h
../ext/fts1/fts1_tokenizer1.c sqlite3.h ../src/btree.h ../src/hash.h
opcodes.h ../src/os.h ../src/os_common.h ../src/sqlite3ext.h
../src/sqliteInt.h ../src/vdbe.h parse.h ../ext/fts1/fts1.h
../ext/fts1/fts1_hash.h ../ext/fts1/fts1_tokenizer.h ../src/vdbeInt.h
tsrc
cp: warning: source file `../src/btree.h' specified more than once
cp: warning: source file `../src/hash.h' specified more than once
cp: warning: source file `../src/sqliteInt.h' specified more than once
cp: warning: source file `../src/vdbe.h' specified more than once
cp: warning: source file `../ext/fts1/fts1.h' specified more than once
cp: warning: source file `../ext/fts1/fts1_hash.h' specified more than
once
cp: warning: source file `../ext/fts1/fts1_tokenizer.h' specified more
than once
cp: warning: source file `../src/vdbeInt.h' specified more than once
rm tsrc/sqlite.h.in tsrc/parse.y
cp parse.c opcodes.c keywordhash.h tsrc
tclsh ../tool/mksqlite3c.tcl
cc sqlite3.c -o sqlite3
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):(.text+0xab):
undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1

*sigh*. I've not had any problems with Cygwin up until now, but I've
spent the best part of a day on this and it's proving to be
excruciatingly frustrating.

Charles

--
Posted via http://www.ruby-....

Charles Roper

4/24/2007 1:02:00 PM

0

Finally managed to get it going using the precompiled Windows binaries
and a little help from Chris' instructions
(http://chrislowis.co.uk/...). All I had to do in the end was
install the Windows binaries into a directory in the Windows PATH and
then make the change to the api.rb file as Chris suggests. So that
works. Phew. I can get on with some work now. :)

Many thanks to all who helped with this; it is greatly appreciated.

Charles

--
Posted via http://www.ruby-....

Charles Roper

4/26/2007 11:13:00 AM

0

Charles Roper wrote:
> Finally managed to get it going using the precompiled Windows binaries
> and a little help from Chris' instructions
> (http://chrislowis.co.uk/...). All I had to do in the end was
> install the Windows binaries into a directory in the Windows PATH and
> then make the change to the api.rb file as Chris suggests. So that
> works. Phew. I can get on with some work now. :)

I just wanted to follow this up for those Googling this same problem.
"pnomolos" on the E-TextEditor forum discovered a much more elegant and
robust solution:

http://www.e-texteditor.com/forum/viewtopic.php?p...

Be sure to note my reply to save a few minutes of head-scratching.

Charles


--
Posted via http://www.ruby-....

Chris Lowis

4/26/2007 3:14:00 PM

0

> Finally managed to get it going using the precompiled Windows binaries
> and a little help from Chris' instructions
> (http://chrislowis.co.uk/...). All I had to do in the end was

I'm glad it worked for you !

Chris

--
Posted via http://www.ruby-....