Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

DBD::ODBC install can't find boot_DBI

by DanEllison (Beadle)
on Oct 06, 2017 at 20:53 UTC ( #1200863=perlquestion: print w/replies, xml ) Need Help??

DanEllison has asked for the wisdom of the Perl Monks concerning the following question:

Trying to install DBD::ODBC on a Windows x64 box with Strawberry Perl 5.20.3. DBI 1.637 is already loaded. cpan DBD::ODBC is failing almost immediately with 'Can't find 'boot_DBI' symbol in .../DBI.xs.dll.' Anyone know how to resolve this?

Replies are listed 'Best First'.
Re: DBD::ODBC install can't find boot_DBI
by DanEllison (Beadle) on Oct 07, 2017 at 00:31 UTC

    I went back and re-installed DBI and the problem appears to be originating there. I also have another system which should be the same setup where I am already using DBI and DBD::ODBC with no issue. I've gone back and compare versions and even run the DBI install on that box as well. Makefiles and compiler options look the same. Here is where I see the first differene during the install:

    ... "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e cp -- dbilogs +trip blib\script\dbilogstrip pl2bat.bat blib\script\dbilogstrip TIMB/DBI-1.637.tar.gz C:\STRAWB~1\c\bin\dmake.exe -- OK Running make test "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::H +arness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\l +ib', 'blib\arch')" t/*.t # --- Perl 5.020003 on MSWin32-x64-multi-thread # Failed test 'use DBI;' # at t/01basics.t line 43. # Tried to use 'DBI'. # Error: Can't find 'boot_DBI' symbol in C:\STRAWB~1\cpan\build\D +BI-1.637-3\blib\arch/auto/DBI/DBI.xs.dll # at C:\STRAWB~1\cpan\build\DBI-1.637-3\blib\lib/ line 284. # BEGIN failed--compilation aborted at C:\STRAWB~1\cpan\build\DBI-1.63 +7-3\blib\lib/ line 284. # Compilation failed in require at t/01basics.t line 43. # BEGIN failed--compilation aborted at t/01basics.t line 43. Bareword "SQL_GUID" not allowed while "strict subs" in use at t/01basi +cs.t line 54. Bareword "SQL_WLONGVARCHAR" not allowed while "strict subs" in use at +t/01basics.t line 55. Bareword "SQL_WVARCHAR" not allowed while "strict subs" in use at t/01 +basics.t line 56. ...

    On the machine that doesn't have any problems, I get this "Error: Can't find 'boot_DBI', nor the Bareword warnings. The tests run successfully.

      On the machine that doesn't have any problems ...

      Let me see if I've got this right.

      On both machines you can run:
      perl -MDBI=":sql_types" -le "print 1;"

      and, on both machines, the following outputs 1.637:
      perl -MDBI=":sql_types" -le "print $DBI::VERSION;"

      But you can run the following command only on the machine that doesn't have any problems:
      perl -MDBI=":sql_types" -le "print SQL_GUID;"

      I think Strawberry-5.20.3 shipped with version 1.634 of DBI (at least that's the version I have), and I think you'll still have that version installed in vendor/lib.
      I would try reverting to that version - which you could do by renaming site/lib/ to site/lib/DBI.pm_hide and site/lib/auto/DBI/DBI.xs.dll to site/lib/auto/DBI/DBI.xs.dll_hide.
      If that fixes the problem (with the last of those one-liners) on the problem machine then it might give us something to work on.

      Just rename those 2 files to their original names when you wish to revert back to using 1.637.


        Couldn't print the version on the failed box. I had run a force install of DBI earlier, so besides renaming those files, I had to restore some files under vendor. But once I did that, then I was able to print the version.

        Then I went and tried to upgrade DBD::ODBC, but got a similar failure, Can't find boot_DBD__ODBC. I didn't force this, so didn't need to back anything out.

Re: DBD::ODBC install can't find boot_DBI
by Anonymous Monk on Oct 07, 2017 at 07:32 UTC

      First, I'm using Strawberry and cpan, not ActiveState and ppm. And, the file is built, not extracted. Both the successful install and failed install perform the same compile:

      dlltool --def DBI.def --output-exp dll.exp g++ -o blib\arch\auto\DBI\DBI.xs.dll -Wl,--base-file -Wl,dll.base -mdl +l -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" DBI.o "C:\ +STRAWB~1\perl\lib\CORE\libperl520.a" -lmoldname -lkernel32 -luser32 - +lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 +-lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp3 +2 -lcomctl32 dll.exp dlltool --def DBI.def --base-file dll.base --output-exp dll.exp g++ -o blib\arch\auto\DBI\DBI.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\ +CORE" -L"C:\STRAWB~1\c\lib" DBI.o "C:\STRAWB~1\perl\lib\CORE\libper +l520.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 +-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -l +mpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 dll.exp "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 +blib\arch\auto\DBI\DBI.xs.dll

        I see the newer strawberry use .xs.dll :/ but ActiveState uses MinGW just like strawberry, as you can see from the full build log

        ? What do you get with  grep -r boot_DBI .

        ? What is the difference in the "same compile" between the successful install and failed install ? ( diff the build logs )

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1200863]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2022-07-05 12:48 GMT
Find Nodes?
    Voting Booth?

    No recent polls found