Re: troubles with buildworld/sendmail/sasl/clang

2013-03-22 Thread Robert Huff

Dimitry Andric writes:

>  Use the port, or the attached patch, to disable usage of
>  stdbool.h.

Using the patch, world now compiles successfully.

Thank you very much,


Robert Huff





___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-21 Thread Claus Assmann
On Thu, Mar 21, 2013, Dimitry Andric wrote:

> Use the port, or the attached patch, to disable usage of stdbool.h.

It might be a better idea to change
include/sm/os/sm_os_freebsd.h
to set SM_CONF_STDBOOL_H

See also libsm/README.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-21 Thread Dimitry Andric
On Mar 21, 2013, at 15:16, Anton Shterenlikht  wrote:
>   Kimmo Paasiala writes:
...
>   >  > 
> /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
>   >  > error: incompatible pointer types passing 'void ()' to parameter 
> of type
>   >  > 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, 
> ENVELOPE *)'
>   >  > [-Werror,-Wincompatible-pointer-types]
>   >  >getsasldata, NULL, XS_AUTH);
>   >  >^~~
...
> # cat /etc/make.conf
> SENDMAIL_CFLAGS+=   -I/usr/local/include -DSASL=2
> SENDMAIL_LDFLAGS+=  -L/usr/local/lib
> SENDMAIL_LDADD+=-lsasl2

Use the port, or the attached patch, to disable usage of stdbool.h.


sendmail-disable-stdbool-1.diff
Description: Binary data
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Re: troubles with buildworld/sendmail/sasl/clang

2013-03-21 Thread Anton Shterenlikht
Kimmo Paasiala writes:

>  > =buildworld===
>  >
>  > 
/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
>  > error: incompatible pointer types passing 'void ()' to parameter 
of type
>  > 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, 
ENVELOPE *)'
>  > [-Werror,-Wincompatible-pointer-types]
>  >getsasldata, NULL, XS_AUTH);
>  >^~~
>  > 
/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: note:
>  > passing argument to parameter here
>  > extern int  reply __P((MAILER *, MCI *, ENVELOPE *, time_t, 
void
>  > (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, 
int));
>  >
^
>  > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:129:21: note: 
expanded from
>  > macro '__P'
>  > #define __P(protos) protos  /* full-blown ANSI C */
>  > ^
>  > 3 errors generated.
>  > *** [usersmtp.o] Error code 1
>  
>  
>  I can not help with the error but I really have to make this 
question:
>  Does FreeBSD really have to support pre-ANSI C compilers in 2013?

I have been getting this also for at least the last two months.
(There is no src.conf; make.conf is appended.  Current system
is:

FreeBSD 10.0-CURRENT #0: Sun Dec 30 12:52:09 EST 2012  amd64 

and I have cyrus-sasl-2.1.26_2 installed and working with that
installation.)

Respectfully,


Robert Huff

me too, also on amd64 -current
no src.conf

# cat /etc/make.conf
SENDMAIL_CFLAGS+=   -I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS+=  -L/usr/local/lib
SENDMAIL_LDADD+=-lsasl2
WITH_PKGNG=yes
PERL_VERSION=5.16.2

Anton

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-21 Thread Robert Huff

Kimmo Paasiala writes:

>  > =buildworld===
>  >
>  > /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
>  > error: incompatible pointer types passing 'void ()' to parameter of type
>  > 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, ENVELOPE *)'
>  > [-Werror,-Wincompatible-pointer-types]
>  >getsasldata, NULL, XS_AUTH);
>  >^~~
>  > /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: 
> note:
>  > passing argument to parameter here
>  > extern int  reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void
>  > (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
>  >^
>  > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:129:21: note: expanded from
>  > macro '__P'
>  > #define __P(protos) protos  /* full-blown ANSI C */
>  > ^
>  > 3 errors generated.
>  > *** [usersmtp.o] Error code 1
>  
>  
>  I can not help with the error but I really have to make this question:
>  Does FreeBSD really have to support pre-ANSI C compilers in 2013?

I have been getting this also for at least the last two months.
(There is no src.conf; make.conf is appended.  Current system
is:

FreeBSD 10.0-CURRENT #0: Sun Dec 30 12:52:09 EST 2012  amd64 

and I have cyrus-sasl-2.1.26_2 installed and working with that
installation.)

Respectfully,


Robert Huff


make.conf


CFLAGS= -O -pipe -g 
STRIP= 
SYMVER_ENABLED= yes
X_WINDOW_SYSTEM=xorg
HAVE_MOTIF= yes

KERNCONF=JERUSALEM

# To avoid building various parts of the base system:
#   (copied from /usr/share/examples/etc/make.conf

NO_BIND_ETC=   true# Do not install files to /etc/namedb
NO_BLUETOOTH=  true# do not build Bluetooth related stuff
NO_PROFILE= true# Avoid compiling profiled libraries

#   to get automatic SASL in sendmail

SENDMAIL_CFLAGS+=   -I/usr/local/include/ -DSASL=2
SENDMAIL_LDFLAGS+=  -L/usr/local/lib
SENDMAIL_LDADD+=-lsasl2

#
#   to make CUPS magically keep working
#   See: http://www.csua.berkeley.edu/~ranga/notes/freebsd_cups.html
#

CUPS_OVERWRITE_BASE=yes
NO_LPR= true

#   added per /usr/ports/UPDATING entry 20090401

OVERRIDE_LINUX_BASE_PORT=f10
OVERRIDE_LINUX_NONBASE_PORTS=f10

#

WITH_MOZILLA=   libxul
WITH_GECKO= libxul

#
# added 2007/03/04 per advice of  
#   in re science/gramps
#

WITH_BERKELEYDB=db43
WITH_BDB_VER=43
WANT_OPENLDAP_VER=24
WANT_OPENLDAP_SASL=true

#
#  as required by ports/UPDATING of 20121012
#

SAMBA_ENABLE=YES

#
# PORTS: use clang unless gcc is explicitly required
#

#
# default to using clang for all port builds, with the following
# exceptions

# ports which will only build with the base system GNU compiler (4.2)
#
# the "make index" target also seems to need this, for some reason

.if target(index) | \
${.CURDIR:M*/devel/antlr*} | \
${.CURDIR:M*/devel/google-perftools* } | \
${.CURDIR:M*/graphics/ImageMagick* } | \
${.CURDIR:M*/graphics/opencv*} | \
${.CURDIR:M*/x11/kdelibs4*} | \
USE_GCC?=4.2
.endif

# ports which need *some* version of the GNU compiler (won't build with
# clang or have runtime issues if built with clang)
# use the highest version of gcc we have installed from ports (4.6)

.if ${.CURDIR:M*/accessibility/jovie*} | \
${.CURDIR:M*/accessibility/kdeaccessibility4*} | \
${.CURDIR:M*/audio/grip*} | \
${.CURDIR:M*/audio/mpg123*} | \
${.CURDIR:M*/audio/rosegarden*} | \
${.CURDIR:M*/databases/virtuoso*} | \
${.CURDIR:M*/deskutils/kdepimlibs4*} | \
${.CURDIR:M*/devel/apache-ant*} | \
${.CURDIR:M*/devel/icu*} | \
${.CURDIR:M*/devel/kdevelop-kde4*} | \
${.CURDIR:M*/devel/kdevplatform*} | \
${.CURDIR:M*/devel/log4j*} | \
${.CURDIR:M*/games/kdegames4*} | \
${.CURDIR:M*/graphics/tonicpoint-viewer*} | \
${.CURDIR:M*/java/* } | \
${.CURDIR:M*/lang/gcc* } | \
${.CURDIR:M*/math/fftw3*} | \
${.CURDIR:M*/multimedia/avidemux2*} | \
${.CURDIR:M*/multimedia/kdemultimedia4*} | \
${.CURDIR:M*/multimedia/vlc*} | \
${.CURDIR:M*/multimedia/xbmc*} | \
${.CURDIR:M*/net/kdenetwork4*} | \
${.CURDIR:M*/net/mpich2*} | \
${.CURDIR:M*/net/opal3*} | \
${.CURDIR:M*/net-p2p/ktorrent*} | \
${.CURDIR:M*/net-p2p/vuze*} | \
${.CURDIR:M*/sysutils/lsof*} | \
${.CURDIR:M*/textproc/docbook-xsl*} | \
${.CURDIR:M*/textproc/fop*} | \
${.CURDIR:M*/www/libxul*} | \
${.CURDIR:M*/x11/kde4-baseapps*} | \
${.CURDIR:M*/x11/kde4-workspace*} | \
${.CURDIR:M*/x11/lxpanel*} | \
USE_GCC?=4.6+
.endif

.if ${.CURDIR:M*/usr/ports/*}
.if !defined(USE_GCC)
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif
.if !defined(CPP) || ${CPP} == "cpp"
CPP=clang-cpp
.endif
.endif
.endif


WITH_NEW_XORG=yes

WITH_BSD_SO

Re: troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Dimitry Andric
On Mar 18, 2013, at 19:54, Hajimu UMEMOTO  wrote:
...
> dim> In any case, if you are pulling port headers into your buildworld, the
> dim> effect is not always predictable, as ports are largely independent from
> dim> base.  So if you need a customized build of sendmail, would it not be
> dim> better to use the mail/sendmail port instead?  There you can easily
> dim> enable all bells and whistles that are not enabled by default in base.
> 
> No, it seems to me that this error is not depending on sasl header.  I
> suspect clang still has some problem in handling __P.

It is not because of the __P macro specifically, but because of the way
the function parameters are promoted for K&R functions.  The
getsasldata() function is first declared as:

  static void getsasldata __P((char *, bool, MAILER *, MCI *, ENVELOPE *));

Directly after that, it is defined as a K&R function:

  static void
  getsasldata(line, firstline, m, mci, e)
  char *line;
  bool firstline;
  MAILER *m;
  register MCI *mci;
  ENVELOPE *e;
  {
  ...

About 1000 lines below that definition, the address of getsasldata gets
passed to reply(), which is declared as:

  extern int  reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void 
(*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));

so it accepts a function pointer parameter which matches the initial
prototype of getsasldata(), but *not* the actual definition!

Now, clang normally warns about the 'firstline' parameter being promoted
from bool to int, as is required for K&R functions:

  contrib/sendmail/src/usersmtp.c:618:7: warning: promoted type 'int' of K&R 
function parameter is not compatible with the parameter type 'bool' declared in 
a previous prototype [-Wknr-promoted-parameter]
  bool firstline;
   ^
  contrib/sendmail/src/usersmtp.c:612:42: note: previous declaration is here
  static void getsasldata __P((char *, bool, MAILER *, MCI *, ENVELOPE *));
   ^

but since we suppress that warning using -Wno-knr-promoted-parameter, we
do not see it during build world.  However, this still means the
function type is to be considered incompatible.

This changes only when the definition of getsasldata() is moved further
down in the file, specifically below all the places where it is passed
as a function pointer to reply().  In that case, the compiler does not
know yet the function is defined as K&R, and considers it to be
compatible.

One way to avoid this whole mess would be to stop pretending sendmail is
C99 code, and define the 'bool' type as an int.  That would solve all
the K&R promotion problems in one fell swoop.  And it requires just a
minor hack in contrib/sendmail/include/sm/gen.h.

Or, alternatively, fix all the function definitions to be actual C99
function definitions, but that would be a lot more work. :-)
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Hajimu UMEMOTO
Hi,

> On Mon, 18 Mar 2013 18:19:18 +0100
> Dimitry Andric  said:

dim> On Mar 18, 2013, at 12:03, Beat Siegenthaler 
 wrote:
> since some days i try to "make buildworld", but have some errors in
> sendmail.
> The make conf is not changed since years (in this case) . Adding
> NO_WERROR= in src.conf helps, but i think it is not the optimal solution?
> 
> # SASL (cyrus-sasl v2) sendmail build flags...
> SENDMAIL_CFLAGS+=-I/usr/local/include -DSASL=2
> SENDMAIL_LDFLAGS+=-L/usr/local/lib
> SENDMAIL_LDADD+=-lsasl2
> SENDMAIL_CFLAGS+= -D_FFR_SMTP_SSL
dim> ...
> /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
> error: incompatible pointer types passing 'void ()' to parameter of type
> 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, ENVELOPE *)'
> [-Werror,-Wincompatible-pointer-types]
>   getsasldata, NULL, XS_AUTH);
>   ^~~


dim> We used to build sendmail with NO_WERROR.clang= to disable -Werror
dim> specifically for clang, because there were some warnings that could not
dim> be suppressed otherwise.  But since r246880 we reverted that workaround,
dim> so this may be why you are now seeing these -Werror messages.

dim> In any case, if you are pulling port headers into your buildworld, the
dim> effect is not always predictable, as ports are largely independent from
dim> base.  So if you need a customized build of sendmail, would it not be
dim> better to use the mail/sendmail port instead?  There you can easily
dim> enable all bells and whistles that are not enabled by default in base.

No, it seems to me that this error is not depending on sasl header.  I
suspect clang still has some problem in handling __P.

Sincerely,

--
Hajimu UMEMOTO
u...@mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.mahoroba.org/~ume/
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Beat Siegenthaler
On 18.03.13 18:19, Dimitry Andric wrote:

> We used to build sendmail with NO_WERROR.clang= to disable -Werror
> specifically for clang, because there were some warnings that could
> not be suppressed otherwise. So if you need a customized build of
> sendmail, would it not be better to use the mail/sendmail port
> instead? There you can easily enable all bells and whistles that are
> not enabled by default in base.
Ok, good point... force of habit. Since years. Will use Port...

regards, Beat




___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Dimitry Andric
On Mar 18, 2013, at 12:03, Beat Siegenthaler  
wrote:
> since some days i try to "make buildworld", but have some errors in
> sendmail.
> The make conf is not changed since years (in this case) . Adding
> NO_WERROR= in src.conf helps, but i think it is not the optimal solution?
> 
> # SASL (cyrus-sasl v2) sendmail build flags...
> SENDMAIL_CFLAGS+=-I/usr/local/include -DSASL=2
> SENDMAIL_LDFLAGS+=-L/usr/local/lib
> SENDMAIL_LDADD+=-lsasl2
> SENDMAIL_CFLAGS+= -D_FFR_SMTP_SSL
...
> /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
> error: incompatible pointer types passing 'void ()' to parameter of type
> 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, ENVELOPE *)'
> [-Werror,-Wincompatible-pointer-types]
>   getsasldata, NULL, XS_AUTH);
>   ^~~


We used to build sendmail with NO_WERROR.clang= to disable -Werror
specifically for clang, because there were some warnings that could not
be suppressed otherwise.  But since r246880 we reverted that workaround,
so this may be why you are now seeing these -Werror messages.

In any case, if you are pulling port headers into your buildworld, the
effect is not always predictable, as ports are largely independent from
base.  So if you need a customized build of sendmail, would it not be
better to use the mail/sendmail port instead?  There you can easily
enable all bells and whistles that are not enabled by default in base.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Kimmo Paasiala
On Mon, Mar 18, 2013 at 1:03 PM, Beat Siegenthaler
 wrote:
> Hi all,
>
> since some days i try to "make buildworld", but have some errors in
> sendmail.
> The make conf is not changed since years (in this case) . Adding
> NO_WERROR= in src.conf helps, but i think it is not the optimal solution?
>
> # SASL (cyrus-sasl v2) sendmail build flags...
> SENDMAIL_CFLAGS+=-I/usr/local/include -DSASL=2
> SENDMAIL_LDFLAGS+=-L/usr/local/lib
> SENDMAIL_LDADD+=-lsasl2
> SENDMAIL_CFLAGS+= -D_FFR_SMTP_SSL
>
> SENDMAIL_MC = /etc/mail/xyz.mc
> WITH_SSL_AND_PLAINTEXT=yes # for imaps and cclient
>
> ==src.conf===
>
> CC=clang
> CXX=clang++
> CPP=clang-cpp
> # This setting to build world without -Werror:
> # NO_WERROR=
> # This setting to build kernel without -Werror:
> # WERROR=
>
> =buildworld===
>
> /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
> error: incompatible pointer types passing 'void ()' to parameter of type
> 'void (*)(char *, bool, MAILER *, struct mailer_con_info *, ENVELOPE *)'
> [-Werror,-Wincompatible-pointer-types]
>getsasldata, NULL, XS_AUTH);
>^~~
> /usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: 
> note:
> passing argument to parameter here
> extern int  reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void
> (*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
>^
> /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:129:21: note: expanded from
> macro '__P'
> #define __P(protos) protos  /* full-blown ANSI C */
> ^
> 3 errors generated.
> *** [usersmtp.o] Error code 1
> 1 error
> *** [all] Error code 2
> 1 error
> *** [usr.sbin.all__D] Error code 2
> 1 error
> *** [everything] Error code 2
> 1 error
> *** [buildworld] Error code 2
> 1 error
>
> regards
> beat


I can not help with the error but I really have to make this question:
Does FreeBSD really have to support pre-ANSI C compilers in 2013?

-Kimmo
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


troubles with buildworld/sendmail/sasl/clang

2013-03-18 Thread Beat Siegenthaler
Hi all,

since some days i try to "make buildworld", but have some errors in
sendmail.
The make conf is not changed since years (in this case) . Adding
NO_WERROR= in src.conf helps, but i think it is not the optimal solution?

# SASL (cyrus-sasl v2) sendmail build flags...
SENDMAIL_CFLAGS+=-I/usr/local/include -DSASL=2
SENDMAIL_LDFLAGS+=-L/usr/local/lib
SENDMAIL_LDADD+=-lsasl2
SENDMAIL_CFLAGS+= -D_FFR_SMTP_SSL

SENDMAIL_MC = /etc/mail/xyz.mc
WITH_SSL_AND_PLAINTEXT=yes # for imaps and cclient

==src.conf===

CC=clang
CXX=clang++
CPP=clang-cpp
# This setting to build world without -Werror:
# NO_WERROR=
# This setting to build kernel without -Werror:
# WERROR=

=buildworld===

/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/usersmtp.c:1864:8:
error: incompatible pointer types passing 'void ()' to parameter of type
'void (*)(char *, bool, MAILER *, struct mailer_con_info *, ENVELOPE *)'
[-Werror,-Wincompatible-pointer-types]
   getsasldata, NULL, XS_AUTH);
   ^~~
/usr/src/usr.sbin/sendmail/../../contrib/sendmail/src/sendmail.h:2519:67: note:
passing argument to parameter here
extern int  reply __P((MAILER *, MCI *, ENVELOPE *, time_t, void
(*)__P((char *, bool, MAILER *, MCI *, ENVELOPE *)), char **, int));
   ^
/usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:129:21: note: expanded from
macro '__P'
#define __P(protos) protos  /* full-blown ANSI C */
^
3 errors generated.
*** [usersmtp.o] Error code 1
1 error
*** [all] Error code 2
1 error
*** [usr.sbin.all__D] Error code 2
1 error
*** [everything] Error code 2
1 error
*** [buildworld] Error code 2
1 error

regards
beat
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"