Skip to content
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

NDBM_File support on Win32 #10035

Closed
p5pRT opened this issue Dec 28, 2009 · 10 comments
Closed

NDBM_File support on Win32 #10035

p5pRT opened this issue Dec 28, 2009 · 10 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 28, 2009

Migrated from rt.perl.org#71680 (status was 'resolved')

Searchable as RT71680$

@p5pRT
Copy link
Author

p5pRT commented Dec 28, 2009

From @kmx

Created by @kmx

Hi,

We (=strawberry perl project) want to add NDBM_File support to
win32/strawberry perl because some users are asking for it.

However we need the following changes in NDBM_File module (we are
gonna use libgdm thus we need to link with -lgdbm_compat -lgdbm)​:

Inline Patch
diff --git a/ext/NDBM_File/Makefile.PL b/ext/NDBM_File/Makefile.PL
index a8adbf0..08bf93d 100644
--- a/ext/NDBM_File/Makefile.PL
+++ b/ext/NDBM_File/Makefile.PL
@@ -1,7 +1,7 @@
 use ExtUtils::MakeMaker;
 WriteMakefile(
     NAME    => 'NDBM_File',
-    LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+    LIBS => ($^O eq 'MSWin32') ? ["-lgdbm_compat -lgdbm"] :
["-L/usr/local/lib -lndbm", "-ldbm -lucb"],   XSPROTOARG => '\-noprototypes'\, \# XXX remove later?   VERSION\_FROM => 'NDBM\_File\.pm'\,   INC => \($^O eq "MacOS" ? "\-i :​::​:db​:include" : ""\)

--
kmx

Perl Info

Flags:
    category=library
    severity=low
    module=NDBM_File

Site configuration information for perl 5.10.1:

Configured by win32-vanilla at Wed Oct 21 13:53:59 2009.

Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
  
  Platform:
    osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
    uname='Win32 strawberryperl 5.10.1.0 #1 30 i386'
    config_args='undef'
    hint=recommended, useposix=true, d_sigaction=undef
    useithreads=define, usemultiplicity=define
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=undef, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT 
-DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-fno-strict-aliasing -DPERL_MSVCRT_READFIX',
    optimize='-s -O2',
    cppflags='-DWIN32'
    ccversion='', gccversion='3.4.5', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
    d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE"
-L"C:\strawberry\c\lib"'
    libpth=C:\strawberry\c\lib
    libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm -lversion -lodbc32 -lodbccp32
    perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid
-lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
    libc=, so=dll, useshrplib=true, libperl=libperl510.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
    cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE"
-L"C:\strawberry\c\lib"'

Locally applied patches:
   


@INC for perl 5.10.1:
    C:/strawberry/perl/lib
    C:/strawberry/perl/site/lib
    C:\strawberry\perl\vendor\lib
    .


Environment for perl 5.10.1:
    HOME=D:\_config\profile
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
   
PATH=C:\\strawberry\perl\bin;C:\\strawberry\c\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
    PERL_BADLANG (unset)
    SHELL (unset)


@p5pRT
Copy link
Author

p5pRT commented Jan 12, 2010

From @kmx

Hi,

We (=strawberry perl project) want to add NDBM_File support to
win32/strawberry perl because some users are asking for it.

However we need the following changes in NDBM_File module (we are
gonna use libgdm thus we need to link with -lgdbm_compat -lgdbm)​:

diff --git a/ext/NDBM_File/Makefile.PL b/ext/NDBM_File/Makefile.PL
index a8adbf0..08bf93d 100644
--- a/ext/NDBM_File/Makefile.PL
+++ b/ext/NDBM_File/Makefile.PL
@​@​ -1,7 +1,7 @​@​
use ExtUtils​::MakeMaker;
WriteMakefile(
NAME => 'NDBM_File',
- LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+ LIBS => ($^O eq 'MSWin32') ? ["-lgdbm_compat -lgdbm"] :
["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
XSPROTOARG => '-noprototypes', # XXX remove later?
VERSION_FROM => 'NDBM_File.pm',
INC => ($^O eq "MacOS" ? "-i :​::​:db​:include" : "")

as perhaps not only Win32 but also some other platforms can use
"-lgdbm_compat -lgdbm" for building NDBM_File it might be better to
change LIBS in Makefile.PL like this​:

- LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb"],
+ LIBS => ["-L/usr/local/lib -lndbm", "-ldbm -lucb", "-lgdbm_compat
-lgdbm"],

Or is there any other (better) way of using libgdm library (that comes
with libgdbm_compat.a and libgdbm.a) for building NDBM_File?

Thanks for any feedback.

--
kmx

@p5pRT
Copy link
Author

p5pRT commented Jan 12, 2010

@kmx - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 9, 2011

From @kmx

The NDBN_File@​MSWin32 issue discussed in this RT could be simply fixed
by putting enclosed MSWin32.pl file at​:

ext/NDBM_File/hints/MSWin32.pl

As a bonus - Win32 users can also get ODBM_File if you put exactly the
same file also to​:

ext/ODBM_File/hints/MSWin32.pl

--
kmx

@p5pRT
Copy link
Author

p5pRT commented May 9, 2011

From @kmx

MSWin32.pl

@p5pRT
Copy link
Author

p5pRT commented Mar 4, 2012

From @kmx

Do you think that 2 files proposed by this RT can make it to 5.16.0?

1/ ext/NDBM_File/hints/MSWin32.pl
2/ ext/ODBM_File/hints/MSWin32.pl

--
kmx

@p5pRT
Copy link
Author

p5pRT commented Apr 17, 2012

From @rjbs

Do any Win32 folks have any input on this?

@p5pRT
Copy link
Author

p5pRT commented Apr 17, 2012

From @tonycoz

On Mon, Apr 16, 2012 at 07​:57​:13PM -0700, Ricardo SIGNES via RT wrote​:

Do any Win32 folks have any input on this?

If it wasn't already being done for several other platforms (linux,
cygwin) I'd tend to reject it - it doesn't provide access to actual
ndbm or old dbm files.

Other platforms already supply hints that do the same thing, so I
think the hints version of the change should be applied.

I'd tend to applying it after 5.16, but it's only a slight tendency.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2013

From @tonycoz

On Mon May 09 16​:27​:32 2011, kmxx wrote​:

The NDBN_File@​MSWin32 issue discussed in this RT could be simply fixed
by putting enclosed MSWin32.pl file at​:

ext/NDBM_File/hints/MSWin32.pl

As a bonus - Win32 users can also get ODBM_File if you put exactly the
same file also to​:

ext/ODBM_File/hints/MSWin32.pl

Thanks, I've applied this as dc12741.

What would be really nice would be a patch that updates win32/Makefile,
win32/makefile.mk, win32/FindExt.pm etc to allow a GDBM Win32 perl to be
built with​:

  dmake -DHAVE_GDBM

Or something similar.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 1, 2013

@tonycoz - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant