do_msql errors when installing on OS X 10.4 (PowerPC)

12 views
Skip to first unread message

kenderson

unread,
Feb 5, 2009, 10:20:36 PM2/5/09
to DataMapper
I am attempting to install merb, and like alot of people, I am running
into a strange error when installing the do_mysql gem. I have been
combing the posts, and I dont see anything that is real similar to
this one. Any help is greatly appreciated! The install error is as
reads below;

macbox:/ my_user$ sudo gem install do_mysql
Password:
Building native extensions. This could take a while...
ERROR: Error installing do_mysql:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb install do_mysql
checking for mysql.h... yes
checking for main() in -lmysqlclient... yes
checking for mysql_query()... yes
checking for mysql_ssl_set()... yes
creating Makefile

make
gcc -I. -I. -I/usr/local/lib/ruby/1.8/powerpc-darwin8.11.0 -I. -
DHAVE_MYSQL_H -DHAVE_MYSQL_QUERY -DHAVE_MYSQL_SSL_SET -I/usr/local/
mysql/include -Os -arch ppc -fno-common -fno-common -D_XOPEN_SOURCE=1
-fno-common -pipe -fno-common -Wall -c do_mysql_ext.c
do_mysql_ext.c: In function 'infer_ruby_type':
do_mysql_ext.c:90: error: 'MYSQL_TYPE_BIT' undeclared (first use in
this function)
do_mysql_ext.c:90: error: (Each undeclared identifier is reported only
once
do_mysql_ext.c:90: error: for each function it appears in.)
do_mysql_ext.c:100: error: 'MYSQL_TYPE_NEWDECIMAL' undeclared (first
use in this function)
do_mysql_ext.c: In function 'cConnection_initialize':
do_mysql_ext.c:499: error: 'MYSQL_OPT_RECONNECT' undeclared (first use
in this function)
make: *** [do_mysql_ext.o] Error 1


Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/
do_mysql-0.9.11 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/do_mysql-0.9.11/
ext/do_mysql_ext/gem_make.out

Dan Kubb (dkubb)

unread,
Feb 6, 2009, 2:18:35 AM2/6/09
to DataMapper
kenderson,

> I am attempting to install merb, and like alot of people, I am running
> into a strange error when installing the do_mysql gem.

What version of Ruby and MySQL are you trying do_mysql on?

It's usually a good idea to also try the edge version of DO when you
run into compilation issues:

github.com/datamapper/do

You'll need to install the data_objects gem from that repo, and then
try to install do_mysql using "sudo rake install".

--

Dan
(dkubb)

Dirkjan Bussink

unread,
Feb 6, 2009, 3:38:37 AM2/6/09
to datam...@googlegroups.com

This look like a pretty old version of MySQL, perhaps one from the 4.1
series? I don't have a box that is still running that version, so
backwards compatibility is always a pain in those cases. I could
probably make some stuff conditional here so it will compile on your
system, but I need some more details for that.

--
Regards,

Dirkjan Bussink

kenderson

unread,
Feb 6, 2009, 5:43:51 PM2/6/09
to DataMapper
Dan,
Thanks for such a quick reply! Below is a list of the current gems
I have installed. My most recent attempts have been with the edge
version (as you will notice data_objects is V-0.9.12 and extlib is
V-0.9.11). I am running ruby 1.8.6 and MySQL 4.1.20. Recommend to
update?

