Help with Mysql package

J

jake

I am trying to install the Mysql package, I have tried in CPAN as well
as just in the command line, I even tried it as root. What I am getting
is "make had returned bad status, install seams impossible."

Anyone know what I need to do? I all ready installed DBI. I'm not sure
what more it wants from me?

Thanks

Jake
 
R

robic0

Just a FYI. This is the Perl Language forum Jake, you might be
construed as "off-topic" here
depending on wheather the 3 or 4 John Henry's here know the answer to
your question. I don't,
but could find out for you.... Just to let you know.
 
A

A. Sinan Unur

jake said:
I am trying to install the Mysql package, I have tried in CPAN as well
as just in the command line, I even tried it as root. What I am getting
is "make had returned bad status, install seams impossible."

Anyone know what I need to do? I all ready installed DBI. I'm not sure
what more it wants from me?

I am not either. I am not sure if there is an OS-specific solution to your
situation (like FreeBSD ports or Linux RPMs etc), but did you try:

perl -MCPAN -e 'install Bundle::DBD::mysql'

(see <URL: http://search.cpan.org/~rudy/DBD-mysql-2.9004/lib/Bundle/DBD/mysql.pm>
for more information).

Sinan
 
A

A. Sinan Unur

Just a FYI. This is the Perl Language forum Jake, you might be
construed as "off-topic" here
depending on wheather the 3 or 4 John Henry's here know the answer to
your question. I don't,
but could find out for you.... Just to let you know.

You've got it wrong, because his question involves the installation of a
CPAN module.

On the other hand, the oP could have been more helpful (see the posting
guidelines for this group) by providing more information on the specific
environment, versions, error messages etc.

Sinan
 
R

robic0

JH #1
Please quote selected excerpts from "the posting guidelines" when
referring to inacuracies.
 
J

jake

A. Sinan Unur:
On the other hand, the oP could have been more helpful (see the
posting guidelines for this group) by providing more information on
the specific environment, versions, error messages etc.

I was not thinking that this is a platform specific issue.
perl -MCPAN -e 'install Bundle::DBD::mysql'

Gives me the same error, just in a tad bit fancier maner.

Now I am thinking it is a platform specific issue, I'm running OSX
10.3.9 and I found a topic on MySql's site which seamed like the same
issue. It still doesn't work and I haven't figured out if it made it
better or wose.
http://lists.mysql.com/perl/3421

Sorry if it's off topic.
I was just looking at the perl not the lang.
 
A

A. Sinan Unur

A. Sinan Unur:


I was not thinking that this is a platform specific issue.

It may not be. However, there are differences across platforms and Perl
distributions in how one installs Perl modules. On FreeBSD, I used the
ports system. On Windows XP, I use ActiveState's ppm. In the latter
environment, modules are not built from source, but they are distributed
in binary format. You can see how platform specific information can be
of help.
Gives me the same error, just in a tad bit fancier maner.

It would be useful to see what the exact error is. That is, the contents
of a log file or even a straight copy and paste from the shell window
would do wonders. Please do read the posting guidelines.
Now I am thinking it is a platform specific issue, I'm running OSX
10.3.9 and I found a topic on MySql's site which seamed like the same
issue. It still doesn't work and I haven't figured out if it made it
better or wose.
http://lists.mysql.com/perl/3421

Does the following help?

http://www.quicomm.com/apm_dbddbi.htm
Sorry if it's off topic. I was just looking at the perl not the lang.

It is definitely not off-topic, but you will need to put in some more
work when composing your post to help others help you.

Sinan.
 
J

jake

A. Sinan Unur:

That is what I tried first.

Then I found the article on changing the Config.pm file
http://lists.mysql.com/perl/3421

Then I belive after that I tried this tip
http://www.truerwords.net/articles/osx/install_dbd_mysql.html

Currenlty this is my output with make:

......Computer:~/Desktop/DBD-mysql-2.1028 jakobie$ make
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env env
MACOSX_DEVELOPMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup
-L/usr/local/lib dbdimp.o mysql.o -o
blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib
-lmysqlclient -lz -lm
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1
 
A

A. Sinan Unur

A. Sinan Unur:


That is what I tried first.

Then I found the article on changing the Config.pm file
http://lists.mysql.com/perl/3421

Then I belive after that I tried this tip
http://www.truerwords.net/articles/osx/install_dbd_mysql.html

I see the problem now, but I am helpless, because I do not have an OSX
machine handy. I did notice one thing, however:
Currenlty this is my output with make:

