bug-gmp
[Top][All Lists]
Advanced

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

gmp - mac os x


From: Fred Mesnard
Subject: gmp - mac os x
Date: Sun, 13 Oct 2002 22:41:13 +0400

Hi!
I tried to compile GMP 4.1 on Mac OS X, I got kind
help from guys of the Fink Project. Here's a summary.
Best regards,
Fred


Ben Hines <address@hidden> wrote:

On Sunday, October 13, 2002, at 06:55 AM, Fred Mesnard wrote:

Hi Justin, hi Martin,

Here are some more info:

I have installed Mac OS X 10.2 + the developer CD + the august update from Apple:
% what /usr/bin/libtool
/usr/bin/libtool
PROGRAM:cctools_misc PROJECT:cctools-435 DEVELOPER:root BUILT:Mon Jul 15 20:25:50 PDT 2002


Not related, totally different thing. libtool comes with the app.


I don't have Fink installed, I'm waiting for the next version.

So why are you here? :)

Anyway, i tried adding --enable-cxx to the fink info file's configure. It outputs:

checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no
..
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... no
checking whether -lc should be explicitly linked in... yes


It looks like half of GMP's configure script is from an old version of libtool, and half is from the new. Or somethng like that. The whole archive_cmds_CXX is missing for darwin. It has the (updated, with flat namespace) part for flat_namespace, but no archive_cmds_CXX for darwin. It looks like it should work fine if i just copy the archive_cmds to the archive_cmds_CXX. And indeed, it does:

This lets it link:


--- gmp-4.1/configure.orig 2002-10-13 07:16:32.000000000 -0700
+++ gmp-4.1/configure 2002-10-13 07:16:43.000000000 -0700
@@ -10702,6 +10702,28 @@
;;
esac
;;
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ allow_undefined_flag='-flat_namespace -undefined suppress'
+ ;;
+ esac
+
+ # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+ # yet detect zsh echo's removal of \ escapes. Also zsh mangles
+ # `"' quotes if we put them in here... so don't!
+ archive_cmds_CXX='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+ # We need to add '_' to the symbols in $export_symbols first
+ #_LT_AC_TAGVAR(archive_expsym_cmds, )="$_LT_AC_TAGVAR(archive_cmds, )"' && strip -s $export_symbols'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ whole_archive_flag_spec='-all_load $convenience'
+ ;;
+
dgux*)
case $cc_basename in
ec++)


So drm, you can add this patch and --enable-cxx to GMP, and we get:
/sw/include/gmpxx.h
/sw/lib/libgmpxx.3.0.2.dylib
/sw/lib/libgmpxx.a
/sw/lib/libgmpxx.la
/sw/lib/libgmpxx.3.dylib
/sw/lib/libgmpxx.dylib


-Ben
------------------------------------------------------------------


A few hours later, Fred Mesnard <address@hidden> wrote:

THANK YOU Ben, you're right! I rebuilt from scratch GMP 4.1
with the new configure, CPPFLAGS=-fexceptions,
and the --enable-cxx option.
Here's the result of 'make check'. Everything is ok up to:
...
Making check in cxx
...
make check-TESTS
PASS: t-headers
PASS: t-ostream
operator>> input error
point ,
str ,5
FAIL: t-locale
PASS: t-constr
PASS: t-expr
Fred



reply via email to

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