Need help cross-compiling OPENSSL for five different targets, each running the QNX operating system

Williams, Roger roger.williams at Wabtec.com
Mon Nov 1 20:55:47 UTC 2021


The cross-compilation will be performed on a server running:

    Linux Splinter 2.6.32-5-686 #1 SMP Tue May 13 16:33:32 UTC 2014 i686 GNU/Linux

The 5 targets I need to make for are:


  1.  QNX 6.5.0, PPCBE-SPE
  2.  QNX 6.5.0, PPCBE
  3.  QNX 6.5.0, X86
  4.  QNX 6.3.2, PPCBE
  5.  QNX 6.3.2, X86

The compiler (script) used to do the cross compile is qcc99:

    #! /bin/sh
    qcc -Wc,-std=gnu99 "$@"

The configuration settings used for SSH for the same 5 targets are:

  1.  QNX 6.5.0, PPCBE-SPE:

./configure --with-privsep-user=sshd --host=powerpc-unknown-nto-qnx6.5.0 --build=x86 --prefix=   CC='qcc99 -V4.4.2,gcc_ntoppcbespe' CPPFLAGS="-I$HOME/qnx650-ppcbespe/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE" CFLAGS='-g -O2 -me500v2' LDFLAGS="-L$HOME/qnx650-ppcbespe/lib -static"

  1.  QNX 6.5.0, PPCBE

./configure --with-privsep-user=sshd --host=powerpc-unknown-nto-qnx6.5.0 --build=x86 --prefix=   CC='qcc99 -V4.4.2,gcc_ntoppcbe' CPPFLAGS="-I$HOME/qnx650-ppcbe/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE" CFLAGS='-g -O2' LDFLAGS="-L$HOME/qnx650-ppcbe/lib -static"

  1.  QNX 6.5.0, X86:

./configure --with-privsep-user=sshd --host=i486-pc-nto-qnx6.5.0 --build=x86 --prefix=   CC='qcc99 -V4.4.2,gcc_ntox86' CPPFLAGS="-I$HOME/qnx650-x86/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE" CFLAGS='-g -O2' LDFLAGS="-L$HOME/qnx650-x86/lib -static"

  1.  QNX 6.3.2, PPCBE:

./configure --with-privsep-user=sshd --host=powerpc-unknown-nto-qnx6.3.0 --build=x86 --prefix=   CC='qcc99 -V3.3.5,gcc_ntoppcbe' CPPFLAGS="-I$HOME/qnx632-ppcbe/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE" CFLAGS='-g -O2' LDFLAGS="-L$HOME/qnx632-ppcbe/lib -static"

  1.  QNX 6.3.2, X86:

./configure --with-privsep-user=sshd --host=i386-pc-nto-qnx6.3.0 --build=x86 --prefix=   CC='qcc99 -V3.3.5,gcc_ntox86' CPPFLAGS="-I$HOME/qnx632-x86/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE" CFLAGS='-g -O2' LDFLAGS="-L$HOME/qnx632-x86/lib -static"


Note that QNX 6.5.0 uses the GCC Version 4.4.2 compiler and QNX 6.3.2 uses the GCC Version 3.3.5 compiler.  In both cases, it is invoked with QCC, not GCC.

I downloaded and tried to make SSH version 8.8.  After configuring it and running make, I eventually get the following error:

qcc99 -V4.4.2,gcc_ntoppcbespe -g -O2 -me500v2 -Wall -Wextra -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -Wno-unused-parameter -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-all   -fPIC -I. -I.. -I. -I./.. -I/home/williams/ssh/qnx650-ppcbespe/include -D_XOPEN_SOURCE=600 -D_QNX_SOURCE -DHAVE_CONFIG_H -c openssl-compat.c
In file included from openssl-compat.c:32:
openssl-compat.h:37:3: error: #error OpenSSL 1.0.1 or greater is required
cc: /opt/qnx650/host/linux/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/cc1 error 1
make[1]: *** [openssl-compat.o] Error 1
make[1]: Leaving directory `/home/williams/ssh/qnx650-ppcbespe/openbsd-compat'
make: *** [openbsd-compat/libopenbsd-compat.a] Error 2


In response, I downloaded OPENSSL Version 1.1.1l.  I have no idea how to configure this to make it cross-compile for the 5 targets I need the libraries for versus compiling for the server I am compiling on.  If someone can help me configure this for one of the targets, I can manage to do it for the other 4 four.


This email and any attachments are only for use by the intended recipient(s) and may contain legally privileged, confidential, proprietary or otherwise private information. Any unauthorized use, reproduction, dissemination, distribution or other disclosure of the contents of this e-mail or its attachments is strictly prohibited. If you have received this email in error, please notify the sender immediately and delete the original. Neither this information block, the typed name of the sender, nor anything else in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20211101/e466ae6e/attachment-0001.html>


More information about the openssl-users mailing list