StrawberryPerl / build-extlibs

16 stars 11 forks source link

GDBM build status #13

Open shawnlaffan opened 1 year ago

shawnlaffan commented 1 year ago

MSYS2 currently builds GDBM 1.19 so I have experimented with that version and MSYS2 patches.
https://github.com/msys2/MINGW-packages/blob/54881782a43e33bcff2ab61d3d0a5179b2223adb/mingw-w64-gdbm/PKGBUILD

Patch file: https://github.com/msys2/MINGW-packages/blob/54881782a43e33bcff2ab61d3d0a5179b2223adb/mingw-w64-gdbm/gdbm-1.15-win32.patch

The build was only for gdbm. The failure is for the make check step.

grep retval=  _bgdbm__/gdbm-1.19.build.log
######## retval=success
######## retval=success
######## retval=success
######## retval=FAILURE
######## retval=success

The failing tests are all for the compatibility library:

Compatibility library (dbm/ndbm)

 12: create database                                 FAILED (dbmcreate00.at:20)
 13: converting a 1.8-style database                 FAILED (dbmcvt.at:20)
 14: fetch a record                                  FAILED (dbmfetch00.at:20)
 15: fetch: nonexisting record                       FAILED (dbmfetch01.at:20)
 16: fetch from a read-only database                 FAILED (dbmfetch02.at:20)
 17: fetch from a read-only 1.8-style database       FAILED (dbmfetch03.at:20)
 18: delete a record                                 FAILED (dbmdel00.at:20)
 19: delete: non existing record                     FAILED (dbmdel01.at:20)
 20: delete: all records                             FAILED (dbmdel02.at:20)

This might just be an MSYS related issue that can be fixed by more ifdef patching but that's beyond my skill set. If this is the case then the issue might be with the tests. If the dependent perl libs build and test without issue then these failures can be ignored?

Alternately, how essential are the libraries that depend on the GDBM compatibility library? From what I can find (code and results below), libgdbm_compat-4.dll is needed by NDBM_File and ODBM_File under SP 5.32. Neither has any reverse deps on CPAN, although both are part of the core perl distribution and one never knows what is in use beyond CPAN.

NDBM_File ODBM_File

=== To find Perl modules that depend on libgdm_compatibility, run this script from a Strawberry Perl perl dir. Then page through to find libgdbm_compat and check for the calling dll name a few lines before each occurrence.

find . -name '*.dll' -exec objdump -x {} \; | grep -i dll > ../../gdbmdll.txt
./lib/auto/NDBM_File/NDBM_File.xs.dll:     file format pei-x86-64
./lib/auto/NDBM_File/NDBM_File.xs.dll
        DLL
DllCharacteristics      00000000
 vma:            Hint    Time      Forward  DLL       First
        DLL Name: perl532.dll
        DLL Name: msvcrt.dll
        DLL Name: libgdbm_compat-4__.dll
        DLL Name: KERNEL32.dll
Name                            000000000000a032 NDBM_File.xs.dll
./lib/auto/ODBM_File/ODBM_File.xs.dll:     file format pei-x86-64
./lib/auto/ODBM_File/ODBM_File.xs.dll
        DLL
DllCharacteristics      00000000
 vma:            Hint    Time      Forward  DLL       First
        DLL Name: perl532.dll
        DLL Name: msvcrt.dll
        DLL Name: libgdbm_compat-4__.dll
        DLL Name: KERNEL32.dll
Name                            0000000000010032 ODBM_File.xs.dll
shawnlaffan commented 1 year ago

The above failures occurred when using gcc 10.3. tests all pass when using gcc 11.3.0.

Cross-ref: https://github.com/StrawberryPerl/Perl-Dist-Strawberry/issues/93