OK, I tried three routes:
- Install from source 1.
I downloaded the source and tried to build from a (cygwin) bash with the env set up to match Strawberry. That failed. It detected too much Cygwin.
- Tried to build from a cmd window, set up for Straberry. That failed
- Installed the DB_File MSI (still no need for registration). The (very) good news is that it installs the *complete* devel env (C:\Program Files\Oracle\BerkeleyDB 4.6.21\. Then I did cpan.bat DB_File. That failed as expected. I copied db.h from the installed include dir to C:\strawberry\c\include and got this:
gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPE
+RL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_M
+SVCRT_READFIX -s -O2 -DVERSION=\"1.816\" -DXS_VERSION=\"1.816\"
+ "-IC:\strawberry\perl\lib\CORE" -D_NOT_CORE -DmDB_Prefix_t=size_t
+-DmDB_Hash_t=u_int32_t version.c
In file included from version.c:30:
C:/strawberry/c/include/db.h:118: error: redefinition of typedef 'uint
+ptr_t'
C:/strawberry/perl/lib/CORE/win32.h:273: error: previous declaration o
+f 'uintptr_t' was here
C:/strawberry/c/include/db.h:127: error: redefinition of typedef 'pid_
+t'
C:/strawberry/c/include/sys/types.h:75: error: previous declaration of
+ 'pid_t' was here
C:/strawberry/c/include/db.h:131: error: conflicting types for 'ssize_
+t'
C:/strawberry/c/include/sys/types.h:104: error: previous declaration o
+f 'ssize_t' was here
dmake.exe: Error code 129, while making 'version.o'
Hmm, harder than I thought it would be :(
Enjoy, Have FUN! H.Merijn
| [reply] [d/l] [select] |
error: redefinition of typedef...
Yukkie poo.
If you want to persevere ... try commenting out those definitions in db.h. If, perchance, win32.h and sys/types.h have already defined those typedefs in a suitable way, then removing those definitions from db.h would work. If they've been defined in such a way that's not compatible with the db.h definitions, then you're probably sunk.(If, having made those amendments to db.h, you then get other *similar* errors, it's probably time to give up.)
At some stage you'll need to make the library files accessible, too. But see how far you get with the above suggestions, first ... if you think it's worth the effort :-)
Btw, libraries built using cygwin will *not* work with strawberry perl unless you build the library on cygwin as a *cross-compilation*. I've had good success cross-compiling libraries (that do work with strawberry) with cygwin by adding
--host=i686-pc-mingw32 --build=i686-pc-cygwin
CC='gcc -mno-cygwin ' host_alias=i686-pc-mingw32
arguments to ./configure - though I'm told that not all of those arguments are needed. (As I said, when I tried to cross-compile db, I still got the error relating to socklen_t. But that error does not arise when building for cygwin itself.)
Cheers,
Rob
| [reply] [d/l] |