FAQ
I had a slight problem while installing DBD::Oracle 1.16 on a 64-bit Perl 5.8.5 running
on a Solaris 9 system with Oracle 9i. "perl Makefile.PL" tried to use the 32-bit Oracle
libraries. The Oracle 9 (and 8 IIRC) client uses "*/lib" for the 64-bit libraries and
"*/lib32" for the 32-bit libraries. An easy workaround is to use
"perl Makefile.PL -r=build" to force the use of the 64-bit libraries, but a single change
to Makefile.PL fixes the problem.

Without the change, line 331 forces the use of make rule "build32" if it exists, even if
you are installing on a 64-bit Perl. The change is to make this line similar to the line
after it and force "build32" only if it exists and only if you are building on a 32-bit Perl.
Here is diff output for the change:

331c331
< $build_target = "build32" if $mk_target_rules{build32};
---
$build_target = "build32" if $mk_target_rules{build32} && ! perl_is_64bit();

--
James D. White (jdw@ou.edu)
Director of Bioinformatics
Department of Chemistry and Biochemistry/ACGT
University of Oklahoma
101 David L. Boren Blvd., SRTC 2100
Norman, OK 73019
Phone: (405) 325-4912, FAX: (405) 325-7762

Search Discussions

  • Tim at Apr 19, 2005 at 11:36 pm
    Thanks James.

    Tim.
    On Tue, Apr 19, 2005 at 04:31:39PM -0500, James D. White wrote:
    I had a slight problem while installing DBD::Oracle 1.16 on a 64-bit Perl 5.8.5 running
    on a Solaris 9 system with Oracle 9i. "perl Makefile.PL" tried to use the 32-bit Oracle
    libraries. The Oracle 9 (and 8 IIRC) client uses "*/lib" for the 64-bit libraries and
    "*/lib32" for the 32-bit libraries. An easy workaround is to use
    "perl Makefile.PL -r=build" to force the use of the 64-bit libraries, but a single change
    to Makefile.PL fixes the problem.

    Without the change, line 331 forces the use of make rule "build32" if it exists, even if
    you are installing on a 64-bit Perl. The change is to make this line similar to the line
    after it and force "build32" only if it exists and only if you are building on a 32-bit Perl.
    Here is diff output for the change:

    331c331
    < $build_target = "build32" if $mk_target_rules{build32};
    ---
    $build_target = "build32" if $mk_target_rules{build32} && ! perl_is_64bit();

    --
    James D. White (jdw@ou.edu)
    Director of Bioinformatics
    Department of Chemistry and Biochemistry/ACGT
    University of Oklahoma
    101 David L. Boren Blvd., SRTC 2100
    Norman, OK 73019
    Phone: (405) 325-4912, FAX: (405) 325-7762

  • James D. White at Apr 25, 2005 at 11:24 pm
    I have a couple of suggested patches for DBD::mysql. These patches were based upon
    DBD-mysql-2.9006.

    The first patch is to correct a typo in "t/lib.pl".
    47c47
    < $::test_password = $::test_passowrd || $ENV{'DBI_PASS'} || '';
    ---
    $::test_password = $::test_password || $ENV{'DBI_PASS'} || '';
    The second patch is a change to Makefile.PL so that is creates a modified "t/mysql.mtest".
    129c129
    < "\$::test_user = \$opt->{'testuser'};\n" .
    ---
    "\$::test_user = \$opt->{'testuser'} if \$opt->{'testuser'};\n" .
    131c131
    < "\$::test_password = \$opt->{'testpassword'};\n" .
    ---
    "\$::test_password = \$opt->{'testpassword'} if \$opt->{'testpassword'};\n" .
    133,135c133,135
    < "\$::test_dsn = \"DBI:mysql:\$::test_db\";\n" .
    < "\$::test_dsn .= \":\$::test_host\" if \$::test_host;\n" .
    < "\$::test_dsn .= \":\$::test_port\" if \$::test_port;\n" .
    ---
    "\$::test_dsn = \"DBI:mysql:\$::test_db\" if \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_host\" if \$::test_host && \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_port\" if \$::test_port && \$::test_db;\n" .
    With these two patches, you can use environment variables DBI_USER, DBI_PASS, and
    DBI_DSN to pass the test username, test password, and test hostname needed during
    "make test". Without these changes, the "t/mysql.mtest" that is created overwrites the
    values obtained from the environment variables. If the default values (null user, null
    password, and localhost) are not correct, this forces the installer to specify these values
    on the "perl Makefile" command line. The values are then written to "t/mysql.mtest".
    The test hostname does not worry me, but I do not like to leave the test username and
    test password lying around in a file. This seems like a security problem waiting to happen.

    --
    James D. White (jdw@ou.edu)
    Director of Bioinformatics
    Department of Chemistry and Biochemistry/ACGT
    University of Oklahoma
    101 David L. Boren Blvd., SRTC 2100
    Norman, OK 73019
    Phone: (405) 325-4912, FAX: (405) 325-7762
  • Rudy Lippan at Apr 26, 2005 at 2:13 pm

    On Mon, 25 Apr 2005, James D. White wrote:

    I have a couple of suggested patches for DBD::mysql. These patches were based upon
    DBD-mysql-2.9006.

    The first patch is to correct a typo in "t/lib.pl".
    47c47
    < $::test_password = $::test_passowrd || $ENV{'DBI_PASS'} || '';
    ---
    $::test_password = $::test_password || $ENV{'DBI_PASS'} || '';
    The second patch is a change to Makefile.PL so that is creates a modified "t/mysql.mtest".
    129c129
    < "\$::test_user = \$opt->{'testuser'};\n" .
    ---
    "\$::test_user = \$opt->{'testuser'} if \$opt->{'testuser'};\n" .
    131c131
    < "\$::test_password = \$opt->{'testpassword'};\n" .
    ---
    "\$::test_password = \$opt->{'testpassword'} if \$opt->{'testpassword'};\n" .
    133,135c133,135
    < "\$::test_dsn = \"DBI:mysql:\$::test_db\";\n" .
    < "\$::test_dsn .= \":\$::test_host\" if \$::test_host;\n" .
    < "\$::test_dsn .= \":\$::test_port\" if \$::test_port;\n" .
    ---
    "\$::test_dsn = \"DBI:mysql:\$::test_db\" if \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_host\" if \$::test_host && \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_port\" if \$::test_port && \$::test_db;\n" .
    Looks good, I'll apply this.
    With these two patches, you can use environment variables DBI_USER, DBI_PASS, and
    DBI_DSN to pass the test username, test password, and test hostname needed during
    "make test". Without these changes, the "t/mysql.mtest" that is created overwrites the
    values obtained from the environment variables. If the default values (null user, null
    password, and localhost) are not correct, this forces the installer to specify these values
    on the "perl Makefile" command line. The values are then written to "t/mysql.mtest".
    The test hostname does not worry me, but I do not like to leave the test username and
    test password lying around in a file. This seems like a security problem waiting to happen.
    I can see your point; however, I don't think that a test account that only
    needs to be able to write to the test database would be too much of a concern
    esp. if the test scripts were run on a non-production system hitting a
    non-production database.

    In any event, it is nice to be able to specify the connection params by
    envionment variables... And the next logical step is to get DBD::mysql to read
    my.conf for the information.



    Thank you,

    Rudy.
  • Paul DuBois at Apr 26, 2005 at 2:19 pm

    On 4/26/05 9:03, "Rudy Lippan" wrote:
    On Mon, 25 Apr 2005, James D. White wrote:

    I have a couple of suggested patches for DBD::mysql. These patches were
    based upon
    DBD-mysql-2.9006.

    The first patch is to correct a typo in "t/lib.pl".
    47c47
    < $::test_password = $::test_passowrd || $ENV{'DBI_PASS'} || '';
    ---
    $::test_password = $::test_password || $ENV{'DBI_PASS'} || '';
    The second patch is a change to Makefile.PL so that is creates a modified
    "t/mysql.mtest".
    129c129
    < "\$::test_user = \$opt->{'testuser'};\n" .
    ---
    "\$::test_user = \$opt->{'testuser'} if \$opt->{'testuser'};\n"
    .
    131c131
    < "\$::test_password = \$opt->{'testpassword'};\n" .
    ---
    "\$::test_password = \$opt->{'testpassword'} if
    \$opt->{'testpassword'};\n" .
    133,135c133,135
    < "\$::test_dsn = \"DBI:mysql:\$::test_db\";\n" .
    < "\$::test_dsn .= \":\$::test_host\" if \$::test_host;\n" .
    < "\$::test_dsn .= \":\$::test_port\" if \$::test_port;\n" .
    ---
    "\$::test_dsn = \"DBI:mysql:\$::test_db\" if \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_host\" if \$::test_host &&
    \$::test_db;\n" .
    "\$::test_dsn .= \":\$::test_port\" if \$::test_port &&
    \$::test_db;\n" .
    Looks good, I'll apply this.
    With these two patches, you can use environment variables DBI_USER, DBI_PASS,
    and
    DBI_DSN to pass the test username, test password, and test hostname needed
    during
    "make test". Without these changes, the "t/mysql.mtest" that is created
    overwrites the
    values obtained from the environment variables. If the default values (null
    user, null
    password, and localhost) are not correct, this forces the installer to
    specify these values
    on the "perl Makefile" command line. The values are then written to
    "t/mysql.mtest".
    The test hostname does not worry me, but I do not like to leave the test
    username and
    test password lying around in a file. This seems like a security problem
    waiting to happen.
    I can see your point; however, I don't think that a test account that only
    needs to be able to write to the test database would be too much of a concern
    esp. if the test scripts were run on a non-production system hitting a
    non-production database.
    I disagree. At least the way it used to work, the test phase created a
    dot-file in which to store the username and password. You wouldn't
    necessarily even be aware that such a file was lying around on your system.
    If, just to get things working, you happened to have given the root account
    parameters for the purpose of connecting, you'd have a significant security
    hole. But having any account name/password stored in a file of which you're
    not aware is a problem.

    In any event, it is nice to be able to specify the connection params by
    envionment variables... And the next logical step is to get DBD::mysql to read
    my.conf for the information.



    Thank you,

    Rudy.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedApr 19, '05 at 9:31p
activeApr 26, '05 at 2:19p
posts5
users4
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase