From owner-freebsd-hackers Thu Jan 24 11:55:18 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from postfix1-2.free.fr (postfix1-2.free.fr [213.228.0.130]) by hub.freebsd.org (Postfix) with ESMTP id 329E637B43B for ; Thu, 24 Jan 2002 11:54:48 -0800 (PST) Received: from bluerondo.a.la.turk (nas-cbv-5-146-47.dial.proxad.net [62.147.146.47]) by postfix1-2.free.fr (Postfix) with ESMTP id 1A251AB141 for ; Thu, 24 Jan 2002 20:54:46 +0100 (CET) Received: (qmail 632 invoked by uid 1001); 24 Jan 2002 19:53:57 -0000 Date: Thu, 24 Jan 2002 20:53:57 +0100 From: Rahul Siddharthan To: Dan Nelson Cc: ports@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Port: Intel Fortran (and C++?) compilers Message-ID: <20020124205357.A528@lpt.ens.fr> References: <20020124184506.B87867@lpt.ens.fr> <20020124192136.GG87583@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020124192136.GG87583@dan.emsphone.com>; from dnelson@allantgroup.com on Thu, Jan 24, 2002 at 01:21:37PM -0600 X-Operating-System: FreeBSD 4.5-RC i386 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Dan Nelson said on Jan 24, 2002 at 13:21:37: > > #! /bin/sh > if [ -z "${IA32ROOT}" ] ; then > . /compat/linux/usr/local/intel/compiler50/ia32/bin/iccvars.sh > fi > exec /compat/linux/usr/local/intel/compiler50/ia32/bin/icc "$@" OK, makes sense... I was just putting the contents of iccvars.sh directly into this script. But I happened to leave out the IA32ROOT variable, which was the reason for a couple of the problems below. > Then simply running (for example) "icc test.c -o test" generates a > Linux executable. Not for me... The reason it was not linking earlier was I forgot to set the IA32ROOT variable. Now it links and generates an executable, but on running it, it coredumps with "Bad system call" (even if I brand it as linux first). > > 2. Though the install script (with patches) installs everything to > > /compat/linux/opt/intel, the compiler tends to complain of not finding > > the file /usr/intel/ia32/lib/crtxn.o . > > I didn't have this problem. Could be a difference in how we installed > it. Turns out it was the missing IA32ROOT variable again. > > Among the things the linker script needs to do are: specify the > > entry symbol (-e main as command line option to ld); specify the Intel > > libraries to link against; and brand the binary as linux. > > You could simply use /compat/linux/bin/ld here :) That's what I do already -- it still doesn't brand the binary as linux... the binary type is 0. > > 4. After all this, the binary still complains saying > > > > ELF interpreter /compat/linux/usr/lib/libc.so.1 not found > > Abort > > > > I solve this with a symlink from /compat/linux/ld-2.2.2.so to > > /compat/linux/usr/lib/libc.so.1 > > Is there a "cleaner" solution? > > I didn't have this problem either. It seems to have something to do with the fact that I link using the linux ld. The (non-working) binary directly generated by ifc doesn't say this. > This is definitely dependant on what you're building. icc will try and > use the Linux headers, so if you use FILE, or pretty much any system > struct, it's not going to run right. Actually, what might work is "icc > -X -I /usr/include", and then link with the freebsd ld. But icc > doesn't understand all gcc-isms, which is why Intel had to rewrite a > lot of them and put them in intel/compiler50/ia32/substitute_headers. > You'de have to do the same for any offending FreeBSD headers. True... well, the fortran port would be a good start anyway; it doesn't have this problem, and it fills a larger hole (gcc is very usable and feature-complete, but g77 is really pretty bad, and moreover doesn't support Fortran 90/95...) - Rahul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message