[smartmontools-support] State of OS/2 port
Dave Yeo
dyeo at gmx.com
Wed Aug 5 18:13:27 CEST 2026
Christian Franke wrote:
> Dave Yeo wrote
>
>
>> ...
>>> Or alternatively, is there any free cross-toolchain available?
>>>
>>
>> Yes, recently available. https://github.com/komh/cross-os2emx/ which
>> should easily build smartmontools. Only available for Linux and Mac
>> currently.
>
> Thanks for the useful hint. It actually builds out of the box on Ubuntu
> 26.04. I added this to one of our GH workflows.
>
> If possible, please test the 'os2emx' artifact from the most recent run:
> https://github.com/smartmontools/smartmontools/actions/workflows/build-manually.yml
>
> Strings in the .exe suggest that the included libcn0.dll is required.
smartctl.exe runs fine here. It is big compared to the one I built,
5.8MB compared to 1.1MB. I'd suggest using LDFLAGS=-Zomf in the
configure arguments. GCC outputs aout objects on OS/2, the -Zomf calls
emxomf to convert to OMF (obj) format and uses the system linker
(OpenWatcom's wlink in this case) instead of the ancient ld, which is so
old it is GPL v1 authored by RMS, with lots of updates over the years.
>
> Fully static build did not work because the required libraries are not
> included in the package.
Libc (libcn0.dll) is not available statically due to licensing. It is
usually not packaged with binaries to make sure the system libcn0.dll is
loaded. Weird bugs when an older libc is loaded by something before the
system one as it is used globally.
> Build of the shared library (libsmartmon.dll) is apparently not
> supported by libtool on this platform.
Try --enable-shared --disable-static, should build smartmon.dll, or here
smartmo0.dll. OS/2 is limited to 8.3 DLL naming. The lib prefix is also
optional for static libs.
By default, configure only built a static library here, it is probably
best to stick to static to avoid LIBPATH issues.
...
Dave
More information about the Smartmontools-support
mailing list