From owner-freebsd-ports@FreeBSD.ORG Sat Jun 23 10:20:45 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C79B01065672 for ; Sat, 23 Jun 2012 10:20:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 49C018FC08 for ; Sat, 23 Jun 2012 10:20:45 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q5NAKeZM019998; Sat, 23 Jun 2012 13:20:40 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q5NAKdw9062733; Sat, 23 Jun 2012 13:20:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q5NAKdEd062732; Sat, 23 Jun 2012 13:20:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jun 2012 13:20:39 +0300 From: Konstantin Belousov To: Benjamin Message-ID: <20120623102039.GR2337@deviant.kiev.zoral.com.ua> References: <4FE528AE.8070005@uclive.ac.nz> <20120623085716.GM2337@deviant.kiev.zoral.com.ua> <4FE5928A.8030207@uclive.ac.nz> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w4FA960qCDcgfw+v" Content-Disposition: inline In-Reply-To: <4FE5928A.8030207@uclive.ac.nz> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-ports@freebsd.org Subject: Re: Linux binary looks for /proc/cpuinfo, dies when cannot be found, even when linprocfs mounted. X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2012 10:20:46 -0000 --w4FA960qCDcgfw+v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 23, 2012 at 09:55:22PM +1200, Benjamin wrote: > On 06/23/12 20:57, Konstantin Belousov wrote: > >On Sat, Jun 23, 2012 at 02:23:42PM +1200, Benjamin wrote: > >>Hi all. I have posted this question on the forums, and it was suggested > >>that I post it here. > >> > >>I am currently porting Altera Quartus II design software to FreeBSD. I > >>have got it installing, but running the binary requires /proc/cpuinfo to > >>exist, and it dies when it can't find it. > >> > >>I have both procfs and linprocfs mounted. > >To be sure, show us the mount -v output. > > > [snipped] > linprocfs on /usr/compat/linux/proc (linprocfs, local) > procfs on /proc (procfs, local) > [/snipped] > >> > >>As a workaround (read hack) I can do the following to make the binary > >>execute. > >> > >>1. unmount procfs. > >>2. symlink /compat/linux/proc/cpuinfo to /proc/cpuinfo > >> > >>Since this problem has no doubt come up before, what is the best way to > >>get around this issue? > >No, it did not came up before. > > > >Show the file(1) output on the binary which exhibit the faulty behaviour. > Aha. I think you've identified the problem >=20 > quartus_sh: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),=20 > dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped >=20 > brandelf(1)ing this to Linux seems to have worked. What does SYSV=20 > represent anyway? "brandelf -l" only lists >=20 > known ELF types are: FreeBSD(9) Linux(3) Solaris(6) SVR4(0) >=20 > so what does SYSV mean? There it means that an old branding method was not used on the binary. Note that the note is present in the executable, so even file is able to identify the binary as using Linux ABI. I very much doubt that your report of 'crash' was due to unability to open /proc/cpuinfo, the failure scenario should be much more spectacular and fun to watch. What version of the kernel do you use and what arch ? We have support for note-based ABI branding for very long time. I wonder is your kernel so ancient that it lacks the support, or we have a regression. Can you put the binary somewere so I can look into it ? --w4FA960qCDcgfw+v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk/lmHcACgkQC3+MBN1Mb4gk2wCgkPmCpXHRL86s2AkXqK8FySgT QCcAn1A29V93Axz7mqqpytGRTvJ2B7XV =4G7+ -----END PGP SIGNATURE----- --w4FA960qCDcgfw+v--