-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error 'initdb' not recognized for ver 3.15.1 #96
Comments
I know it's been 3 months, and you've probably already found a solution. I think you need to configure your PATH. You need to install the PostgreSQL tools and get them usable from the command line first. This StackOverflow seems to cover how to do this: |
esabol, Thank you for responding. FYI, none of my development computers have ever had Postgres installed. All CPAN modules have installed fine since 2015 until the most recent update 90 days ago. I did confirm that the %PATH% does not contain the C:\Program Files\PostgreSQL\ folders. However, that was expected because I've never installed PG on my development computers. I installed Strawberry Perl on my development computers and then programmatically connect at run-time to the Posgres database server. The temporary (hopefully) workaround was to install the module with the -T option (Do not test modules. Simply install them.). I only used this override when installing the DBD::Pg module. I'm still wondering why the installs worked for 7 years and all of a sudden abend with an error. I really don't think installing Postgres on my development computers is the answer to the above issue. Many thanks. |
Well, it wasn't clear from your initial message that that's what your issue was about. I thought you just wanted a solution to the error, and I believe installing PostgreSQL would solve the problem you encountered with running these tests. I'm surprised to learn it was ever possible to install DBD::Pg without installing PostgreSQL. I could have sworn you needed at least some PostgreSQL library (DLL on Windows) and some PostgreSQL C headers to compile the DBD::Pg source code, but perhaps I'm mistaken. I've only ever compiled, tested, and installed DBD::Pg on computers that also have PostgreSQL installed. |
I may be experiencing a very similar problem to the OP's. It's Windows 10 with Strawberry Perl 5.24, 5.26, and 5.32. I don't believe that PostgreSQL is installed on my PC. All I'm interested in is avoiding this error message (and the upgrade failure) when attempting to upgrade my installed packages (DBD::Pg comes preinstalled with Strawberry). I do have a wrapper around the cpan upgrade process to avoid trying to update DBD::Pg, but for the benefit of folks who haven't rolled such a tool, it would be good to be able to run a general "upgrade [all]" and not have to worry about it dying in the middle of multiple upgrades from some package like DBD::Pg. This would probably involve changes to CPAN so that its tool could query the installation state of a subsystem (such as PostgreSQL) and what version it is, before deciding that the DBD::Pg package needs to be upgraded. In my case, it would see that PostgreSQL isn't even installed, and so wouldn't even try to upgrade DBD::Pg. I reported something similar against DBD::Oracle, where the client is too old to bother updating the package, and B, which only matches a given Perl level. |
Strawberry Perl provides a reduced set of postgres files, and this does not include initdb, pg_ctl, pg_config and a few others. The tests started to fail some time after DBD::Pg 3.8.0, which is the version distributed with recent Strawberry Perls since the tests pass. I've run some full postgres builds but am getting DBD::Pg failures related to dict_snowball - it seems the
|
I've now run a The set of packed files are at https://github.com/StrawberryPerl/build-extlibs/releases/download/gcc13.2_ucrt_posix/64bit_postgresql-16.2-bin_20240613_world_bin.zip . Not all are packed so some might still be needed. This build uses the compiler setup used for SP 5.40-RC1. That SP release can be downloaded from https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/tag/dev_5.40.0_RC1_UCRT I can get further than before but now hit issues with database creation in
The single quotes around the To reproduce:
The log file contents are:
|
@shawnlaffan wrote:
First off, thank you for supporting DBD::Pg in Strawberry Perl! I suspect your problem is in Lines 565 to 576 in f3d3c92
The What happens if you drop the In other words, change line 576 to Alternatively, you might also try changing line 565 to |
Dropping the socket component seems to work from the cmd prompt:
I also changed the single quotes to double quotes in both places they are used (L191 and L576) but then discovered |
We have progress now all the files are packed. https://github.com/StrawberryPerl/build-extlibs/releases/download/gcc13.2_ucrt_posix/64bit_postgresql-16.2-bin_20240613_dll_suffix_wf.zip Removing the socket command seems to result in a hang so I left it in, but double quoted.
|
Although now it is failing again so I am not sure what caused the previous pass.
Edit:
|
Hi There,
I'm running Strawberry Perl on a Windows 10, 64 bit environment and am getting this error: Bad initdb output: 'initdb' is not recognized as an internal or external command,
This compile error occurs on multiple CPUs with slightly different versions of Strawberry Perl, 5.30.0 and 5.32.1 (latest version).
I did install the most up-to-date dependencies DBI and version, so that wasn't the issue.
I am running the command prompt as an administrator. I even tried using the force option, but the compile failed with the same error.
Many thanks!
C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\DBD\Pg\Pg.xs.dll
TURNSTEP/DBD-Pg-3.15.1.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test for TURNSTEP/DBD-Pg-3.15.1.tar.gz
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Pg.bs blib\arch\auto\DBD\Pg\Pg.bs 644
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/.t
t/00_signature.t ....... skipped: Set the environment variable TEST_SIGNATURE to enable this test
t/00basic.t ............ ok
t/01connect.t .......... #
DBI Version 1.643
DBD::Pg Version 3.15.1
Perl Version 5.30.0
OS MSWin32
PostgreSQL (compiled) ?
PostgreSQL (target) ?
PostgreSQL (reported) ?
Default port ?
DBI_DSN ?
DBI_USER
Test schema dbd_pg_testschema
LANG C
Adjusted: initdb
Error was: Bad initdb output: 'initdb' is not recognized as an internal or external command, <-----------
operable program or batch file.
Bailout called. Further testing stopped: Cannot continue: connection failed
FAILED--Further testing stopped: Cannot continue: connection failed
gmake: *** [Makefile:986: test_dynamic] Error 255
TURNSTEP/DBD-Pg-3.15.1.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports TURNSTEP/DBD-Pg-3.15.1.tar.gz
Stopping: 'install' fail
The text was updated successfully, but these errors were encountered: