[MacPorts] #34876: dircproxy 1.0.5 does not compile with clang/llvm 3.0 on OS X Lion (was: [patch] dircproxy 1.0.5 does not compile with clang/llvm 3.0 on OS X Lion)

MacPorts noreply at macports.org
Mon Jun 18 18:41:05 PDT 2012


#34876: dircproxy 1.0.5 does not compile with clang/llvm 3.0 on OS X Lion
-------------------------------+--------------------------------------------
 Reporter:  chris@…            |       Owner:  darwin@…             
     Type:  defect             |      Status:  new                  
 Priority:  Normal             |   Milestone:                       
Component:  ports              |     Version:  2.1.1                
 Keywords:  clang haspatch     |        Port:  dircproxy            
-------------------------------+--------------------------------------------
Changes (by ryandesign@…):

  * owner:  macports-tickets@… => darwin@…
 * cc: ryandesign@… (added)
  * keywords:  patch => clang haspatch


Old description:

> Attempting to build the dircproxy port results in the following:
>
> make[2]: Entering directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src'
> /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..
> -DSYSCONFDIR="\"/opt/local/etc\""  -I/opt/local/include  -pipe -O2 -arch
> x86_64 -c irc_server.c
> irc_server.c:344:69: warning: passing 'int *' to parameter of type
> 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer
> types with different sign [-Wpointer-sign]
>     if (!getsockname(p->server_sock, (struct sockaddr *)&sock_addr,
> &len)) {
>                                                                     ^~~~
> /usr/include/sys/socket.h:609:74: note: passing argument to parameter
> here
> int     getsockname(int, struct sockaddr * __restrict, socklen_t *
> __restrict)
> ^
> irc_server.c:703:52: error: expression is not assignable
>               s = (l ? l->next : p->squelch_modes) = n;
>                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> irc_server.c:744:52: error: expression is not assignable
>               s = (l ? l->next : p->squelch_modes) = n;
>                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> irc_server.c:1089:73: warning: passing 'int *' to parameter of type
> 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer
> types with different sign [-Wpointer-sign]
>               getsockname(p->client_sock, (struct sockaddr *)&vis_addr,
> &len)) {
> ^~~~
> /usr/include/sys/socket.h:609:74: note: passing argument to parameter
> here
> int     getsockname(int, struct sockaddr * __restrict, socklen_t *
> __restrict)
> ^
> 2 warnings and 2 errors generated.
> make[2]: *** [irc_server.o] Error 1
> make[2]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5'
> make: *** [all-recursive-am] Error 2
> make: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5'
> Command failed:  cd
> "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5"
> && /usr/bin/make -w all
> Exit code: 2
>
> The attached patch fixes all such errors.

New description:

 Attempting to build the dircproxy port results in the following:

 {{{
 make[2]: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src'
 /Developer/usr/bin/clang -DHAVE_CONFIG_H -I. -I. -I..
 -DSYSCONFDIR="\"/opt/local/etc\""  -I/opt/local/include  -pipe -O2 -arch
 x86_64 -c irc_server.c
 irc_server.c:344:69: warning: passing 'int *' to parameter of type
 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer
 types with different sign [-Wpointer-sign]
     if (!getsockname(p->server_sock, (struct sockaddr *)&sock_addr, &len))
 {
                                                                     ^~~~
 /usr/include/sys/socket.h:609:74: note: passing argument to parameter here
 int     getsockname(int, struct sockaddr * __restrict, socklen_t *
 __restrict)
 ^
 irc_server.c:703:52: error: expression is not assignable
               s = (l ? l->next : p->squelch_modes) = n;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
 irc_server.c:744:52: error: expression is not assignable
               s = (l ? l->next : p->squelch_modes) = n;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
 irc_server.c:1089:73: warning: passing 'int *' to parameter of type
 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer
 types with different sign [-Wpointer-sign]
               getsockname(p->client_sock, (struct sockaddr *)&vis_addr,
 &len)) {
 ^~~~
 /usr/include/sys/socket.h:609:74: note: passing argument to parameter here
 int     getsockname(int, struct sockaddr * __restrict, socklen_t *
 __restrict)
 ^
 2 warnings and 2 errors generated.
 make[2]: *** [irc_server.o] Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5/src'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5'
 make: *** [all-recursive-am] Error 2
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_irc_dircproxy/dircproxy/work/dircproxy-1.0.5"
 && /usr/bin/make -w all
 Exit code: 2
 }}}

 The attached patch fixes all such errors.

--

Comment:

 darwin at kastenbalg.org, does this look ok to commit? It compiles ok for
 me.

-- 
Ticket URL: <https://trac.macports.org/ticket/34876#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list