From: Meino Christian Cramer Date: 2004-07-13T14:24:22+09:00 Subject: Re: [ANN] SQLite-Ruby 1.3.0 From: Jamis Buck Subject: Re: [ANN] SQLite-Ruby 1.3.0 Date: Tue, 13 Jul 2004 07:20:05 +0900 Hi Jamis, thank you for your reply ! :) Things I have installed between 1.2.9.1 and 1.3.0 Fox 1.2.6 scintilla 1.6.1 scite 1.6.1 fxscintilla 1.6.1 gem 0.7 fxruby 1.2.0 May be, there is some "bad influence" ? ;) my mkmf.log: have_library: checking for main() in -lsqlite... -------------------- no "gcc -o conftest -I/home/mccramer/tmp/sqlite-ruby-1.3.0/build -I/usr/lib/ruby/1.8/i686-linux -O3 -mtune=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fforce-addr -falign-functions=4 -mpreferred-stack-boundary=2 -msse -m3dnow -mmmx -fPIC conftest.c -L"/usr/lib" -lruby-static -lsqlite -ldl -lcrypt -lm -lc" cc1: error: invalid option `tune=athlon-xp' checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { main(); return 0; } /* end */ "gcc -o conftest -I/home/mccramer/tmp/sqlite-ruby-1.3.0/build -I/usr/lib/ruby/1.8/i686-linux -O3 -mtune=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fforce-addr -falign-functions=4 -mpreferred-stack-boundary=2 -msse -m3dnow -mmmx -fPIC conftest.c -L"/usr/lib" -lruby-static -lsqlite -ldl -lcrypt -lm -lc" cc1: error: invalid option `tune=athlon-xp' checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; } /* end */ -------------------- have_header: checking for sqlite.h... -------------------- no "gcc -E -I/home/mccramer/tmp/sqlite-ruby-1.3.0/build -I/usr/lib/ruby/1.8/i686-linux -O3 -mtune=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fforce-addr -falign-functions=4 -mpreferred-stack-boundary=2 -msse -m3dnow -mmmx -fPIC conftest.c -o conftest.i" cc1: error: invalid option `tune=athlon-xp' checked program was: /* begin */ #include /* end */ -------------------- Now I see the source of bug: It is the "-mtune" option of gcc, which exits in gcc's from version 3.4.x on. This was misinterpreted as "no sqlite installed". BUT: :O) I have installed gcc 3.3.4 (under /usr as normal) and I have a hidden installation of gcc 3.4.1 (under /opt/gcc3.4.n/), which can only be activated by preceeding PATH with the appropiate path to gcc-3.4.1 /manually/ and switching the CFLAGS/CXXFLAGS /manually/. I had installed gcc-3.4.1 for experimenting. When I do a "echo $CFlAGS/$CXXFlAGS" as myself I get: [sqlite-ruby-1.3.0/] :echo $CFLAGS -O3 -m3dnow -march=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2 [sqlite-ruby-1.3.0/] :echo $CXXFLAGS -O3 -m3dnow -march=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2 when I do a "sudo echo $CFlAGS/$CXXFlAGS", which would be equivalent to "sudo ruby install.rb" I get [sqlite-ruby-1.3.0/] :sudo echo $CFLAGS -O3 -m3dnow -march=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2 [sqlite-ruby-1.3.0/] :sudo echo $CXXFLAGS -O3 -m3dnow -march=athlon-xp -mcpu=athlon-xp -mfpmath=sse -funroll-loops -fomit-frame-pointer -fforce-mem -fforce-addr -finline-functions -falign-functions=4 -mpreferred-stack-boundary=2 No "-mtune" option visible so far. I did a "grep -ril mtune" through the sqlite-ruby sources...nothing (as you already know :) What is going on here. Does have SQlite-Ruby the seventh sense here ? :))) Where does the "-mtune" came from ? Kind regards and thank you very much for your help in advance! Meino > Meino Christian Cramer wrote: > > From: Jamis Buck > > Subject: [ANN] SQLite-Ruby 1.3.0 > > Date: Mon, 12 Jul 2004 06:00:23 +0900 > > > > Hi, > > > > I tried to install with > > > > sudo ruby install.rb > > > > which works properly with previous versions (including 1.2.9.1) > > and got > > > > cp ext/extconf.rb ext/sqlite.c build > > cp -r lib build > > cd build > > checking for main() in -lsqlite... no > > checking for sqlite.h... no > > make: *** No targets specified and no makefile found. Stop. > > could not build sqlite module > > > > but ls /usr/lib/libsqlite* gives me: > > > > [sqlite-ruby-1.3.0/] :ls /usr/lib/libsqlite* > > /usr/lib/libsqlite-2.8.13.so.0 /usr/lib/libsqlite.so.0.8.6 > > /usr/lib/libsqlite-2.8.13.so.0.8.6 /usr/lib/libsqlite3.la > > /usr/lib/libsqlite.la /usr/lib/libsqlite3.so > > /usr/lib/libsqlite.so /usr/lib/libsqlite3.so.0 > > /usr/lib/libsqlite.so.0 /usr/lib/libsqlite3.so.0.8.6 > > > > and ls /usr/include/sqlite* > > > > [sqlite-ruby-1.3.0/] :ls /usr/include/sqlite* > > /usr/include/sqlite.h /usr/include/sqlite3.h > > > > so it /seems/ that everything need is installed, but sqlite-ruby does > > not find it. What wnet wrong here ? > > Interesting. Has anyone else had problems? Nothing changed in the setup > scripts between 1.2.9.1 and 1.3.0, so I'm surprised it doesn't work for > you now, when it used to. Could you send me the contents of the mkmf.log > file? (It should be in the 'build' subdirectory that gets created by the > install scripts.) That might help to troubleshoot this. > > -- > Jamis Buck > jgb3@email.byu.edu > http://www.jamisbuck.org/jamis > > "I use octal until I get to 8, and then I switch to decimal." >