Jeff, Thanks for the suggestion. Unfortunately, I can't use a prebuilt Win32 binary because I'm literally building on an MS-DOS host for an MS-DOS target using DJGPP. No Visual Studio here!
No worries though, I managed to get OpenSSL to compile with a bit of fiddling. I'm providing my notes here for the future reference of anyone who might be searching the mailing list archives for help (this is for compiling OpenSSL 0.9.8k on MS-DOS 7.1 using DJGPP). If you want to compile using the default DJGPP instructions (i.e., if you use "./Configure no-threads DJGPP) then you'll need to edit the lines in the top level Makefile that read "perl = " and "ranlib = " and put quotes around the path name or something like that. I still got errors for ranlib, but the compile kept going where it used to choke on not being able to find perl, so I must've done something right. Come to think of it, removing the path name altogether would probably be the best since perl and ranlib should be in your DJGPP path anyway. I, however, ended up reconfiguring OpenSSL with the following line: "./Configure no-hw-xxx no-hw no-threads no-zlib 386 no-sse", and that made the whole thing run smoothly. In fact, I noticed that the ranlib line was removed from the Makefile and the perl line didn't have a pathname given, just "perl" (i.e., "perl = perl", relying on perl already being in the system's path). Please note that you will need a whole lot of DJGPP's packages to compile OpenSSL, not just the few ZIP's that the Zip Picker provides you with. I recommend going to a DJGPP mirror and downloading all the ZIP's available in the v2gnu directory in addition to the ones mandated by the Zip Picker. Many of the standard Linux utilities that would be covered by "coreutils" have been reassigned to ZIP packages with other names (e.g., fileutils, shellutils). Google is your friend =). While I'm at it, here are a few more hints: -You must use a version of DOS that is Long File Name (LFN) compatible. For MS-DOS, that means 7.1 (the version that came with Windows 9x), but there are also other alternatives that I have not tested, such as PC-DOS and FreeDOS. You'll need the TSR utility DOSLFN while in DOS mode to activate LFN. Without it, none of the scripts will work because they all point to non-existant file names. -There's a set of Makefiles out there for compiling OpenSSL with DJGPP but without using the bash shell, I believe it's being distributed by the maker of Wattcp-32? Don't bother using it, the bash shell works fine, and I believe those Makefiles are for very old versions of OpenSSL anyway (the readme says 0.9.4+). Get the bash shell from DJGPP's ftp site and simply run the executable in DOS. Before running it, however, be sure to set your environment variables PATH and WATT_ROOT, which should respectively point to your DJGPP bin and Wattcp-32 source + compiled library root directory (NB: I made the mistake of not compiling Wattcp-32 first, be sure to do this before starting on OpenSSL, you need both the Wattcp-32 source and library) in *nix-style format. So if DJGPP is in C:\DJGPP, use the line "set PATH=/djgpp/bin" (and set WATT_ROOT similarly). Don't use the standard DOS-style format, because once you're in bash the shell expects forward slashes. You may or may not need to set the DJGPP variable, but I did for safety's sake using the same *nix-style format. -I found bash to be very flaky, especially with globbing (tab completion) and dealing with non-existant file names. Be sure to use "ls" frequently and only enter full path names. -In the above mentioned set of Makefiles, it mentioned that zlib was necessary and that it could be found on DJGPP's site. FWIW, the Configure script for OpenSSL 0.9.8k (and other versions, I assume) lets you disable zlib support with the "no-zlib" option, but I'm not sure exactly what capabilities, if any, were lost by this. Regardless, I couldn't find a precompiled version of zlib for DOS/DJGPP anywhere on DJGPP's site or anywhere else. Maybe it's in one of DJGPP's strangely named ZIP archives? -Ignore any instructions that tell you to enter "/dev/env/DJGPP", or something like that. I'm not sure how it works, but I believe that DJGPP somehow sets /dev/env through the DJGPP.ENV file and that /dev/env/DJGPP is magically supposed to point to DJGPP's root dir. I got a lot of errors fiddling around with this and I found that it was simply easier to use absolute path names. Case in point, OpenSSL's instructions for DJGPP tell you to use Configure with "--prefix=/dev/env/DJGPP". This was confusing and I thought that maybe it was a special custom usage, but it's not, the prefix option does exactly what it does for other configure scripts. Simply point it to wherever you want OpenSSL to install. -Don't forget to run "make depend" before running "make" if you use a lot of arguments with the Configure script like I did! The compile should remind you to do this if it's necessary. -It's obvious, but it's not stated in the DJGPP installation directions: "make install" will install your library once it's done compiling. -Don't be concerned if the compile seems to take a very long time. I ran it under MS-DOS 7.1 on my Athlon 64 1.1 GHz laptop and it took about an hour or two. There must be something very inefficient about the compile or else it wouldn't take that long, I think. -Note that DOS still runs on 64-bit CPU's =) I got tired of my project so I never tested the OpenSSL library that I compiled, but even if it turned out faulty these notes should help give you a good start. I'm particularly concerned about not using zlib, though I suspect that its main disadvantage is that it makes SSL transactions slower rather than actually crippling functionality. Hope that helps! Best, Ersin ----- Original message ----- Hi Ersin, If you don't have your heart set on compiling the librayr yourself, use Shinig Light's prebuilt version. Thomas builds and provides libraries for both static and dynamic linking, and includes the Dlls and OpenSSL.exe. x86 and x64. No Cygwin, Perl, or other Linux gear required. Work out of visual studio as expected. As a Windows user, I find it to be the easiest way. http://www.slproweb.com/products/Win32OpenSSL.html Jeff On Wed, Oct 28, 2009 at 7:51 PM, Ersin Akinci <ersin.aki...@gmail.com> wrote: > Hi all, > > I'm trying to compile OpenSSL 0.9.8k in MS-DOS 7.1 with DJGPP and I > keep getting errors stating that various utilities cannot be found > under the "djgppbin" directory. All of my environment variables are > correctly set and ./Configure runs fine, but this strange error keeps > coming up. Perhaps the scripts are parsing slashes incorrectly (i.e., > should be "djgpp/bin", not "djgppbin")? > > Virtually the same error happened to someone else, but that person > also had something else wrong with their set-up, so the "djgppbin" > error was never resolved: > http://marc.info/?l=openssl-users&m=120945340207568&w=2 > > I can't just copy and paste my exact error because it's on a > non-networked DOS computer, but here's the relevant portion from the > other guy's e-mail: > >> [SNIP] > > Etc. > > Could someone help me out? > > Thanks, > Ersin