From owner-freebsd-amd64@FreeBSD.ORG Thu Jul 31 23:41:07 2008 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D430F1065671 for ; Thu, 31 Jul 2008 23:41:07 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id B137D8FC23 for ; Thu, 31 Jul 2008 23:41:07 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.2/8.14.2) with ESMTP id m6VNf70a001293; Thu, 31 Jul 2008 16:41:07 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.2/8.14.2/Submit) id m6VNf788001292; Thu, 31 Jul 2008 16:41:07 -0700 (PDT) (envelope-from sgk) Date: Thu, 31 Jul 2008 16:41:07 -0700 From: Steve Kargl To: Chuck Robey Message-ID: <20080731234107.GA99946@troutmask.apl.washington.edu> References: <4891F3F3.8090608@telenix.org> <20080731195527.GT1359@server.vk2pj.dyndns.org> <489243B0.80307@telenix.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <489243B0.80307@telenix.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-amd64@freebsd.org Subject: Re: app programming on freebsd amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2008 23:41:07 -0000 On Thu, Jul 31, 2008 at 06:58:56PM -0400, Chuck Robey wrote: > Peter Jeremy wrote: > > > > There are a couple of open PRs about this but fixing it is non-trivial. > > > > Your only current option is to install an i386 world (as well as your > > amd64 world) and chroot into it to build i386 apps. > > Oh, you're telling me that if I run one app as 32 bit (compiling it, the whole > enchilada, as 32 bit) would only work if I had the OS, kernel and all libs, as > 32 bits? I couldn't just run the X11 as 32 bits? I mean, not only run it as 32 > bits, also compile it as 32 bits? If I did that, it would use the OS and libs > as 64 bits, and be therefore incorrect? > > If that's so, it does throw a wrench into things, forcing another set of > decisions on me, so I need a confirmation, you'll understand. He's telling you that -m32 doesn't work because the necessary run time support is missing. troutmask:kargl[202] cat h.c #include int main(void) { printf("Hello world!\n"); return 0; } troutmask:kargl[203] cc -o z h.c troutmask:kargl[205] ldd z z: libc.so.7 => /lib/libc.so.7 (0x20063c000) troutmask:kargl[206] file z z: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), for FreeBSD 8.0 (800040), dynamically linked (uses shared libs), FreeBSD-style, not stripped troutmask:kargl[207] cc -o z -m32 h.c /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc /usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc /usr/bin/ld: cannot find -lgcc -- Steve