[OGo-Developer] sope and lib64
Sebastian Reitenbach
developer@opengroupware.org
Thu, 24 Jan 2008 07:44:09 +0100
Hi,
developer@opengroupware.org wrote:
> Hi,
>
> developer@opengroupware.org wrote:
> > Le 22 Jan. 2008 13:06 EST, "Sebastian Reitenbach"
> <sebastia@l00-bugdead-prods.de> a =E9crit:
> >
> > > developer@opengroupware.org wrote:
> > > >
> > > > > standards are good, but are all Linux distributions following, I'm
> not
> > > sure
> > > > > about that?
> > > > > is there are lib64 directory on a Debian when installing a 64Bit
> > > version?
> > > >
> > > > Nope, only a lib and a lib32.
> > > so complicating the problem once more.
> >
> > Not that much... if you know the arch you are running on, you can deduce
> the name of the potential library directory for the other arches. You may
> wanna have a look at the discussions around the multilib architecture...
> >
>
> here:
> http://www.pathname.com/fhs/pub/fhs-2.3.html
>
> /lib64 and /lib32 : 64/32-bit libraries (architecture dependent)
> The 64-bit architectures PPC64, s390x, sparc64 and AMD64 must place
64-bit
> libraries in /lib64, and 32-bit (or 31-bit on s390) libraries in /lib.
> The 64-bit architecture IA64 must place 64-bit libraries in /lib.
> Tip Rationale
>
> This is a refinement of the general rules for /lib<qual>
> and /usr/lib<qual>. The architectures PPC64, s390x, sparc64 and AMD64
> support support both 32-bit (for s390 more precise 31-bit) and 64-bit
> programs. Using lib for 32-bit binaries allows existing binaries from the
> 32-bit systems to work without any changes: such binaries are expected to
be
> numerous. IA-64 uses a different scheme, reflecting the deprecation of
> 32-bit binaries (and hence libraries) on that architecture.
>
> I think it shouldn't be too hard to follow this rule, I'll update the
check
> in the ./configure.
>
I googled a bit around, after different Linux uname outputs so that I can
match the proecessor. To set the CGS_LIBDIR_NAME, I would change
the ./configure to detect it this way:
UNAME=3D`uname`
if [ ${uname} =3D "Linux" ];then
UNAME=3D`uname -p`
if [ ${UNAME} =3D x86_64 -o ${UNAME} =3D sparc64 -o ${UNAME} =3D ppc64 ];then
CGS_LIBDIR_NAME=3Dlib64
else
CGS_LIBDIR_NAME=3Dlib
fi
else
CGS_LIBDIR_NAME=3Dlib
fi
does this looks sane? I don't know how it is on e.g. FreeBSD, Solaris or
MAC? Are there these lib64 directories too? At least I know there are no
such directories on OpenBSD.
Sebastian