Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: 'cpan DBD::Pg' install fails ( undefined reference to 'PQstatus' , objdump )

by Anonymous Monk
on Feb 10, 2020 at 04:19 UTC ( [id://11112713]=note: print w/replies, xml ) Need Help??


in reply to 'cpan DBD::Pg' install fails

Re: 'cpan DBD::Pg' install fails ( undefined reference to 'PQstatus' , objdump )

use "objdump" to find it out

https://www.postgresql.org/docs/8.1/libpq-build.html

This means you forgot ..

This means you forgot the -L option or did not specify the right directory.

Replies are listed 'Best First'.
Re^2: 'cpan DBD::Pg' install fails ( undefined reference to 'PQstatus' , objdump )
by perlygapes (Sexton) on Feb 10, 2020 at 06:04 UTC
    Thank you for your supplication. Dark forces are shielding mine eyes from the truth. I do not know how to use objdump (I can run it in Cygwin, but there are many switches). I can do simple tasks, like lookup scripture verse, like this:
    $ find . -type f -name "libpq.dll" -o -name "libpq.def" -o -name "libp +q.[ha]" ./12/bin/libpq.def ./12/bin/libpq.dll ./12/include/server/libpq/libpq.h ./12/lib/libpq.a ./12/lib/libpq.dll ./12/pgAdmin 4/bin/libpq.dll $
    linpq.def and libpq.a were created using pexports and dllname in MinGW, as per my Github Ticket details.

    Of the files listed above, is it simply a case of copying or moving one or more of these to another PostgreSQL folder?

    A virtual candle has been lit in Thanksgiving.

      Finding myself down a dark alley and at a dead end, I decided to return to my First Love and go back to the start,
      back to Genesis.

      I ran pexports and dllname again, as advised in the README,
      however this time I did it within the directory as recommended.

      This time, though it still failed, it solved the undefined symbol... issue.
      Now, however, some of the tests are failing. One appears due to a function name cAsE mIsMaTcH:

      user @ computer c:\Program Files\PostgreSQL\12\bin >pexports libpq.dll > libpq.def user @ computer c:\Program Files\PostgreSQL\12\bin >dlltool -dllname libpq.dll --def libpq.def --output-lib ..\lib\libpq. +a user @ computer c:\Program Files\PostgreSQL\12\bin >cpan DBD::Pg Loading internal logger. Log::Log4perl recommended for better logging CPAN: Term::ANSIColor loaded ok (v4.06) Reading 'C:\Perl64\cpan\Metadata' Database was generated on Wed, 12 Feb 2020 06:55:27 GMT Running install for module 'DBD::Pg' CPAN: Digest::SHA loaded ok (v5.98) CPAN: Compress::Zlib loaded ok (v2.074) Checksum for C:\Perl64\cpan\sources\authors\id\T\TU\TURNSTEP\DBD-Pg-3. +10.4.tar.gz ok CPAN: Archive::Tar loaded ok (v2.26) DBD-Pg-3.10.4/ DBD-Pg-3.10.4/MANIFEST DBD-Pg-3.10.4/quote.c DBD-Pg-3.10.4/dbivport.h DBD-Pg-3.10.4/README.win32 DBD-Pg-3.10.4/Makefile.PL DBD-Pg-3.10.4/Pg.xs DBD-Pg-3.10.4/types.h DBD-Pg-3.10.4/t/ DBD-Pg-3.10.4/t/dbdpg_test_setup.pl DBD-Pg-3.10.4/t/01connect.t DBD-Pg-3.10.4/t/06bytea.t DBD-Pg-3.10.4/t/00basic.t DBD-Pg-3.10.4/t/99cleanup.t DBD-Pg-3.10.4/t/02attribs.t DBD-Pg-3.10.4/t/10_pg_error_field.t DBD-Pg-3.10.4/t/03dbmethod.t DBD-Pg-3.10.4/t/lib/ DBD-Pg-3.10.4/t/lib/App/ DBD-Pg-3.10.4/t/lib/App/Info.pm DBD-Pg-3.10.4/t/lib/App/Info/ DBD-Pg-3.10.4/t/lib/App/Info/Handler.pm DBD-Pg-3.10.4/t/lib/App/Info/Request.pm DBD-Pg-3.10.4/t/lib/App/Info/RDBMS/ DBD-Pg-3.10.4/t/lib/App/Info/RDBMS/PostgreSQL.pm DBD-Pg-3.10.4/t/lib/App/Info/RDBMS.pm DBD-Pg-3.10.4/t/lib/App/Info/Handler/ DBD-Pg-3.10.4/t/lib/App/Info/Handler/Print.pm DBD-Pg-3.10.4/t/lib/App/Info/Handler/Prompt.pm DBD-Pg-3.10.4/t/lib/App/Info/Util.pm DBD-Pg-3.10.4/t/08async.t DBD-Pg-3.10.4/t/30unicode.t DBD-Pg-3.10.4/t/04misc.t DBD-Pg-3.10.4/t/12placeholders.t DBD-Pg-3.10.4/t/01constants.t DBD-Pg-3.10.4/t/00_signature.t DBD-Pg-3.10.4/t/09arrays.t DBD-Pg-3.10.4/t/07copy.t DBD-Pg-3.10.4/t/20savepoints.t DBD-Pg-3.10.4/t/03smethod.t DBD-Pg-3.10.4/LICENSES/ DBD-Pg-3.10.4/LICENSES/artistic.txt DBD-Pg-3.10.4/LICENSES/gpl-2.0.txt DBD-Pg-3.10.4/testme.tmp.pl DBD-Pg-3.10.4/win32.mak DBD-Pg-3.10.4/dbdimp.c DBD-Pg-3.10.4/types.c DBD-Pg-3.10.4/TODO DBD-Pg-3.10.4/lib/ DBD-Pg-3.10.4/lib/Bundle/ DBD-Pg-3.10.4/lib/Bundle/DBD/ DBD-Pg-3.10.4/lib/Bundle/DBD/Pg.pm DBD-Pg-3.10.4/Pg.pm DBD-Pg-3.10.4/META.yml DBD-Pg-3.10.4/Changes DBD-Pg-3.10.4/README.dev DBD-Pg-3.10.4/README DBD-Pg-3.10.4/Pg.h DBD-Pg-3.10.4/dbdimp.h DBD-Pg-3.10.4/.perlcriticrc DBD-Pg-3.10.4/MANIFEST.SKIP DBD-Pg-3.10.4/SIGNATURE DBD-Pg-3.10.4/quote.h CPAN: YAML::XS loaded ok (v0.66) CPAN: CPAN::Meta::Requirements loaded ok (v2.140) CPAN: Parse::CPAN::Meta loaded ok (v2.150010) CPAN: CPAN::Meta loaded ok (v2.150010) CPAN: Module::CoreList loaded ok (v5.20171120) Configuring T/TU/TURNSTEP/DBD-Pg-3.10.4.tar.gz with Makefile.PL Configuring DBD::Pg 3.10.4 PostgreSQL version: 120001 (default port: 5432) POSTGRES_HOME: C:\Program Files\PostgreSQL\12 POSTGRES_INCLUDE: C:\Program Files\PostgreSQL\12\include POSTGRES_LIB: C:\Program Files\PostgreSQL\12\lib OS: MSWin32 Multiple copies of Driver.xst found in: C:/Perl64/site/lib/auto/DBI/ C +:/Perl64/lib/auto/DBI/ at Makefile.PL line 182. Checking if your kit is complete... Looks good Warning (mostly harmless): No library found for -lm Warning (mostly harmless): No library found for -lsecur32 Warning (mostly harmless): No library found for -lmoldname Warning (mostly harmless): No library found for -lkernel32 Warning (mostly harmless): No library found for -luser32 Warning (mostly harmless): No library found for -lgdi32 Warning (mostly harmless): No library found for -lwinspool Warning (mostly harmless): No library found for -lcomdlg32 Warning (mostly harmless): No library found for -ladvapi32 Warning (mostly harmless): No library found for -lshell32 Warning (mostly harmless): No library found for -lole32 Warning (mostly harmless): No library found for -loleaut32 Warning (mostly harmless): No library found for -lnetapi32 Warning (mostly harmless): No library found for -luuid Warning (mostly harmless): No library found for -lws2_32 Warning (mostly harmless): No library found for -lmpr Warning (mostly harmless): No library found for -lwinmm Warning (mostly harmless): No library found for -lversion Warning (mostly harmless): No library found for -lodbc32 Warning (mostly harmless): No library found for -lodbccp32 Warning (mostly harmless): No library found for -lcomctl32 Multiple copies of Driver.xst found in: C:/Perl64/site/lib/auto/DBI/ C +:/Perl64/lib/auto/DBI/ at Makefile.PL line 284. Using DBI 1.643 (for perl 5.026001 on MSWin32-x64-multi-thread) instal +led in C:/Perl64/site/lib/auto/DBI/ Generating a dmake-style Makefile Writing Makefile for DBD::Pg Writing MYMETA.yml and MYMETA.json TURNSTEP/DBD-Pg-3.10.4.tar.gz C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK Running make for T/TU/TURNSTEP/DBD-Pg-3.10.4.tar.gz cp Pg.pm blib\lib\DBD/Pg.pm cp lib/Bundle/DBD/Pg.pm blib\lib/Bundle/DBD/Pg.pm Running Mkbootstrap for Pg () "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "Pg.bs" "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Pg. +bs blib\arch\auto\DBD\Pg\Pg.bs 644 "C:\Perl64\bin\perl.exe" -p -e "s/~DRIVER~/Pg/g; s/^do\(/dontdo\(/" C: +\Perl64\site\lib\auto\DBI\Driver.xst > Pg.xsi "C:\Perl64\bin\perl.exe" "C:\Perl64\lib\ExtUtils\xsubpp" -typemap C:\ +Perl64\lib\ExtUtils\typemap Pg.xs > Pg.xsc "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e mv -- Pg.xsc Pg.c C:\Perl64\site\bin\gcc.exe -c -I"C:\Program Files\PostgreSQL\12\inclu +de" -IC:\Perl64\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCO +NSERVATIVE -DPERL_TEX TMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLI +CIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=12 +0001 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.10.4\" -DXS_VERSION=\"3.10.4\" "-IC: +\Perl64\lib\CORE" Pg.c C:\Perl64\site\bin\gcc.exe -c -I"C:\Program Files\PostgreSQL\12\inclu +de" -IC:\Perl64\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCO +NSERVATIVE -DPERL_TEX TMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLI +CIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=12 +0001 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.10.4\" -DXS_VERSION=\"3.10.4\" "-IC: +\Perl64\lib\CORE" dbdimp.c dbdimp.c: In function 'pg_st_prepare_statement': dbdimp.c:2368:44: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:2383:33: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c: In function 'pg_st_execute': dbdimp.c:3404:52: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:3419:41: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:3498:52: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:3515:41: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:3575:52: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:3592:41: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c: In function 'pg_st_finish': dbdimp.c:3899:42: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c: In function 'pg_st_destroy': dbdimp.c:4070:10: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c: In function 'pg_db_result': dbdimp.c:5233:52: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] dbdimp.c:5247:41: warning: cast from pointer to integer of different s +ize [-Wpointer-to-int-cast] C:\Perl64\site\bin\gcc.exe -c -I"C:\Program Files\PostgreSQL\12\inclu +de" -IC:\Perl64\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCO +NSERVATIVE -DPERL_TEX TMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLI +CIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=12 +0001 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.10.4\" -DXS_VERSION=\"3.10.4\" "-IC: +\Perl64\lib\CORE" quote.c C:\Perl64\site\bin\gcc.exe -c -I"C:\Program Files\PostgreSQL\12\inclu +de" -IC:\Perl64\site\lib\auto\DBI -s -O2 -DWIN32 -DWIN64 -DCO +NSERVATIVE -DPERL_TEX TMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLI +CIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -DPGLIBVERSION=12 +0001 -DPGDEFPORT=5432 -s -O2 -DVERSION=\"3.10.4\" -DXS_VERSION=\"3.10.4\" "-IC: +\Perl64\lib\CORE" types.c "C:\Perl64\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::Pg\", 'DLBASE' => 'Pg', 'DL_FUNCS' +=> { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" C:\Perl64\site\bin\g++.exe Pg.def -o blib\arch\auto\DBD\Pg\Pg.dll -mdl +l -s -static-libgcc -static-libstdc++ -L"C:\Perl64\lib\CORE" -L"C:\Mi +nGW\x86_64-w64-mingw3 2\lib" Pg.o dbdimp.o quote.o types.o "C:\Perl64\lib\CORE\libperl526. +a" "C:\Program Files\PostgreSQL\12\lib\libpq.a" -Wl,--enable-auto-ima +ge-base "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch +\auto\DBD\Pg\Pg.dll TURNSTEP/DBD-Pg-3.10.4.tar.gz C:\Perl64\site\bin\dmake.exe -- OK CPAN: CPAN::DistnameInfo loaded ok (v0.12) Running make test for TURNSTEP/DBD-Pg-3.10.4.tar.gz "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Pg. +bs blib\arch\auto\DBD\Pg\Pg.bs 644 "C:\Perl64\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" " +-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'bli +b\arch')" t/*.t t/00_signature.t ....... skipped: Set the environment variable TEST_SI +GNATURE to enable this test t/00basic.t ............ ok t/01connect.t .......... 11/15 # # DBI Version 1.643 # DBD::Pg Version 3.10.4 # Perl Version 5.26.1 # OS MSWin32 # PostgreSQL (compiled) 120001 # PostgreSQL (target) 120001 # PostgreSQL (reported) PostgreSQL 12.1, compiled by Visual C++ +build 1914, 64-bit # Default port 5432 # DBI_DSN dbi:Pg:db="testdb" # DBI_USER postgres # Test schema dbd_pg_testschema # PGPORT 5432 # PGUSER postgres # array_nulls on # backslash_quote safe_encoding # client_encoding UTF8 # server_encoding UTF8 # standard_conforming_strings on t/01connect.t .......... ok t/01constants.t ........ ok t/02attribs.t .......... ok
      t/03dbmethod.t ......... 108/580 Issuing rollback() due to DESTROY wit +hout explicit disconnect() of DBD::Pg::db handle dbname=testdb at t/0 +3dbmethod.t line 2103 .
      t/03dbmethod.t ......... ok t/03smethod.t .......... ok
      t/04misc.t ............. 81/95 DBD::Pg::db do failed: ERROR: invalid +value for parameter "max_stack_depth": 4096 DETAIL: "max_stack_depth" must not exceed 3584kB. HINT: Increase the platform's stack depth limit via "ulimit -s" or lo +cal equivalent. at t/04misc.t line 531, <$fh> line 8. Issuing rollback() due to DESTROY without explicit disconnect() of DBD +::Pg::db handle dbname=testdb at t/04misc.t line 531, <$fh> line 8. Error removing C:\Perl64\cpan\build\DBD-Pg-3.10.4-11\dbdpg_test_gBvnuZ +tst at C:/Perl64/lib/File/Temp.pm line 762. # Looks like your test exited with 255 just after 81. t/04misc.t ............. Dubious, test returned 255 (wstat 65280, 0xff +00) Failed 14/95 subtests
      t/06bytea.t ............ ok t/07copy.t ............. ok t/08async.t ............ ok t/09arrays.t ........... ok
      t/10_pg_error_field.t .. 1/? # Failed test '(query 4) Calling pg_error_field returns expected val +ue for field pg_diag_source_file' # at t/10_pg_error_field.t line 92. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' # Failed test '(query 4) Calling pg_error_field returns expected val +ue for field PG_DIAG_SOURCE_FILE' # at t/10_pg_error_field.t line 97. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' t/10_pg_error_field.t .. 286/? # Failed test '(query 4) Calling pg_e +rror_field returns expected value for field SOURCE_FILE' # at t/10_pg_error_field.t line 102. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' # Failed test '(query 5) Calling pg_error_field returns expected val +ue for field pg_diag_source_file' # at t/10_pg_error_field.t line 92. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' # Failed test '(query 5) Calling pg_error_field returns expected val +ue for field PG_DIAG_SOURCE_FILE' # at t/10_pg_error_field.t line 97. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' t/10_pg_error_field.t .. 358/? # Failed test '(query 5) Calling pg_e +rror_field returns expected value for field SOURCE_FILE' # at t/10_pg_error_field.t line 102. # 'd:\pginstaller_12.auto\postgres.windows-x64\src\b +ackend\executor\execmain.c' # doesn't match '(?^:execMain.c)' # Looks like you failed 6 tests of 364. t/10_pg_error_field.t .. Dubious, test returned 6 (wstat 1536, 0x600) Failed 6/364 subtests
      t/12placeholders.t ..... ok t/20savepoints.t ....... ok t/30unicode.t .......... ok t/99cleanup.t .......... ok
      Test Summary Report ------------------- t/04misc.t (Wstat: 65280 Tests: 81 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 95 tests but ran 81. t/10_pg_error_field.t (Wstat: 1536 Tests: 364 Failed: 6) Failed tests: 284-286, 356-358 Non-zero exit status: 6 Files=17, Tests=2846, 24 wallclock secs ( 0.09 usr + 0.02 sys = 0.11 + CPU) Result: FAIL Failed 2/17 test programs. 6/2846 subtests failed. dmake.exe: Error code 255, while making 'test_dynamic' TURNSTEP/DBD-Pg-3.10.4.tar.gz C:\Perl64\site\bin\dmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports TURNSTEP/DBD-Pg-3.10.4.tar.gz
      user @ computer c:\Program Files\PostgreSQL\12\bin >

        This time, though it still failed, it solved the undefined symbol... issue. Now, however, some of the tests are failing. One appears due to a function name cAsE mIsMaTcH:

        Thats a win

        Now forward that report to bug-DBD-pg@rt.cpan.org or rt://DBD-Pg and see what the author says

        Time to repent of old habits...

        I sacrificed the testdb I had manually created via pgAdmin 4 on the sin alter.
        Having received forgiveness for my folly, I once again kept the ordinances of README.
        This time, and only with a mustard seed of faith (since pg_ctl... failed to connect to the testdb)
        I tried once more to apply README theology, and DBD::Pg 3.10.4 did indeed install.
        Healing can be slow, but it has begun.

        user @ computer C:\Windows\System32 >cpanp Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call + didn't work. The COLUMNS and LINES environment variables didn't work +. at C:/Perl64/lib/Term/ReadLine/readline.pm line 410. CPANPLUS::Shell::Default -- CPAN exploration and module installation ( +v0.9906) *** Please report bugs to <bug-cpanplus@rt.cpan.org>. *** Using CPANPLUS::Backend v0.9906. ReadLine support disabled. *** Type 'p' now to show start up log Did you know... You can use plugins. Type '/plugins' to list available plugins CPAN Terminal> l DBD::Pg Details for 'DBD::Pg' Author Greg Sabino Mullane (greg@turnstep.com) Description None given Development Stage Unknown Installed File C:\Perl64\site\lib\DBD\Pg.pm Interface Style Unknown Language Used Unknown Package DBD-Pg-3.10.4.tar.gz Public License Unknown Support Level Unknown Version Installed 3.10.4 Version on CPAN 3.10.4 Contains: Bundle::DBD::Pg + 3.10.4 DBD::Pg + 3.10.4 CPAN Terminal>

        Please accept my humble gratitude

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11112713]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-28 08:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found