bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems mixing icc and g77 on x86 Linux


From: Tom Epperly
Subject: Problems mixing icc and g77 on x86 Linux
Date: Wed, 21 Jul 2004 15:38:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

I work on a language interoperability tool called Babel, http://www.llnl.gov/CASC/components/software.html. I am trying to get my build to work with Intel's C compiler (icc version 8.0.058 and g77 3.2.3 as distributed by Red Hat 3.2.3-24. I am having a problem when I set CFLAGS to '-g -O -Wall'. My tool is targeted towards high performance scientific computing, so it's important that -O works.

I have a particular test where F77 calls C. Here is a Makefile.am fragment.

runF772C_SOURCES        = helloclient.f
runF772C_LDFLAGS        = -static
runF772C_DEPENDENCIES   = libClient.la ../libC/libImpl.la
runF772C_LDADD = libClient.la ../libC/libImpl.la $(LIBSIDL) $(FLIBS)

This uses g77 for the link step because C + F77 uses the Fortran linker (from the automake manual). Changing it to

runF772C_SOURCES = force_c.c helloclient.f

doesn't help because C + F77 always chooses the F77 linker.

icc with -O needs the equivalent of CLIBS (i.e., libraries that need to be added to the link line when icc isn't controlling the link step). Otherwise, you end up with errors like these:

g77 -O -g -o runF772C helloclient.o ./.libs/libClient.a -L/usr/casc/babel/apps/linux_el/chasm_110_Intel/lib -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/../../.. ../libC/.libs/libImpl.a /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a ../../../runtime/sidl/.libs/libsidl.a -ldl -lchasm /usr/casc/babel/apps/linux_el_intel/lib/libxml2.a -lpthread -lz -lfrtbegin -lg2c -lm -lgcc_s
./.libs/libClient.a(force_c.o)(.text+0xd): In function `main':
../../../../babel/examples/hello/runF77/force_c.c:5: undefined reference to `__intel_proc_init' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidlfortran.o)(.text+0x90): In function `sidl_copy_fortran_str': ../../../babel/runtime/sidl/sidlfortran.c:53: undefined reference to `_intel_fast_memcpy' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidlfortran.o)(.text+0xe6): In function `sidl_copy_c_str': ../../../babel/runtime/sidl/sidlfortran.c:67: undefined reference to `_intel_fast_memcpy' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidlfortran.o)(.text+0xfc):../../../babel/runtime/sidl/sidlfortran.c:70: undefined reference to `_intel_fast_memset' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidlfortran.o)(.text+0x158): In function `sidl_copy_ior_str': ../../../babel/runtime/sidl/sidlfortran.c:86: undefined reference to `_intel_fast_memcpy' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidlfortran.o)(.text+0x16f):../../../babel/runtime/sidl/sidlfortran.c:89: undefined reference to `_intel_fast_memset' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x30): In function `sidl_interface__array_bdestroy': ../../../babel/runtime/sidl/sidl_interface_IOR.c:87: undefined reference to `_intel_fast_memset' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x233): In function `newArray': ../../../babel/runtime/sidl/sidl_interface_IOR.c:238: undefined reference to `_intel_fast_memcpy' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x240):../../../babel/runtime/sidl/sidl_interface_IOR.c:239: undefined reference to `_intel_fast_memcpy' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x330): In function `sidl_interface__array_createCol': ../../../babel/runtime/sidl/sidl_interface_IOR.c:261: undefined reference to `_intel_fast_memset' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x407): In function `sidl_interface__array_createRow': ../../../babel/runtime/sidl/sidl_interface_IOR.c:283: undefined reference to `_intel_fast_memset' /home/epperly/current/linux_icc/runtime/sidl/.libs/libsidl.a(sidl_interface_IOR.o)(.text+0x7dd): In function `sidl_interface__array_borrow': ../../../babel/runtime/sidl/sidl_interface_IOR.c:513: undefined reference to `_intel_fast_memcpy'
collect2: ld returned 1 exit status
make[5]: *** [runF772C] Error 1
make[5]: Leaving directory `/home/epperly/current/linux_icc/examples/hello/runF77'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/epperly/current/linux_icc/examples/hello'
make[3]: *** [my-all] Error 2
make[3]: Leaving directory `/home/epperly/current/linux_icc/examples'
make[2]: *** [check-local] Error 2
make[2]: Leaving directory `/home/epperly/current/linux_icc/examples'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/home/epperly/current/linux_icc/examples'
make: *** [check-recursive] Error 1
bash-2.05b$





reply via email to

[Prev in Thread] Current Thread [Next in Thread]