conf/96570: cc can't build 32-bit executables on amd64
Mikhail T.
mi at aldan.algebra.com
Mon May 1 01:10:19 UTC 2006
>Number: 96570
>Category: conf
>Synopsis: cc can't build 32-bit executables on amd64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon May 01 01:10:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Mikhail T.
>Release: FreeBSD 6.1-RC amd64
>Organization:
Virtual Estates, Inc.
>Environment:
System: FreeBSD aldan.algebra.com 6.1-RC FreeBSD 6.1-RC #4: Sat Apr 15 14:53:29 EDT 2006 root at aldan.algebra.com:/meow/obj/var/src/sys/SILVER amd64
>Description:
``cc -m32'' currently succeeds _compiling_, but fails linking
the program, because it looks for libgcc.a in /usr/lib, where
it finds the 64-bit flavor.
This is a shame, because the 32-bit library is built and
available in /usr/lib32 -- cc just needs to know to look
there, when given the ``-m32'' flag.
>How-To-Repeat:
echo 'main() {}' > t.c
cc -m32 t.c
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when
searching for -lgcc
/usr/bin/ld: cannot find -lgcc
>Fix:
The details of the contrib/gcc/gcc.c appear hairy to a novice
like myself, but it should not be too difficult for a seasoned
developer to fix this configuration problem. Or so I think :-)
Renaming /usr/lib to /usr/lib64 and /usr/lib32 to /usr/lib
allows creation of 32-bit executables, but, obviously, prevents
creation of the 64-bit ones (and starting many programs).
This has been a nuissance since the beginning of the
FreeBSD/amd64, I guess. It would be nice to see it resolved
in the upcoming 6.1.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list