Skip to content

Fix the QNX 8.0 build for Makefile and CMake - #1672

Open
jclsn wants to merge 5 commits into
eclipse-paho:masterfrom
jclsn:fix/qnx8-build
Open

Fix the QNX 8.0 build for Makefile and CMake#1672
jclsn wants to merge 5 commits into
eclipse-paho:masterfrom
jclsn:fix/qnx8-build

Conversation

@jclsn

@jclsn jclsn commented May 14, 2026

Copy link
Copy Markdown

Fixes the QNX 8.0 build for Makefile and CMake.

Supersedes #1602

Fixes the Make and CMake builds

Changes:

Code:

  • SHA1.c: endian handling via gulliver.h
  • Define AI_ADDRCONFIG=0, since it is not defined in all QNX versions

CMake:

  • Add -D_QNX_SOURCE

Makefile:

  • Removed -pthread, since is implied in QNX
  • Added -lsocket, which is mandatory in QNX for networking
  • Removed -ldl, since is not available in QNX
  • defaults to qcc for QNX and gcc for Linux and Darwin in Makefile

Build instructions:

cmake -DCMAKE_SYSTEM_NAME=QNX -B build -S .
cmake --build build

or

make OS_TYPE=QNX

This builds with qcc by default, but you can specify CC=ntoaarch64-gcc
or CC=ntox86_64-gcc

  • QNX cross-compilation works with qcc and ntoaarch64-gcc and ntox86_84-gcc
  • Native QNX build works
  • Additionally verified correct behavior for the Linux build
  • Fixed some indendatation and const qualifier warnings, I was annoyed by. Can drop them if desired.

@jclsn jclsn changed the title Fix/qnx8 build Fix the QNX 8.0 build for Makefile and CMake May 14, 2026
@jclsn

jclsn commented May 14, 2026

Copy link
Copy Markdown
Author

@icraggs Can you please have a look?

@jclsn
jclsn force-pushed the fix/qnx8-build branch 2 times, most recently from df1a6a3 to 60a5c70 Compare May 14, 2026 09:03
@jclsn
jclsn marked this pull request as draft May 14, 2026 09:34
Fixes the Make and CMake builds

Changes:

Code:
- SHA1.c: endian handling via gulliver.h
- Define AI_ADDRCONFIG=0, since it is not defined in all QNX versions

CMake:
- Add -D_QNX_SOURCE

Makefile:
- Removed -pthread, since is implied in QNX
- Added -lsocket, which is mandatory in QNX for networking
- Removed -ldl, since is not available in QNX
- defaults to qcc for QNX and gcc for Linux and Darwin in Makefile

Build instructions:

cmake -DCMAKE_SYSTEM_NAME=QNX -B build -S .
cmake --build build

or

make OS_TYPE=QNX

This builds with qcc by default, but you can specify CC=ntoaarch64-gcc
or CC=ntox86_64-gcc

Signed-off-by: Jan Claußen <jan.claussen10@web.de>
@jclsn
jclsn force-pushed the fix/qnx8-build branch 2 times, most recently from c6fa03d to a2c7905 Compare May 14, 2026 12:54
@jclsn
jclsn marked this pull request as ready for review May 14, 2026 12:54
@jclsn
jclsn force-pushed the fix/qnx8-build branch from a2c7905 to 2ae10d9 Compare May 14, 2026 13:09
@jclsn jclsn mentioned this pull request May 18, 2026
jclsn added 4 commits May 18, 2026 10:56
For some reasons QNX does not correctly create the symlinks to the
shared objects missing the minor and major version. Explicitely cd'ing
into the build folder and creating them there, fixes this.

Works on Linux as well.

Signed-off-by: Jan Claußen <jan.claussen10@web.de>
Signed-off-by: Jan Claußen <jan.claussen10@web.de>
Signed-off-by: Jan Claußen <jan.claussen10@web.de>
Signed-off-by: Jan Claußen <jan.claussen10@web.de>
@jclsn
jclsn force-pushed the fix/qnx8-build branch from 2ae10d9 to 05f478b Compare May 18, 2026 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant