-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable building on AIX #2536
base: develop
Are you sure you want to change the base?
Enable building on AIX #2536
Conversation
This looks great, and I'd be happy to add support for new platforms, but your comment about OpenSSL is a bit concerning. The develop branch works just fine with version OpenSSL 1.1.1, which is now 3.5 years old. Is it really the case that this isn't packaged for AIX? I've no experience with AIX, but this page suggests that 1.1.1 is available: https://www.ibm.com/support/pages/downloading-and-installing-or-upgrading-openssl-and-openssh |
You are 100% correct. This development machine I am on does still seem to be using OpenSSL 1.0.2 for some reason. I foolishly thought that the missing symbols I encountered were related to a OpenSSL 3 migration in |
Apparently, and don't quote me on that, OpenSSL might not get updated to 1.1 automatically on AIX (yet). It is also possible that IBM is paying for extended support for OpenSSL 1.0.2, as is being offered on the OpenSSL website. In any case, I was now able to test this merge request with OpenSSL 1.1 and could build including SSL/TLS support. I reworded the commit message accordingly and fixed some additional issues along the way (a warning in Unfortunately, |
else | ||
ALL_DEPS:= | ||
endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two cjson patches seem unrelated to building on aix, are they just fixes for "building without json support" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latter, because the build seemed to fail when using WITH_CJSON=no
(cjson
does not seem to be available in the "AIX Toolbox for Open Source Software"). I used a separate commit but if you prefer, I can put this commit into another merge request, instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine as is for me, I'm not used to people doing that nicely :) I was just looking at the whole set
@@ -261,6 +261,7 @@ if(UNIX) | |||
set_target_properties(mosquitto PROPERTIES | |||
LINK_FLAGS "-Wl,-exported_symbols_list -Wl,${mosquitto_SOURCE_DIR}/src/linker-macosx.syms" | |||
) | |||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "AIX") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't you be adding your linker-aix.syms here too? (Or make it emit a warning that cmake isn't supported on AIX?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake
seems to generate an export file and adds some AIX export flags on its own. Using make VERBOSE=1
I noticed:
-Wl,-bE:CMakeFiles/libmosquitto.dir/objects.exp
I have no idea how cmake
handles this stuff but the build artifacts seem to work just the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool :) I'm not a cmake person either, just looked wrong here
@@ -651,7 +653,7 @@ int net__tls_load_verify(struct mosquitto__listener *listener) | |||
} | |||
|
|||
|
|||
#ifndef WIN32 | |||
#if !defined(WIN32) && !defined(_AIX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means you should probably update https://github.com/eclipse/mosquitto/blob/master/man/mosquitto.conf.5.xml#L1096 to include AIX there too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
The AIX operating system by IBM does not provide the getifaddrs function and requires a custom linker script syntax. This commit allows for a basic GCC build on AIX 7.2. The build was tested using the command lines make CC=gcc WITH_CJSON=no WITH_DOCS=no WITH_STATIC_LIBRARIES=yes and CC=gcc cmake <srcpath> -DDOCUMENTATION=no At this point, the persistence test suite seems to fail. The library, as well as the mosquitto_sub and mosquitto_pub executables were tested and appear to be functional. Signed-off-by: Andreas Kempf <[email protected]>
Signed-off-by: Andreas Kempf <[email protected]>
|
Hi, just checking in. Is there anything you would like to have changed? |
Sorry for bothering you, but is there a blocker for this pull request or do I just have to be patient? |
028adb2
to
604b69a
Compare
This merge request allows for a simple build on AIX using GNU make with or without cmake. The mosquitto develop branch uses an OpenSSL version that is not yet packaged for AIX, so TLS and web sockets need to be disabled. On the master branch, WITH_TLS could still be used.
Only the persistence test suite is currently failing.
make test
with your changes locally?