Thanks Again! Kenderson

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.2.2, 2.1.2, 2.1.0, 2.0.2, 1.3.6, 1.3.5, 1.3.3, 1.2.5)
actionpack (2.2.2, 2.1.2, 2.1.0, 2.0.2, 1.13.6, 1.13.5, 1.13.3,
1.12.5)
actionwebservice (1.2.6, 1.2.5, 1.2.3, 1.1.6)
activerecord (2.2.2, 2.1.2, 2.1.0, 2.0.2, 1.15.6, 1.15.5, 1.15.3,
1.14.4)
activeresource (2.2.2, 2.1.2, 2.1.0, 2.0.2)
activesupport (2.2.2, 2.1.2, 2.1.0, 2.0.2, 1.4.4, 1.4.2, 1.3.1)
addressable (2.0.1)
arrayfields (4.6.0)
aws-s3 (0.4.0)
bcrypt-ruby (2.0.3)
builder (2.1.2)
capistrano (2.5.3, 2.2.0, 1.4.1)
capistrano-ext (1.2.1)
cgi_multipart_eof_fix (2.5.0, 2.1)
chronic (0.2.3)
columnize (0.1)
cucumber (0.1.16)
daemons (1.0.10, 1.0.9, 1.0.5, 1.0.2)
data_objects (0.9.12, 0.9.11)
datamapper (0.9.10)
diff-lcs (1.1.2)
dm-aggregates (0.9.10)
dm-cli (0.9.10)
dm-core (0.9.10)
dm-is-tree (0.9.10)
dm-migrations (0.9.10)
dm-observer (0.9.10)
dm-serializer (0.9.10)
dm-timestamps (0.9.10)
dm-types (0.9.10)
dm-validations (0.9.10)
do_sqlite3 (0.9.10.1)
erubis (2.6.2)
extlib (0.9.11, 0.9.10, 0.9.9)
fastthread (1.0.1, 1.0)
fattr (1.0.3)
fcgi (0.8.7)
fiveruns_manage (1.1.0, 1.0.2)
fiveruns_tuneup (0.8.17)
gem_plugin (0.2.3, 0.2.2, 0.2.1)
google4r-checkout (1.0.3)
haml (2.0.6, 2.0.2)
highline (1.5.0)
hoe (1.8.3, 1.5.1, 1.5.0)
hpricot (0.6.164, 0.6)
httparty (0.2.2)
icalendar (1.0.2)
image_science (1.1.3)
json (1.1.3, 1.1.2)
json_pure (1.1.3)
launchy (0.3.2)
linecache (0.43)
mailfactory (1.4.0)
main (2.8.3)
mbleigh-subdomain-fu (0.0.2)
memcache-client (1.5.0)
merb (1.0.8.1)
merb-action-args (1.0.8.1)
merb-assets (1.0.8.1)
merb-auth (1.0.8.1)
merb-auth-core (1.0.8.1)
merb-auth-more (1.0.8.1)
merb-auth-slice-password (1.0.8.1)
merb-cache (1.0.8.1)
merb-core (1.0.8.1)
merb-exceptions (1.0.8.1)
merb-gen (1.0.8.1)
merb-haml (1.0.8.1)
merb-helpers (1.0.8.1)
merb-mailer (1.0.8.1)
merb-more (1.0.8.1)
merb-param-protection (1.0.8.1)
merb-slices (1.0.8.1)
merb_datamapper (1.0.8.1)
mime-types (1.15)
mislav-will_paginate (2.3.2)
money (2.0.0)
mongrel (1.1.4, 1.0.1, 0.3.13.4)
mysql (2.7)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1, 1.1.0)
net-ssh (2.0.6, 1.1.2)
net-ssh-gateway (1.0.0)
nkallen-cache-money (0.2.5)
nokogiri (1.1.1)
packet (0.1.5)
parseexcel (0.5.2)
ParseTree (3.0.2)
polyglot (0.2.4)
prawn (0.1.2)
rack (0.9.1)
radiant (0.6.4, 0.6.2)
rails (2.2.2, 2.1.2, 2.1.0, 2.0.2, 1.2.6, 1.2.5, 1.2.3, 1.1.6)
rake (0.8.3, 0.8.1, 0.7.2, 0.7.1)
randexp (0.1.4)
rb-appscript (0.5.1)
rcov (0.8.1.2.0)
RedCloth (3.0.4)
right_aws (1.7.3)
right_http_connection (1.2.3)
rspec (1.1.12, 1.1.4)
ruby-debug (0.10.1)
ruby-debug-base (0.10.1, 0.10.0)
ruby-debug-ide (0.1.10)
ruby2ruby (1.2.1)
rubyforge (1.0.2, 1.0.1, 0.4.5, 0.4.4)
rubygems-update (1.3.1, 1.2.0, 1.1.0, 1.0.1)
RubyInline (3.8.1)
rubyist-aasm (2.0.2)
rubyzip (0.9.1)
sexp_processor (3.0.0)
sources (0.0.1)
sqlite3-ruby (1.2.1)
staticmatic (0.9.4)
templater (0.5.0)
term-ansicolor (1.0.3)
thor (0.9.9)
treetop (1.2.4)
twitter (0.3.8)
tzinfo (0.3.8)
uuidtools (1.0.7)
webrat (0.4.1)
will_paginate (2.2.2)
xml-simple (1.0.11)
ZenTest (3.11.0)

kenderson

unread,
Feb 6, 2009, 5:46:01 PM2/6/09
to DataMapper
Dirkjan,
Thanks for such a quick reply! Instead of reposting all of my
current local gems (long list), I will point you towards my response
to Dan (see above post). My most recent attempts have been with the
edge version (as you will notice data_objects is V-0.9.12 and extlib
is V-0.9.11). I am running ruby 1.8.6 and MySQL 4.1.20. Recommend to
update?

Thanks Again! Kenderson

On Feb 6, 3:38 am, Dirkjan Bussink <d.buss...@gmail.com> wrote:

Dan Kubb (dkubb)

unread,
Feb 6, 2009, 6:03:36 PM2/6/09
to DataMapper
kernderson

>    Thanks for such a quick reply! Instead of reposting all of my
> current local gems (long list), I will point you towards my response
> to Dan (see above post). My most recent attempts have been with the
> edge version (as you will notice data_objects is V-0.9.12 and extlib
> is V-0.9.11). I am running ruby 1.8.6 and MySQL 4.1.20. Recommend to
> update?

MySQL 4.1 is only receiving end-of-life support from MySQL now, so
it's probably a good idea to upgrade. They aren't applying any more
bug fixes to MySQL 4.1, the only fixes will be security related fixes.

--

Dan
(dkub)

Dirkjan Bussink

unread,
Feb 7, 2009, 2:15:36 AM2/7/09
to datam...@googlegroups.com

On 6 Feb 2009, at 23:46, kenderson wrote:

> Thanks for such a quick reply! Instead of reposting all of my
> current local gems (long list), I will point you towards my response
> to Dan (see above post). My most recent attempts have been with the
> edge version (as you will notice data_objects is V-0.9.12 and extlib
> is V-0.9.11). I am running ruby 1.8.6 and MySQL 4.1.20. Recommend to
> update?

While I would still really advise to upgrade to a more recent and
maintained MySQL version, I would like you to try the following patch
to see whether that makes it at least compile on MySQL 4.1:

http://gist.github.com/59806

If you're in the DO git clone, you can apply this to it and then rake
install to see whether it compiles. If you have problems, you can
always pop in on #datamapper on IRC (I'm usually around during CET on
work days).

--
Regards,

Dirkjan Bussink

Dan Kubb (dkubb)

unread,
Feb 7, 2009, 4:59:13 AM2/7/09
to DataMapper
kenderson,

> > I am running ruby 1.8.6 and MySQL 4.1.20. Recommend to
> > update?
>
> MySQL 4.1 is only receiving end-of-life support from MySQL now, so
> it's probably a good idea to upgrade. They aren't applying any more
> bug fixes to MySQL 4.1, the only fixes will be security related fixes.

I should add that even though I'm recommending you upgrade, I am
willing to update DataMapper so it works with older versions of
databases. My only concern would be that the code path not diverge
too much from the normal path. If for example, we had to maintain a
completely different set of SQL generation methods for one version of
a database as another I probably would not be inclined to support that
version.

As of right now regular testing is only happening against the latest
stable versions of each DB. Once I, or someone else in the community,
gets the time to set up a proper CI system this could change. We
would then be able to set up multiple DBs and run the specs against
them on each change, whereas now we have to do it manually and it is
too time consuming to be done consistently.

--

Dan
(dkubb)

kenderson

unread,
Feb 7, 2009, 7:07:47 PM2/7/09
to DataMapper
Dan and Dirkjan,
Thanks for the hints - the problem was with the 4.1 MYSQL. After
updating to 5.0 everything resolved. For other people reading this
post that are looking for good directions on updating mysql: (http://
www.entropy.ch/software/macosx/mysql/#reinit).

Thanks Again!
Ken Henderson (Kenderson)
Reply all
Reply to author
Forward
0 new messages