Tag Archives: openssl
Building OpenSSL with OpenWatcom on ArcaOS: Second Porting Effort
I’ve written before about my OpenSSL port to OS/2. I’m doing this with OpenWatcom 1.9 on the ArcaOS flavour of OS/2.
Building with no Assembler
First, we copy
OS2-OW-NOASM.cmd and then make the new file run
perl Configure OS2-OW no-asm and
perl util\mk1mf.pl no-asm OS2-OW > OS2-OW.mak.
Then it’s just a matter of building the make file with
OS2\OS2-OW-NOAM.cmd and building with
wmake -u -c -f OS2-OW.mak.
This builds the libraries
crypto.lib plus a few applications. Some of them work.
This file fails to build with the error message
.\apps\ca.c(86): Error! E1055: Unable to open 'sys/file.h' and we fix that by adding
on line 85 where it’s including
sys/file.h and now this application builds also.
Now that we have
ssl.lib it’s time to try out OpenSSL with a simple example. Copying some code from the internet, and trying it out, we get a mysterious crash inside
SSL_CTX_new( method )
which causes the example program to terminate.
In order to debug this problem, we start by changing the optimization parameters and replace them with debugging symbols. In
util/pl/OS2-OW.pl we make
$cflags="-DL_ENDIAN -d2 ";
in order for OpenSSL to be built with debugging symbols instead of optimizations.
Then we just delete everything in the
tmp/ directories and build all over again with
wmake -u -c -f OS2-OW.mak.
Lo and behold, there is no crash when we link with the new
.lib files. This is definitely a Heisenbug.
We now have a somewhat functioning OpenSSL port and can make simple applications such as
hello, world work, albeit with a debug build, but more research is needed before the port can be considered finished. Particularly because there is a Heisenbug in the optimized version, which could be a code generation bug in OpenWatcom, or a symptom of something broken inside OpenSSL.
Do you need professional help with OS/2? Write to email@example.com.
Building OpenSSL with OpenWatcom on ArcaOS: First Porting Effort
I have previously written about my OpenSSL port to OS/2. Here I go over the first C code changes that make it compile with OpenWatcom 1.9.
As previously mentioned, I’m doing this on ArcaOS; so some Unix-ism will be present in the build system. This is apparently unavoidable, and fortunately, ArcaOS already comes with a lot of Unix ports; both out of the box and installed through yum (or the Arca Noae Package Manager).
The following changes leave us with a port that builds for the most part. Some parts will need more changes before they are strictly “correct” and we’ll return to those later.
Continue reading Building OpenSSL with OpenWatcom on ArcaOS: First Porting Effort
Building OpenSSL with OpenWatcom on ArcaOS: The Initial Hurdles
Building OpenSSL on a new system or compiler presents a lot of hurdles. The build system is a perl hack upon a perl hack; and no documentation about how it works, from what I can tell.
I am porting OpenSSL 1.0.2, which is what the software I want to work on expects. Hopefully my work can be applied to other versions as well.
Here I go through the initial steps to get a working build system on ArcaOS 5, also known as OS/2, using the OpenWatcom compiler; even though OpenSSL has already been ported to the EMX runtime, with GCC.
Because we’re using perl, the steps here are taken after installing perl with
yum install perl
and this gives us a working build system with the changes below, so the real work on porting OpenSSL can start.
Continue reading Building OpenSSL with OpenWatcom on ArcaOS: The Initial Hurdles