Bill Allombert on Fri, 26 Aug 2005 14:17:52 +0200

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

Re: os X problems

On Thu, Aug 25, 2005 at 08:29:22PM -0700, Justin C. Walker wrote:
> On Aug 25, 2005, at 19:56 , Joshua Friedman wrote:
> >In the examples directory, library build seems to fail:
> >
> >Friedman <pari-2.2.10.alpha> cd examples/
> >Friedman <examples> make all
> [snip]
> >o libextgcd.dylib -shared -O3 -DGCC_INLINE -Wall -fno-strict-aliasing
> >-fomit-frame-pointer -O3 -DGCC_INLINE -Wall -fno-strict-aliasing
> >-fomit-frame-pointer  -no-cpp-precomp
> >-Wl,-dylib,-flat_namespace,-undefined,suppress extgcd.o
> >make: o: Command not found
> I think this is because DLLD is undefined in examples/Makefile (I get  
> the same failure).  I'm not sure what DLLD is supposed to be.

DLLD is undefined on Mac OS X because we do not yet know how to build
dynamic libraries on OS X yet. 

"make all" try to build all targets, i.e extgcd-sta, extgcd-dyn and 

extgcd-sta should work fine.

extgcd-dyn cannot be built (we would need libpari as a dynamic library).

libextgcd.dylib should be buildable, but the makefile is not quite right
(it try to build a shared library instead of a sared object and this is
not the same on Darwin).

Try the attached patch (do not forget to rerun Configure).
That might also fix the same problem on cygwin.

Please note that if you interested in building bundle, you should
consider using gp2c-run from the GP2C package.

Index: pari/Configure
--- pari.orig/Configure	2005-08-05 16:10:46.000000000 +0200
+++ pari/Configure	2005-08-26 12:36:57.000000000 +0200
@@ -141,8 +141,8 @@
 if test "$static" = n; then LIBS="$LIBS $LDDYN"; fi
 case $osname in
-cygwin) myextradlldflags="-L$libdir -lpari.dll";;
-*)      myextradlldflags=`eval echo $EXTRADLLDFLAGS`;;
+cygwin) modulesextraflags="-L$libdir -lpari.dll";;
+*)      modulesextraflags=`eval echo $EXTRADLLDFLAGS`;;
@@ -153,13 +153,14 @@
 *)      DLLD_modules="$DLLD"; modulesflags="$mydlldflags";;
 modules_build="$CC -c -o %s.o $CFLAGS $DLCFLAGS -I$myincludedir %s.c &&
-$DLLD_modules -o $modulesflags %s.o $myextradlldflags"
+$DLLD_modules -o $modulesflags %s.o $modulesextraflags"
 for variable in\
   pari_release pari_release_verbose version libpari_base static TOP objdir\
   arch asmarch osname pretty\
   kernlvl0 kernlvl1\
-  gnuas AS ASFLAGS KERNELCPPFLAGS LIBS modules_build\
+  modules_build DLLD_modules modulesflags modulesextraflags\
   dir_sep runpath runpathprefix LDDYN\
   ranlib gzip zcat emacs perl ln_s make_sh\
   sizeof_long doubleformat\
Index: pari/config/GEN_Make.SH
--- pari.orig/config/GEN_Make.SH	2005-04-21 15:04:11.000000000 +0200
+++ pari/config/GEN_Make.SH	2005-08-26 12:37:13.000000000 +0200
@@ -59,9 +59,9 @@
 CPPFLAGS   = -I. -I$includedir
 LD         = $LD
-DLLD       = $DLLD
+DLLD       = $DLLD_modules
+DLLDFLAGS  = $modulesflags
+EXTRADLLDFLAGS = $modulesextraflags