Hi --
htons, ntohs, htonl, and ntohl on Linux platforms are implemented as a
"statement expression", which is a gcc extension. It seems Intel compilers
(icc) currently do not support this. You will have to wait for the Intel
compilers to have this support. Until then you can have a temporary
workaround for this problem as follows:
Put the following after the #include of in.h (in socket.c and
share/ssi/boot/base/ssi_boot_server.c)
#if defined(__ICC)
// icc doesn't like GNU __extension__ functions
// this has to happen AFTER !!
#undef htons
#undef ntohs
#undef htonl
#undef ntohl
#define htons(x) __bswap_constant_16(x)
#define ntohs(x) __bswap_constant_16(x)
#define htonl(x) __bswap_constant_32(x)
#define ntohl(x) __bswap_constant_32(x)
#endif // defined(_ICC)
-Vishal
On Sun, 14 Mar 2004, Pierre Valiron wrote:
# Hi,
#
# I could build lam-7.0.4 on itanium2 [Red Hat Linux Advanced Server release
# 2.1AS (Derry)] without a hitch using ecc/efc intel compilers 7.1.
#
# However rebuilding lam-7.0.4 using intel compilers version 8.0 fails. I
# tried twice, first attempt defining the compilers as icc/ifort (their new
# native names under version 8.0), then as ecc/ifort in case the lam
# configure would make some special decisions upon the name.
# In both case I get two problems:
#
# - a warning about option -MP
# - a fatal error building socket.c
#
# See sample errord below. Any clue ?
# Best.
# Pierre.
#
#
# ecc -DHAVE_CONFIG_H -I. -I. -I../../share/include
# -DLAM_SYSCONFDIR=\"/home/externe/valiron/lambin-7.0.4-ifort/etc\"
# -DLAM_PREFIX=\"/home/externe/valiron/lambin-7.0.4-ifort\"
# -I../../share/ssi/include -I../../share/include -DLAM_BUILDING=1 -O -tpp2
# -pthread -MT socket.lo -MD -MP -MF .deps/socket.Tpo -c socket.c
# ecc: warning: The Intel C/C++ driver is now named icc. You can suppress
# this message with '-quiet'
# icc: Command line remark: option '-MP' not supported
# socket.c(79): error: asm statements not supported in this environment
# srvaddr.sin_addr.s_addr = htonl(INADDR_ANY);
# ^
#
# socket.c(79): error: expected a ")"
# srvaddr.sin_addr.s_addr = htonl(INADDR_ANY);
# ^
#
# socket.c(81): error: asm statements not supported in this environment
# htons((unsigned short) *port) : htons(0);
# ^
#
# --
# Sauvons tous ensemble la recherche en danger et redonnons perspectives
# et enthousiasme à nos jeunes!
# Pétition nationale sur http://recherche-en-danger.apinc.org/
# Grenoble se mobilise aussi sur http://recherchegrenoble.free.fr
#
# _/_/_/_/ _/ _/ Dr. Pierre VALIRON
# _/ _/ _/ _/ Laboratoire d'Astrophysique (UMR 5571 CNRS)
# _/ _/ _/ _/ Observatoire de Grenoble / U. Joseph Fourier
# _/_/_/_/ _/ _/ BP 53 F-38041 Grenoble Cedex 9 (France)
# _/ _/ _/
# _/ _/ _/ http://www-laog.obs.ujf-grenoble.fr
# _/ _/ _/ mailto:Pierre.Valiron_at_[hidden]
# _/ _/_/ Phone / Fax: +33 (0)4 76.51.47.87 / (0)4 76.44.88.21
#
#
#
# _______________________________________________
# This list is archived at http://www.lam-mpi.org/MailArchives/lam/
#
|