discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Binary packaging problems on x86_64


From: Greg Troxel
Subject: Re: [Discuss-gnuradio] Binary packaging problems on x86_64
Date: 19 Dec 2005 09:16:10 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Berndt Josef Wulf <address@hidden> writes:

> I noticed a problem when building GNU Radio on x86_64 platforms. GNU
> Radio for some reasons insists to install them into ${prefix}/lib64
> where as pkgsrc expects them in ${prefix}/lib.
> 
> <quote>
> # GR_X86_64()
> #
> # Checks to see if we're on a x86_64 machine, and if so, ensure
> # that libdir ends in "64"
> #
> </quote>

This seems to be a Linux-on-x86_64 convention, rather than an x86_64
convention, so changing libdir to ${libdir}64 should almost certainly
be condition on uname being Linux.

On NetBSD, ${libdir} always has native libraries, where native means
the instruction set and word size defined by the combination of
hardware and which kernel is being run.  Then, other libraries go in
/emul/foo, where foo can denote other operating systems or other
architectures.

For example, on sparc64, one can run native sparc64 code, with 32-bit
NetBSD code in /emul/netbsd32, and thus run either NetBSD/sparc or
NetBSD/sparc64 binaries.  Or, one can boot a NetBSD/sparc kernel, so
that the whole system runs in 32-bit mode, in which case /usr/lib (and
/usr/pkg/lib) have 32-bit code.  This is equivalent to installing i386
code (including the kernel) on an x86_64 machine.  On NetBSD/amd64
(x86_64), one can also run (32-bit) NetBSD/i386 binaries via the same
/emul mechanism.

So, rather than Berndt adapting the package, GNU Radio should be
changed to only munge libdir on systems where such munging is the
convention, and the list sounds like most but not all GNU/Linux
systems.

Not tested, but commented, and below threshold (papers in progress).

--- gr_x86_64.m4.~1.2.~ 2005-12-02 14:37:46.000000000 -0500
+++ gr_x86_64.m4        2005-12-19 09:13:44.000000000 -0500
@@ -21,12 +21,18 @@
 
 # GR_X86_64()
 #
-# Checks to see if we're on a x86_64 machine, and if so, ensure
-# that libdir ends in "64"
+# On some (most?) GNU/Linux systems on x86_64 hardware, the convention
+# is to install native (64-bit) libraries in $(libdir)64, and 32-bit
+# i386 libraries in $(libdir).  If on such a system, append "64" to
+# libdir if it is not already present.
+#
+# XXX This should be generalized to adjust paths for all systems that
+# place native libraries in non-standard places.
 #
 AC_DEFUN([GR_X86_64],[
   AC_REQUIRE([AC_CANONICAL_HOST])
-  if test "$host_cpu" = "x86_64"; then
+  if test "$host_os" = "Linux" -a "$host_cpu" = "x86_64"; then
+    # XXX Debian may not use this convention.
     AC_MSG_CHECKING([libdir for lib64 suffix])
     t=${libdir##*/lib}
     if test "$t" != 64; then




reply via email to

[Prev in Thread] Current Thread [Next in Thread]