.....Computer:~/Desktop/DBD-mysql-2.1028 jakobie$ make
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env env
MACOSX_DEVELOPMENT_TARGET=10.3

The fact that there are two env's above looks a little suspicious to me.
It *seems* to me that you were supposed to edit *either* Config.pm *or*
the generated makefile, but you edited both and got the above. This *is*
a total shot in the dark, though.

Sinan
 
J

jake

The fact that there are two env's above looks a little >suspicious to
me.
It *seems* to me that you were supposed to edit >*either* Config.pm *or*
the generated makefile, but you edited both and got >the above. This *is*
a total shot in the dark, though.

I tried the different tips individually. My bad for not stating that
before.

I am assuming what ever the problem is from where I am now is I am
missing a lib in usr/local/. The question then is what library? Do I
need to get something from MySql?
 
A

A. Sinan Unur

I tried the different tips individually. My bad for not stating that
before.

I am assuming what ever the problem is from where I am now is I am
missing a lib in usr/local/.

No, that is a red herring.

/usr/local/lib is commonly the top directory where custom/user libraries
go (rather than system) on Unix systems. AFAIK, on OSX, it does not
exist by default. But that should not be a problem. That's why you only
get a warning for that.

OTOH, quoting from your previous post:
ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1

That tells me that
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env env
MACOSX_DEVELOPMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup

MACOSX_DEVELOPMENT_TARGET=10.3 above is not being set before cc is
called.

The only reason I think of as to why it would not be set is the double
env's. So, if I were in your shoes, I would try and find why there are
two env's above.

Sinan
 
S

Sherm Pendley

jake said:
Now I am thinking it is a platform specific issue, I'm running OSX
10.3.9 and I found a topic on MySql's site which seamed like the same
issue. It still doesn't work and I haven't figured out if it made it
better or wose.
http://lists.mysql.com/perl/3421

The problem discussed at that page is relevant, and the solution there is
correct. (You'd be amazed at how much cargo-culted BS gets passed around
concerning that one...)

That doesn't necessarily mean it's the *only* problem you might have though.

Have a look at <http://lists.perl.org>, and check the archives for the
"macosx" mailing list that's hosted there. Installing DBD::Mysql has been
discussed to death on that list, so odds are good you can find help there.
You'll also find the original message from Ed Moy where he first mentioned
the solution that's repeated at mysql.com - Ed is Apple's Perl guy, so you
know the answer is good.

Without seeing the specific error message all anyone can do is guess... but
let me ask a potentially stupid question: You *have* installed Xcode,
right? You need a compiler to compile things... :)
Sorry if it's off topic.

It's not. The guy who's complaining posted a message that *was* off-topic
and got slapped for it. Now we wants to whine about how mean we are.

sherm--
 
S

Sherm Pendley

A. Sinan Unur said:
The fact that there are two env's above looks a little suspicious to me.
It *seems* to me that you were supposed to edit *either* Config.pm *or*
the generated makefile, but you edited both and got the above. This *is*
a total shot in the dark, though.

Maybe so, but it's spot-on. If you fix the problem at its source (as Apple's
Perl guy, Ed Moy, has suggested), the generated makefile will be correct.

sherm--
 
S

Sherm Pendley

jake said:
I am assuming what ever the problem is from where I am now is I am
missing a lib in usr/local/.

Why would you assume that? The error message you posted doesn't say anything
about a missing library.

The error is right here:
ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1

It looks like GCC 2.95/Mac OS X 10.1 is your default deployment target. (If
memory serves, some upgrade paths can lead to that situation; also,
upgrading to Panther without also upgrading to Xcode might do it.)

Try "gcc_select" to display the current compiler version that's enabled by
default. Use "sudo gcc_select 3.3" to make GCC 3.3 the default, if it's not
the default already. If GCC 3.3 isn't listed, download and install the
latest Xcode for Panther.

sherm--
 
S

Sherm Pendley

A. Sinan Unur said:
ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1

MACOSX_DEVELOPMENT_TARGET=10.3 above is not being set before cc is
called.

I'm beginning to understand why Uri complains so much about English.pm.
All-caps makes things hard to read.

DEVELOPMENT ne DEPLOYMENT.

As Uri would say "ouch, my eyes! i'm blind!" :)

sherm--
 
J

jake

Yes I do have XCode installed. I'm working off of a fresh clean
installation of 10.3 updated to 10.3.9.

