-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 The same result without CFLAGS: configure:17300: checking for mblen configure:17356: gcc -o conftest -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-strong -fPIE -D_XOPEN_SOURCE -Wl,-z,now -fstack-protector-strong -pie conftest.c -lnsl -lz -lsocket >&5 In file included from /usr/include/limits.h:17:0, from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/limits.h:168, from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/syslimits.h:7, from /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/limits.h:34, from conftest.c:163: /opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:346:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" #error "Compiler or options invalid for pre-UNIX 03 X/Open applications \ ^ configure:17362: $? = 1 configure: failed program was: 01.08.2016 20:52, Darren Tucker ?????:> On Tue, Aug 2, 2016 at 12:42 AM, Yuri Voinov <yvoinov at gmail.com> wrote: > [...] >>/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:346:2:>> error: #error "Compiler or options invalid for pre-UNIX 03 X/Open >> applications and pre-2001 POSIX applications" > > What's the code around line 364 of >/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h,> especially the enclosing ifdefs? > > [..] >> Seems can't. But why? 7.2 does. > > Dunno, I can't think of any obvious changes to compiler flags. Maybe > try it without setting CFLAGS? >-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXn2TdAAoJENNXIZxhPexGYmUH+gLxj08Xmva5sPYxIJ164wEH mHarbrR9l+mwaH7HDWYDxsCPTSzcF67lwFfT3xmXxSPUnNEwgvT6QRmzlOzL0BEH ely6nTnFoJYjfon/w9dny2eQLLaBHkg0BmgPIe+ljrIiV05LRDNUz7IBFfHsMtgp edeAGI1shJPAud52u/FMFX/uxyjsAFH88dw4VeBI4EO4DlrkFgW8SYznqRHbubq5 Qk9AfHQqZUwGIsgnmiiwiZmXjn1nQcK/E4a2fiEiiU/Uwg+1OhhFSmXFxQUiiIXR wxWfF/H3ldUHkovVW+xwO8agJnm9/bVAeVYDVULwwUtgnTdIwwOSQUEP3wlNiZg=UipS -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: 0x613DEC46.asc Type: application/pgp-keys Size: 2437 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160801/fed965a2/attachment.bin>
Having read up some more I think this is what I should have done. If you'd like to try this you will need to run "autoreconf" to rebuild configure before running ./configure again. diff --git a/configure.ac b/configure.ac index 1df3cbf..542bd93 100644 --- a/configure.ac +++ b/configure.ac @@ -754,6 +754,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) use_pie=auto check_for_libcrypt_later=1 check_for_openpty_ctty_bug=1 + dnl Target SUSv3/POSIX.1-2001 plus BSD specifics. + dnl _DEFAULT_SOURCE is the new name for _BSD_SOURCE + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE" AC_DEFINE([PAM_TTY_KLUDGE], [1], [Work around problematic Linux PAM modules handling of PAM_TTY]) AC_DEFINE([LOCKED_PASSWD_PREFIX], ["!"], @@ -1789,11 +1792,8 @@ AC_CHECK_FUNCS([ \ warn \ ]) -dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE. -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -D_XOPEN_SOURCE" +dnl Wide character support. AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth]) -CFLAGS="$saved_CFLAGS" AC_LINK_IFELSE( [AC_LANG_PROGRAM( -- Darren Tucker (dtucker at zip.com.au) GPG key 11EAA6FA / A86E 3E07 5B19 5880 E860 37F4 9357 ECEF 11EA A6FA (new) Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 With this change built ok. But patch must be quite different on my platform (see attached) for portable version. And, of course, after autoreconf run. 02.08.2016 10:55, Darren Tucker ?????:> --- a/configure.ac > +++ b/configure.ac > @@ -754,6 +754,9 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) > use_pie=auto > check_for_libcrypt_later=1 > check_for_openpty_ctty_bug=1 > + dnl Target SUSv3/POSIX.1-2001 plus BSD specifics. > + dnl _DEFAULT_SOURCE is the new name for _BSD_SOURCE > + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE-D_DEFAULT_SOURCE"> AC_DEFINE([PAM_TTY_KLUDGE], [1], > [Work around problematic Linux PAM modules handling of PAM_TTY]) > AC_DEFINE([LOCKED_PASSWD_PREFIX], ["!"], > @@ -1789,11 +1792,8 @@ AC_CHECK_FUNCS([ \ > warn \ > ]) > > -dnl Wide character support. Linux man page says it needs _XOPEN_SOURCE. > -saved_CFLAGS="$CFLAGS" > -CFLAGS="$CFLAGS -D_XOPEN_SOURCE" > +dnl Wide character support. > AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth]) > -CFLAGS="$saved_CFLAGS" > > AC_LINK_IFELSE( > [AC_LANG_PROGRAM(-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXoOKPAAoJENNXIZxhPexGVW0H/31u6MjEkSbE7Zr1hFBh+8q6 EV3IvsZmgQlh+c+mo1/HoT7xKOeQT6kQT9dP/o0sQOE7JBusMi6ggLprwxc1BAPg rAvihynLOcIJZT+pEmnf9Ov68votwpRa6s1TsiT+g/KYPIwTSFsSAPavxURbmf5o rIJ0fO4cit37erDD/rfIXd6q1BrhLSbhb2CyWbPJ/WhDTLqUeGAdU2CVAZCJB67o LgKLdbkvV03WDG6R5FBKmOwI+EJm9DPVgkuMFrQfOY/G60uEF+fi5nwmc6yCyDII nz/7mzLYAvM8/iGOEnmXlz122qB0hx16n9JX3aIxUTEDjaz6LXIEaO/NAm56Evs=sTxS -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: 73_solaris10_build_issue.patch Type: text/x-patch Size: 831 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160803/a53f8ae2/attachment-0002.bin> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0x613DEC46.asc Type: application/pgp-keys Size: 2437 bytes Desc: not available URL: <http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20160803/a53f8ae2/attachment-0003.bin>
Possibly Parallel Threads
- weird make errors on portable snapshots
- OpenSSH 7.3p1 can't be build on Solaris 10
- immediate "gotcha" in compilation!? 6.6p1 versus openssl 1.0.1g
- [Bug 2618] New: net-misc/openssh-7.2_p2: Terribly slow Interactive Logon
- unexpected behaviour in OpenSSH_3.7.1