Solution to MacOSX on Intel?

Ben Abbott bpabbott at mac.com
Thu Dec 6 21:58:27 CST 2007


*sigh* ... I must admit to an embarrassing error. I was under the  
impression that config.h was used by configure, rather than being  
generated by it. Thus I'd made changes to config.h and then run ./ 
configure ... which reversed the changes :-(

So I'm going through the exercise in *explicit* fashion. Please review  
my steps will *low* expectations of my knowledge and expertise in such  
matters ;-)

In any event, I've successfully built octave using g95 on MacOSX 10.5  
on Intel. The details are below.

(1) I've applied the patch from John.

Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.600
diff -u -u -r1.600 configure.in
--- configure.in	4 Dec 2007 20:51:25 -0000	1.600
+++ configure.in	6 Dec 2007 20:00:42 -0000
@@ -989,9 +989,13 @@
      DL_LDFLAGS='-bundle -bundle_loader $(TOPDIR)/src/octave $ 
(LDFLAGS)'
      MKOCTFILE_DL_LDFLAGS='-bundle -bundle_loader $$BINDIR/octave-$ 
$OCTAVE_VERSION$$EXEEXT'
      SH_LDFLAGS='-dynamiclib -single_module $(LDFLAGS)'
-    CXXPICFLAG=
-    CPICFLAG=
-    FPICFLAG=
+    case "$canonical_host_type" in
+      powerpc-*)
+        CXXPICFLAG=
+        CPICFLAG=
+        FPICFLAG=
+      ;;
+    esac
      SHLEXT=dylib
      SHLLIB='$(SHLEXT)'
      SHLEXT_VER='$(version).$(SHLEXT)'

(2) I ran autogen
./autogen.sh

(3) and then configure
./configure '--prefix=/sw'  '--infodir=${prefix}/share/info' '--mandir= 
${prefix}/share/man' '--libexecdir=${prefix}/lib' '--build=i386-apple- 
darwin' 'build_alias=i386-apple-darwin' 'CFLAGS=-O0 -g -ggdb3'  
'LDFLAGS=-L/sw/lib' 'CPPFLAGS=-I/sw/include' 'CXXFLAGS=-O0 -g -ggdb3'  
'F77=/sw/bin/g95' 'FFLAGS=-O0'

(4) *now* I've edited config.h (thanks again to John's direction).
edit the generated config.h file and change the line
- /* #undef OCTAVE_HAVE_BROKEN_STRPTIME */
+ #define OCTAVE_HAVE_BROKEN_STRPTIME 1
- #define HAVE_STRUCT_TM_TM_ZONE 0
+ #define HAVE_STRUCT_TM_TM_ZONE 1

(5) build
make

(6) test
make check

-------------------------
[...]
   scripts/time/datevec.m ................................. PASS   11/11
[...]
Summary:

   PASS   3770
   FAIL      0

There were 1 expected failures (see fntests.log for details).
-------------------------

I'll spend more time determining if both changes to config.h are  
needed and if the patch to configure.in is needed.

In the meantime, perhaps someone else can duplicate/verify this result  
with g95, or better yet, gfortran.

Ben

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20071206/d5ac9fa7/attachment-0001.html 


More information about the Bug-octave mailing list