$ env | sort
CC=/opt/studio/SOS11/SUNWspro/bin/cc
CFLAGS=-erroff -xstrconst -xildoff -xarch=386 -xnolibmil -Xa -KPIC
-xregs=no%frameptr -xlibmieee -mc -xs -g -nofstore -ftrap=%none -fsimple=0
-Qy -V -xbuiltin=%none -xchip=pentium_pro -xdebugformat=dwarf -xtime
-xunroll=1 -DSOLARIS2=8 -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
-D_TS_ERRNO
COLUMNS=80
CXX=/opt/studio/SOS11/SUNWspro/bin/CC
EDITOR=/usr/xpg4/bin/vi
HOME=/home/dclarke
LANG=C
LC_ALL=C
LC_COLLATE=C
LC_CTYPE=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
LD=/usr/ccs/bin/ld
LIBS=-lpthread -mt
LINES=24
LOGNAME=dclarke
MAIL=/usr/mail/dclarke
PAGER=/usr/xpg4/bin/more
PATH=/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/studio/SOS11/SUNWspro/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/opt/schily/bin
PWD=/export/medusa/dclarke/build/postfix/i386/postfix-2.8.1_i386.001
SHELL=/bin/ksh
SRC=/shared/gar/src
SSH_CLIENT=192.168.35.7 52112 22
SSH_CONNECTION=192.168.35.7 52112 192.168.35.42 22
SSH_TTY=/dev/pts/2
TERM=vt100
TZ=GMT0
USER=dclarke
VISUAL=/usr/xpg4/bin/vi
_=/usr/xpg4/bin/env
$
$ make makefiles CC=/opt/studio/SOS11/SUNWspro/bin/cc
make -f Makefile.in MAKELEVEL= Makefiles
(echo "# Do not edit -- this file documents how Postfix was built for your
machine."; /bin/sh makedefs) >makedefs.tmp
set +e; if cmp makedefs.tmp conf/makedefs.out; then rm makedefs.tmp; \
else mv makedefs.tmp conf/makedefs.out; fi >/dev/null 2>/dev/null
set -e; for i in src/util src/global src/dns src/tls src/xsasl src/milter
src/master src/postfix src/fsstone src/smtpstone src/sendmail src/error
src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr
src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias
src/postcat src/postconf src/postdrop src/postkick src/postlock
src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn
src/flush src/verify src/virtual src/proxymap src/anvil src/scache
src/discard src/tlsmgr src/postmulti src/postscreen src/dnsblog
src/tlsproxy; do \
(set -e; echo "[$i]"; cd $i; rm -f Makefile; \
make -f Makefile.in Makefile MAKELEVEL=) || exit 1; \
done;
[src/util]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/global]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/dns]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/tls]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/xsasl]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/milter]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/master]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postfix]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/fsstone]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/smtpstone]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/sendmail]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/error]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/pickup]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/cleanup]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/smtpd]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/local]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/trivial-rewrite]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/qmgr]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/oqmgr]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/smtp]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/bounce]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/pipe]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/showq]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postalias]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postcat]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postconf]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postdrop]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postkick]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postlock]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postlog]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postmap]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postqueue]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postsuper]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/qmqpd]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/spawn]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/flush]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/verify]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/virtual]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/proxymap]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/anvil]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/scache]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/discard]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/tlsmgr]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postmulti]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/postscreen]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/dnsblog]
cat ../../conf/makedefs.out Makefile.in >Makefile
[src/tlsproxy]
cat ../../conf/makedefs.out Makefile.in >Makefile
rm -f Makefile; (cat conf/makedefs.out Makefile.in) >Makefile
$ make
rm -f libexec/post-install && ln -sf ../conf/post-install
libexec/post-install
rm -f libexec/postfix-files && ln -sf ../conf/postfix-files
libexec/postfix-files
rm -f libexec/postfix-script && ln -sf ../conf/postfix-script
libexec/postfix-script
.
.
.
[src/postalias]
/opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
-DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
postalias.c
/opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
-DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -o
postalias postalias.o ../../lib/libglobal.a ../../lib/libutil.a -lresolv
-lsocket -lnsl
cp postalias ../../bin
[src/postcat]
/opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
-DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
postcat.c
/opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
-DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -o
postcat postcat.o ../../lib/libglobal.a ../../lib/libutil.a -lresolv
-lsocket -lnsl
cp postcat ../../bin
[src/postconf]
/usr/xpg4/bin/awk -f auto.awk
touch autos_dummy
/usr/xpg4/bin/awk -f extract.awk ../*/*.c | /bin/sh
touch makes_dummy
/opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
-DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
postconf.c
"str_table.h", line 46: non-constant initializer involving a cast
cc: acomp failed for postconf.c
*** Error code 2
make: Fatal error: Command failed for target `postconf.o'
Current working directory
/export/medusa/dclarke/build/postfix/i386/postfix-2.8.1_i386.001/src/postconf
*** Error code 1
make: Fatal error: Command failed for target `update'
$
Also the -DNO_DEV_URANDOM seems wrong given :
$ ls -l /dev/urandom
lrwxrwxrwx 1 root root 34 Feb 19 2008 /dev/urandom ->
../devices/pseudo/random@0:urandom
Which works fine.
$ /usr/xpg4/bin/od -Ax -t x1 -N 16 /dev/urandom | /bin/head -1
0000000 e5 c5 a8 13 b6 6c fc b9 40 df a0 46 9c a2 0f 7e
$
--
Dennis Clarke
dcl...@opensolaris.ca <- Email related to the open source Solaris
dcl...@blastwave.org <- Email related to open source for Solaris
> /opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
> -DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
> -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
> postconf.c
> "str_table.h", line 46: non-constant initializer involving a cast
> cc: acomp failed for postconf.c
What do you see on line 46 of str_table.h?
> Also the -DNO_DEV_URANDOM seems wrong given :
>
> $ ls -l /dev/urandom
> lrwxrwxrwx 1 root root 34 Feb 19 2008 /dev/urandom ->
> ../devices/pseudo/random@0:urandom
Which version of SunOS first introduced unconditional support for
/dev/urandom?
--
Viktor.
$ cat -n str_table.h | head -46 | tail -1
46 VAR_TLS_BUG_TWEAKS, DEF_TLS_BUG_TWEAKS, &var_tls_bug_tweaks, 0, 0,
>
>> Also the -DNO_DEV_URANDOM seems wrong given :
>>
>> $ ls -l /dev/urandom
>> lrwxrwxrwx 1 root root 34 Feb 19 2008 /dev/urandom ->
>> ../devices/pseudo/random@0:urandom
>
> Which version of SunOS first introduced unconditional support for
> /dev/urandom?
I don't know what you mean by "unconditional" but the feature was added to
Solaris 8 in :
Patch-ID# 112439-02
Keywords: random number generator prng
Synopsis: SunOS 5.8_x86: /kernel/drv/random patch
Date: Aug/15/2003
On Sparc that would be 112438-02.
In any case, a long time ago.
> >> $ ls -l /dev/urandom
> >> lrwxrwxrwx 1 root root 34 Feb 19 2008 /dev/urandom ->
> >> ../devices/pseudo/random@0:urandom
> >
> > Which version of SunOS first introduced unconditional support for
> > /dev/urandom?
>
> I don't know what you mean by "unconditional" but the feature was added to
> Solaris 8 in :
> Patch-ID# 112439-02
That's conditional on the SunOS patch. The question is which SunOS releases
*always* have /dev/urandom.
> > On Fri, Feb 25, 2011 at 12:35:48AM -0500, Dennis Clarke wrote:
> >
> >> /opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
> >> -DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
> >> -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
> >> postconf.c
> >> "str_table.h", line 46: non-constant initializer involving a cast
> >> cc: acomp failed for postconf.c
> >
> > What do you see on line 46 of str_table.h?
>
> $ cat -n str_table.h | head -46 | tail -1
> 46 VAR_TLS_BUG_TWEAKS, DEF_TLS_BUG_TWEAKS, &var_tls_bug_tweaks, 0, 0,
Well, DEF_TLS_BUG_TWEAKS is defined as the constant expression:
((TLS_BUG_TWEAK_A TLS_BUG_TWEAK_B)+1)
where TLS_BUG_TWEAK_A and TLS_BUG_TWEAK_B are string literals. In your
case: "" and " ". So the expression is:
(("" " ") + 1)
which should be the constant pointer to the second (NUL) character of " ".
Not quite sure why your compiler objects, but I guess the expression
needs to be simplified. :-(
Does the patch below solve the problem?
Index: src/global/mail_params.h
*** src/global/mail_params.h 23 Feb 2011 16:59:15 -0000 1.1.1.24.8.1
--- src/global/mail_params.h 25 Feb 2011 07:05:17 -0000
***************
*** 2988,3020 ****
#define DEF_TLS_PREEMPT_CLIST 0
extern bool var_tls_preempt_clist;
! #ifdef USE_TLS
!
! /*
! * The tweak for CVE-2005-2969 is needed in some versions prior to 1.0.0
! */
#if (OPENSSL_VERSION_NUMBER < 0x1000000fL)
! #define TLS_BUG_TWEAK_A " CVE-2005-2969"
#else
! #define TLS_BUG_TWEAK_A ""
#endif
-
- /*
- * The tweak for CVE-2010-4180 is needed in some versions prior to 1.0.1
- */
- #if (OPENSSL_VERSION_NUMBER < 0x1000100fL)
- #define TLS_BUG_TWEAK_B " CVE-2010-4180"
#else
! #define TLS_BUG_TWEAK_B " "
#endif
- #else /* USE_TLS */
- #define TLS_BUG_TWEAK_A ""
- #define TLS_BUG_TWEAK_B " "
- #endif /* USE_TLS */
-
#define VAR_TLS_BUG_TWEAKS "tls_disable_workarounds"
! #define DEF_TLS_BUG_TWEAKS ((TLS_BUG_TWEAK_A TLS_BUG_TWEAK_B)+1)
extern char *var_tls_bug_tweaks;
/*
--- 2988,3007 ----
#define DEF_TLS_PREEMPT_CLIST 0
extern bool var_tls_preempt_clist;
! /* The tweak for CVE-2010-4180 is needed in some versions prior to 1.0.1 */
! /* The tweak for CVE-2005-2969 is needed in some versions prior to 1.0.0 */
! #if defined(USE_TLS) && (OPENSSL_VERSION_NUMBER < 0x1000100fL)
#if (OPENSSL_VERSION_NUMBER < 0x1000000fL)
! #define TLS_BUG_TWEAKS "CVE-2005-2969 CVE-2010-4180"
#else
! #define TLS_BUG_TWEAKS "CVE-2010-4180"
#endif
#else
! #define TLS_BUG_TWEAKS ""
#endif
#define VAR_TLS_BUG_TWEAKS "tls_disable_workarounds"
! #define DEF_TLS_BUG_TWEAKS TLS_BUG_TWEAKS
extern char *var_tls_bug_tweaks;
/*
--
Viktor.
Well, two responses here :
1) that patch is deemed essential and no one, ever, runs without it
2) Solaris 9 provides SSH built in and thus it has a PRNG built
into the kernel. Guess which patch in the Solaris 9 beta
provides that feature? Yep, you guessed it, the one that
applies to Solaris 8 was actually a patch from the Sol 9
dev stage.
Anyways the hard answer is Solaris 9 but in practice Solaris 8.
>> > On Fri, Feb 25, 2011 at 12:35:48AM -0500, Dennis Clarke wrote:
>> >
>> >> /opt/studio/SOS11/SUNWspro/bin/cc -DNO_CLOSEFROM -DNO_DEV_URANDOM
>> >> -DNO_FUTIMESAT -Dstrcasecmp=fix_strcasecmp
>> >> -Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
>> >> postconf.c
>> >> "str_table.h", line 46: non-constant initializer involving a cast
>> >> cc: acomp failed for postconf.c
>> >
>> > What do you see on line 46 of str_table.h?
>>
>> $ cat -n str_table.h | head -46 | tail -1
>> 46 VAR_TLS_BUG_TWEAKS, DEF_TLS_BUG_TWEAKS, &var_tls_bug_tweaks, 0,
>> 0,
>
> Well, DEF_TLS_BUG_TWEAKS is defined as the constant expression:
>
> ((TLS_BUG_TWEAK_A TLS_BUG_TWEAK_B)+1)
>
> where TLS_BUG_TWEAK_A and TLS_BUG_TWEAK_B are string literals. In your
> case: "" and " ". So the expression is:
>
> (("" " ") + 1)
>
> which should be the constant pointer to the second (NUL) character of " ".
> Not quite sure why your compiler objects, but I guess the expression
> needs to be simplified. :-(
I could try with GCC but really it *should* compile with baseline Solaris
8 and Sun Studio 11 fully patched.
> Does the patch below solve the problem?
Let me try it and report back shortly !
Did I say thank you? Well people in the open source world need to say it
much more often. Postfix is simply the best and I thank thee from the
bottom of my heart and man .. I mean it !
I can confirm that my Solaris 9 test machine has /dev/urandom.
In fact, the makedefs script enables /dev/urandom access by default
for Solaris 9 and onwards.
My Solaris 8 test machine didn't have /dev/urandom, so I guess I
am in the category of "no one, ever" :-)
Wietse
You're totally in the category of "".. are you crazy?"
Patch that box !
Perhaps, if Postfix were hobbyist software, I might introduce
dependencies on optional software that is not required to build,
install, or run Postfix.
Instead, I have made Postfix run-time configurable, so that you
can configure main.cf for optional components that you add to the
system.
Anyway, thanks for pointing out the compiler error message. I don't
routinely compile Postfix with /opt/SUNWspro/bin/cc like I used
to, so I rely more on other people's reports.
Wietse