I decided to go start to finish
First I changed Config.pm back to it's orig state. And deleted all the
DBD-mysql folders I worked with today.

By default after Getting a Looks Good from Makefile and running make
this is what I get:

cp lib/Mysql.pm blib/lib/Mysql.pm
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/Mysql/Statement.pm blib/lib/Mysql/Statement.pm
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/
-I/usr/local/mysql/include -fno-omit-frame-pointer -g -pipe -pipe
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing
-I/usr/local/include -Os -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\"
"-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"
dbdimp.c
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g"
/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI//Driver.xst >
mysql.xsi
/usr/bin/perl /System/Library/Perl/5.8.1/ExtUtils/xsubpp -typemap
/System/Library/Perl/5.8.1/ExtUtils/typemap mysql.xs > mysql.xsc && mv
mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line
196
Warning: duplicate function definition 'rows' detected in mysql.xs,
line 294
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/
-I/usr/local/mysql/include -fno-omit-frame-pointer -g -pipe -pipe
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing
-I/usr/local/include -Os -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\"
"-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"
mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld
MACOSX_DEVELOPMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup
-L/usr/local/lib dbdimp.o mysql.o -o
blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib
-lmysqlclient -lz -lm
Make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 255

Now, changing Config.pm to say

ld='env MACOSX_DEVELOPMENT_TARGET=10.3 cc'

insted of

ld='MACOSX_DEVELOPMENT_TARGET=10.3 cc'

running makefile I get:

I will use the following settings for compiling and testing:

cflags (mysql_config) = -I/usr/local/mysql/include
-fno-omit-frame-pointer
libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient
-lz -lm
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (Users choice) = test
testhost (Users choice) = localhost
testpassword (default ) =
testuser (Users choice) = root

To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.

'' is not a known MakeMaker parameter name.
Using DBI 1.48 (for perl 5.008001 on darwin-thread-multi-2level)
installed in /Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/
Writing Makefile for DBD::mysql

Running make I get:

cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/
-I/usr/local/mysql/include -fno-omit-frame-pointer -g -pipe -pipe
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing
-I/usr/local/include -Os -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\"
"-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"
dbdimp.c
cc -c -I/Library/Perl/5.8.1/darwin-thread-multi-2level/auto/DBI/
-I/usr/local/mysql/include -fno-omit-frame-pointer -g -pipe -pipe
-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing
-I/usr/local/include -Os -DVERSION=\"2.9004\" -DXS_VERSION=\"2.9004\"
"-I/System/Library/Perl/5.8.1/darwin-thread-multi-2level/CORE"
mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.bundle
LD_RUN_PATH="/usr/lib" /usr/bin/perl myld env
MACOSX_DEVELOPMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup
-L/usr/local/lib dbdimp.o mysql.o -o
blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib
-lmysqlclient -lz -lm
ld: warning -L: directory name (/usr/local/lib) does not exist
ld: flag: -undefined dynamic_lookup can't be used with
MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1
chmod 755 blib/arch/auto/DBD/mysql/mysql.bundle
chmod: blib/arch/auto/DBD/mysql/mysql.bundle: No such file or directory
Make: *** [blib/arch/auto/DBD/mysql/mysql.bundle] Error 1
 
M

Martin Kissner

jake wrote :
Yes I do have XCode installed. I'm working off of a fresh clean
installation of 10.3 updated to 10.3.9.

I decided to go start to finish
First I changed Config.pm back to it's orig state. And deleted all the
DBD-mysql folders I worked with today.

By default after Getting a Looks Good from Makefile and running make
this is what I get:

[...]

I had trouble installing 'DBD::mysql' under Mac OS X, too (took me a few
hours).
I tried the installation of 'DBD::mysql' with
mysql-standard-4.0.17-apple-darwin6.8-powerpc and with
mysql-standard-4.0.23-apple-darwin7.6.0-powerpc

In my case the problem was, that the 'mysql_config'-script did not
return the correct pathes to the libs and so on.

For example it returned '/usr/local/mysql/include/mysql' instead of
'/usr/local/mysql/include/'

I finally edited the script and changed line 77 from

pkglibdir='/usr/local/mysql/lib/mysql'

to

pkglibdir='/usr/local/mysql/lib'

and line 79 from

pkgincludedir='/usr/local/mysql/include/mysql'

to

pkgincludedir='/usr/local/mysql/include'

I do not know, if this helps you, but I hope so.

Best regards
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top