
On AIX 6.1 using IBM's XLC compiler, I do "configure" and that successfully completes. However, when I "make", it fails due to the parameters "-fstack-protector" and "-fPIE"... apparently it couldn't find the files "stack-protector" and "PIE" as "-f" specifies a file. However, gcc and perhaps many other cc variants, "-f" specifies a compile option. I was able to compile with XLC by ripping out the "stack-protector" and "PIE" sections of "configure" and running "make" but it would be best to use the stack protector mechanisms used for AIX's XLC: https://www.ibm.com/developerworks/mydeveloperworks/blogs/b10932b4-0edd-4e61... Has anyone compiled Stunnel 5.26 using IBM's XLC without removing the stack-protector and PIE sections in the configure file? The other option is to use gxlc instead of xlc to map the GNU C compiler options to XLC options. Would that be preferred (less modification of configure file)? I was able to get that working, but still an unusually high number of warnings. http://geco.mines.edu/files/manuals/xlc/mapping.pdf The article above (from IBM) has "-qstackprotect=size=N" - what suggestion parameter to use for "N"? To be nice to everyone's mailbox, I have posted the logs here: Stunnel 5.26 AIX XLC - fails http://pastebin.ca/3250237 Stunnel 5.26 AIX GXLC - passes http://pastebin.ca/3250242 Thanks, -Rob

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 13.11.2015 02:35, Rob Lockhart wrote:
On AIX 6.1 using IBM's XLC compiler, I do "configure" and that successfully completes. However, when I "make", it fails due to the parameters "-fstack-protector" and "-fPIE"... apparently it couldn't find the files "stack-protector" and "PIE" as "-f" specifies a file.
I use: https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.ht ml https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html macros to check whether the compiler/linker accepts specific flags. See the configre.ac script for details. The preferred solution would be to fix those macros. Implementing workarounds for specific compilers is obviously not a good idea. Maybe I should only check those options if gcc is detected. What do you think? Best regards, Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWRb7GAAoJEC78f/DUFuAUNvAP/2v8wsSr5cyZ5S6Si5y/dJeg iYGYNoHnDe5ln5uX7yhqRM6DnJSkBB0bFlpojGzSMyYnrLIDoTlKYGRwdi/luSVa hRo7daPRYv7jHS/pjSq7NkyHFz+9AAg0VebnUOb8mgHKK+4hz9ZY/JHO9cp6iPlu qTAqOhqXKhOk5Fj38hIvKaPJtqeeGJU8eXW8logqBx7WKGQ+JZsVXEz+011TIhPG NydY6yWvXGs8/pkbkfcSM4bd1eRrfepZ4NEgW7iLCaGlJEPAz6ObI7BwFG67sOcj YGrQhD5VgGRNzwhJkMNoQprH3Xwk9LekUN22K6EDDuzOUUt3zhed/fozFLzb1nYQ GeCm+u6B6l0A+qQxTP0ZPql71mHFVsqEQg85YwLXH5BLWvcHBjTt0wyiqKLn5MIi UKp8iah6eRInEzDxRieN19W5shFazLoymT/8JjWrDkKCXu2vdVSpS5SoE6daxWoa GnDlMZDBUz1RiDOhbKB6+4TXgbJjI7x/fukJUyMZV4O9jz+AlDSqELQwQ7GDQ+r+ 3cRI/g6FDr80bSQRPwuhuI2UKYXJmRwFQgkDqiH0zOYCSH6vFDgN/cscDMMsOLI6 kXYtkJku9b5mWeJDP4o7YPDeDUXLUGELTrR5vbePK4l2WPJVCOeIPFu6WKMcC3il BNSI6lkSWKBN5tdraHSA =HFGU -----END PGP SIGNATURE-----

Hi Michal, Am 13.11.2015 um 11:43 schrieb Michal Trojnara <Michal.Trojnara@mirt.net>:
On 13.11.2015 02:35, Rob Lockhart wrote:
On AIX 6.1 using IBM's XLC compiler, I do "configure" and that successfully completes. However, when I "make", it fails due to the parameters "-fstack-protector" and "-fPIE"... apparently it couldn't find the files "stack-protector" and "PIE" as "-f" specifies a file.
I use: https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.ht ml https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html macros to check whether the compiler/linker accepts specific flags. See the configre.ac script for details.
The preferred solution would be to fix those macros. Implementing workarounds for specific compilers is obviously not a good idea. Maybe I should only check those options if gcc is detected. What do you think?
I think this is a good idea. Other projects deal with the issue in a similar way. On Oracle Studio the compiler flags are basically ignored and issue a warning but produce a working binary, but the build process is cluttered with warnings. Even when you fix the macros this issue would stay, so restricting the checks to gcc is probably the best way. Best regards — Dago -- "You don't become great by trying to be great, you become great by wanting to do something, and then doing it so hard that you become great in the process." - xkcd #896

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 13.11.2015 11:46, Dagobert Michelsen wrote:
I think this is a good idea. Other projects deal with the issue in a similar way. On Oracle Studio the compiler flags are basically ignored and issue a warning but produce a working binary, but the build process is cluttered with warnings. Even when you fix the macros this issue would stay, so restricting the checks to gcc is probably the best way.
Please try: https://www.stunnel.org/downloads/beta/stunnel-5.27b3.tar.gz Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWRcxwAAoJEC78f/DUFuAUTrEP/0uNXtDXjU3/UFbPIvw4VGWx spvu4zceCaEGNiUndXzftN6MW6UUK6MnAxlj0l0+hQt8EMrJhRI/B+lcbTVRov8f 3Da0gGjF3ibW1/KeqIeBdjCECmov30q0nedwV3wep5EoqJ9UIRy1725JAknuFfqh p1JadZMEtMOZWGQJFbPj244Q5vjgJIMY1kkOyl+tCvw2csKwCuO95f/Uf0HSZrkl DTliDyCOMcWeNbuBhI11PewbLMwBKFgZl1jamdJg++zhnPKFRBW0PRY7YFQeKp08 XAxLSfr/Mo0SiK3tejdOhvYyagVTJB8lCA2vL4Fd1t1zdmmBihg/sLTqFCj6Infu swnSBMeiM0gkv4q1bTOxFuZ4orG+ddeeCtHWC2vG9V0R5IuJZ81YVmeSuF9H+/DN +D/vkBJPMQ0wDskQ7w0eFbGolhRv7dIeEVygDdJhxTO2N+yjYI1ArzaY8iXlYazE BnnexNr51eu62CgFzjmkRTq0A2B143/efMpFpsycJTnxu3CH1YbHBPdTwVMT4zGT Z4fUCN8zFPx8nDDT9zgCeMu4lUOmha+rqW8UZczrcTswPja/k/WNUXQhdwwdmGr7 +GQKjkT464XtaKjO3mq2Hxv83nn1JY5XRang0GP6Sr+HMFS/13A75mJKCpbx4oN5 gBKWKwwH/N37TV/iVEDM =404y -----END PGP SIGNATURE-----

Hi Michal, Am 13.11.2015 um 12:41 schrieb Michal Trojnara <Michal.Trojnara@mirt.net>:
On 13.11.2015 11:46, Dagobert Michelsen wrote:
I think this is a good idea. Other projects deal with the issue in a similar way. On Oracle Studio the compiler flags are basically ignored and issue a warning but produce a working binary, but the build process is cluttered with warnings. Even when you fix the macros this issue would stay, so restricting the checks to gcc is probably the best way.
Please try: https://www.stunnel.org/downloads/beta/stunnel-5.27b3.tar.gz
This looks good, I tested with both Oracle Studio and GCC 4.9.2 Best regards — Dago -- "You don't become great by trying to be great, you become great by wanting to do something, and then doing it so hard that you become great in the process." - xkcd #896

Mike, I tried with IBM's XLC 13.1.2 and these options were ignored: -Wall -Wpedantic -Wformat=2 -Wconversion -Wno-long-long -Wno-depreciated-declarations I compiled it as follows: cd ~/SRC; rm -rf stunnel-5.27; gzip -dc stunnel-5.27b3.tar.gz | tar xvf -; cd stunnel-5.27 export CFLAGS="-qstackprotect=size=0" ./configure --enable-fips --disable-ipv6 --with-threads=pthread --with-ssl=/usr make I didn't have to use "gxlc" (IBM's "gcc clone"), and other than the warnings for the unrecognized parameters above, it seems to work. I added the extra CFLAGS parameter to ensure stack smashing protection is enabled (disabled by default on XLC). I can see how it would be nearly impossible to maintain compatibility with compilers from different architectures and different versions with different arguments. Thanks for the patch! Regards, -Rob On Fri, Nov 13, 2015 at 6:41 AM, Michal Trojnara <Michal.Trojnara@mirt.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 13.11.2015 11:46, Dagobert Michelsen wrote:
I think this is a good idea. Other projects deal with the issue in a similar way. On Oracle Studio the compiler flags are basically ignored and issue a warning but produce a working binary, but the build process is cluttered with warnings. Even when you fix the macros this issue would stay, so restricting the checks to gcc is probably the best way.
Please try: https://www.stunnel.org/downloads/beta/stunnel-5.27b3.tar.gz
Mike -----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQIcBAEBCAAGBQJWRcxwAAoJEC78f/DUFuAUTrEP/0uNXtDXjU3/UFbPIvw4VGWx spvu4zceCaEGNiUndXzftN6MW6UUK6MnAxlj0l0+hQt8EMrJhRI/B+lcbTVRov8f 3Da0gGjF3ibW1/KeqIeBdjCECmov30q0nedwV3wep5EoqJ9UIRy1725JAknuFfqh p1JadZMEtMOZWGQJFbPj244Q5vjgJIMY1kkOyl+tCvw2csKwCuO95f/Uf0HSZrkl DTliDyCOMcWeNbuBhI11PewbLMwBKFgZl1jamdJg++zhnPKFRBW0PRY7YFQeKp08 XAxLSfr/Mo0SiK3tejdOhvYyagVTJB8lCA2vL4Fd1t1zdmmBihg/sLTqFCj6Infu swnSBMeiM0gkv4q1bTOxFuZ4orG+ddeeCtHWC2vG9V0R5IuJZ81YVmeSuF9H+/DN +D/vkBJPMQ0wDskQ7w0eFbGolhRv7dIeEVygDdJhxTO2N+yjYI1ArzaY8iXlYazE BnnexNr51eu62CgFzjmkRTq0A2B143/efMpFpsycJTnxu3CH1YbHBPdTwVMT4zGT Z4fUCN8zFPx8nDDT9zgCeMu4lUOmha+rqW8UZczrcTswPja/k/WNUXQhdwwdmGr7 +GQKjkT464XtaKjO3mq2Hxv83nn1JY5XRang0GP6Sr+HMFS/13A75mJKCpbx4oN5 gBKWKwwH/N37TV/iVEDM =404y -----END PGP SIGNATURE----- _______________________________________________ stunnel-users mailing list stunnel-users@stunnel.org https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel-users
participants (3)
-
Dagobert Michelsen
-
Michal Trojnara
-
Rob Lockhart