Help with Mysql package

Discussion in 'Perl Misc' started by jake, Mar 26, 2005.

  1. jake

    jake Guest

    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
     
    jake, Mar 26, 2005
    #1
    1. Advertising

  2. jake

    Guest

    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.
     
    , Mar 26, 2005
    #2
    1. Advertising

  3. "jake" <> wrote in news::

    > 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. Sinan Unur, Mar 26, 2005
    #3
  4. "" <> wrote in
    news::

    > 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
     
    A. Sinan Unur, Mar 26, 2005
    #4
  5. jake

    Guest

    JH #1
    Please quote selected excerpts from "the posting guidelines" when
    referring to inacuracies.
     
    , Mar 26, 2005
    #5
  6. jake

    jake Guest

    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.
     
    jake, Mar 26, 2005
    #6
  7. "jake" <> wrote in news:1111876924.476274.273040
    @f14g2000cwb.googlegroups.com:

    > 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.


    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.

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

    >
    > 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.
     
    A. Sinan Unur, Mar 26, 2005
    #7
  8. jake

    jake Guest

    A. Sinan Unur:

    >http://www.quicomm.com/apm_dbd dbi.htm


    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
     
    jake, Mar 26, 2005
    #8
  9. <> wrote:

    > Please quote



    We'll quote when you quote.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Mar 26, 2005
    #9
  10. jake <> wrote:

    > Sorry if it's off topic.



    Pay no attention to the troll.

    Installing Perl modules is most certainly on-topic in the Perl newsgroup.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Mar 26, 2005
    #10
  11. "jake" <> wrote in news:1111880085.196466.186640
    @z14g2000cwz.googlegroups.com:

    > A. Sinan Unur:
    >
    >>http://www.quicomm.com/apm_dbd dbi.htm

    >
    > 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
     
    A. Sinan Unur, Mar 26, 2005
    #11
  12. jake

    jake Guest

    >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?
     
    jake, Mar 27, 2005
    #12
  13. "jake" <> wrote in news:1111882177.856721.52930
    @o13g2000cwo.googlegroups.com:

    >> 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/.


    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
     
    A. Sinan Unur, Mar 27, 2005
    #13
  14. jake wrote:

    > 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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Mar 27, 2005
    #14
  15. A. Sinan Unur wrote:

    > "jake" <> wrote in news:1111880085.196466.186640
    > @z14g2000cwz.googlegroups.com:
    >
    >> 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.


    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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Mar 27, 2005
    #15
  16. jake wrote:

    > 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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Mar 27, 2005
    #16
  17. A. Sinan Unur wrote:

    > "jake" <> wrote in news:1111882177.856721.52930
    > @o13g2000cwo.googlegroups.com:
    >
    >> 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--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Mar 27, 2005
    #17
  18. Sherm Pendley <> wrote in news:0Kydnd_MsPbbldvfRVn-
    :

    > A. Sinan Unur wrote:
    >
    >> "jake" <> wrote in news:1111882177.856721.52930
    >> @o13g2000cwo.googlegroups.com:
    >>
    >>> MACOSX_DEPLOYMENT_TARGET environment variable set to: 10.1

    ....
    >> MACOSX_DEVELOPMENT_TARGET=10.3 above

    ....
    > DEVELOPMENT ne DEPLOYMENT.
    >
    > As Uri would say "ouch, my eyes! i'm blind!" :)


    Agreed! Thanks for catching that.

    Sinan
     
    A. Sinan Unur, Mar 27, 2005
    #18
  19. jake

    jake Guest

    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
     
    jake, Mar 27, 2005
    #19
  20. 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

    --
    perl -e '$S=[[73,116,114,115,31,96],[108,109,114,102,99,112],
    [29,77,98,111,105,29],[100,93,95,103,97,110]];
    for(0..3){for$s(0..5){print(chr($S->[$_]->[$s]+$_+1))}}'
     
    Martin Kissner, Mar 28, 2005
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Parvinder
    Replies:
    6
    Views:
    780
    Thomas G. Marshall
    Feb 27, 2005
  2. Dave
    Replies:
    2
    Views:
    497
  3. George P
    Replies:
    3
    Views:
    709
    Alex Martelli
    Sep 11, 2004
  4. David Pratt
    Replies:
    4
    Views:
    351
    David Pratt
    May 13, 2006
  5. Brian Ablaza
    Replies:
    1
    Views:
    141
    zakifataya
    Feb 27, 2006
Loading...

Share This Page