List Info

Thread: --enable-fat option doesn't work on Mac OS X / PowerPC




--enable-fat option doesn't work on Mac OS X / PowerPC
user name
2007-08-17 06:19:11
"./configure --help" says:

  --enable-fat            build a fat binary on systems that
support it
                          [default=no]

I've tried it under Mac OS X, as Mac OS X supports fat
binaries, but
it doesn't seem to work: no dynamic library is generated.

The GMP manual says:

Fat binary, `--enable-fat'
     Using `--enable-fat' selects a "fat binary"
build on x86, where
     optimized low level subroutines are chosen at runtime
according to
     the CPU detected.  This means more code, but gives
good
     performance on all x86 chips.  (This option might
become available
     for more architectures in the future.)

So, I suppose that the "configure --help" should
be: "build a fat binary
on x86", and the configure script should fail if
--enable-fat is provided
but does not work.

-- 
Vincent Lefèvre <vincentvinc17.org> - Web:
<http://www.vinc17.org/>

100% accessible validated (X)HTML - Blog: <http://www.vinc17.org
/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project
(LIP, ENS-Lyon)
_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs

Re: --enable-fat option doesn't work on Mac OS X / PowerPC
country flaguser name
Germany
2007-08-17 06:36:35
Hello Vincent,

Vincent Lefevre wrote:
> "./configure --help" says:
>
>   --enable-fat            build a fat binary on systems
that support it
>                           [default=no]
>
> I've tried it under Mac OS X, as Mac OS X supports fat
binaries,

Technically fat binaries on Mac OS9 and maybe earlier are
binaries with an
68k and a PowerPC personality. MacOSX has universal binaries
which combine
32 or 64 bit and PowerPC or x86 (a total of 4 combinations)
executables.

If you want to build a universal version of the gmp build
them
individually and use lipo to combine the output. For more
details see man
lipo.

> but
> it doesn't seem to work: no dynamic library is
generated.

The same happens on Opterons, but as it is stated in the
help this only
works on x86.

>
> The GMP manual says:
>
> Fat binary, `--enable-fat'
>      Using `--enable-fat' selects a "fat
binary" build on x86, where
>      optimized low level subroutines are chosen at
runtime according to
>      the CPU detected.  This means more code, but gives
good
>      performance on all x86 chips.  (This option might
become available
>      for more architectures in the future.)
>
> So, I suppose that the "configure --help"
should be: "build a fat binary
> on x86", and the configure script should fail if
--enable-fat is provided
> but does not work.

That would be the right solution.

>
> --
> Vincent Lefèvre <vincentvinc17.org> - Web:
<http://www.vinc17.org/>

> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org
/blog/>
> Work: CR INRIA - computer arithmetic / Arenaire project
(LIP, ENS-Lyon)

Cheers,

Michael


_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs

Re: --enable-fat option doesn't work on Mac OS X / PowerPC
user name
2007-08-17 06:56:39
On 2007-08-17 13:36:35 +0200, Michael Abshoff wrote:
> Hello Vincent,

Hi Michael, thanks for the quick reply.

> Vincent Lefevre wrote:
> > "./configure --help" says:
> >
> >   --enable-fat            build a fat binary on
systems that support it
> >                           [default=no]
> >
> > I've tried it under Mac OS X, as Mac OS X supports
fat binaries,
> 
> Technically fat binaries on Mac OS9 and maybe earlier
are binaries with an
> 68k and a PowerPC personality. MacOSX has universal
binaries which combine
> 32 or 64 bit and PowerPC or x86 (a total of 4
combinations) executables.

In fact, "fat binaries" and "universal
binaries" seem to be the same
notion. "man otool" says "-f     Display the
universal headers.", but
"otool -fv" output uses the word "fat":

Fat headers
fat_magic FAT_MAGIC
nfat_arch 2
[...]

> If you want to build a universal version of the gmp
build them
> individually and use lipo to combine the output. For
more details
> see man lipo.

Thanks for the information. I'll try that (I want to have a
library
with ppc and ppc64 code). I suppose that concerning gmp.h,
the best
solution is to rename both versions, and create my own
gmp.h, which
includes the right header file with "#if __ppc64__ ...
#else ...".

> > but it doesn't seem to work: no dynamic library is
generated.
> 
> The same happens on Opterons, but as it is stated in
the help this
> only works on x86.

OK, so the problem is with configure, which gives incorrect
information.

-- 
Vincent Lefèvre <vincentvinc17.org> - Web:
<http://www.vinc17.org/>

100% accessible validated (X)HTML - Blog: <http://www.vinc17.org
/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project
(LIP, ENS-Lyon)
_______________________________________________
gmp-bugs mailing list
gmp-bugsswox.com
http://swox
.com/mailman/listinfo/gmp-bugs

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )