Tatsuro MATSUOKA wrote:
> I have tried to build optiminterp-0.3.2 on octave-3.0.5 that built myself 
> using gcc-4.4.0-TDM-dw2.
> 
> I met the following error
> 
> c:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0-dw2/libgfortran.a(error.o):error.
> c:(.text+0x6b8): multiple definition of `_gfortran_runtime_error'
> c:/Programs/OctaveBuild/lib/octave-3.0.5/liboctave.dll.a(d020226.o):(.text+0x0):
>  first defined here
> c:/programs/mingw/bin/../lib/gcc/mingw32/4.4.0-dw2/libgfortran.a(error.o):error.
> c:(.text+0x6fc): multiple definition of `_gfortran_os_error'
> c:/Programs/OctaveBuild/lib/octave-3.0.5/liboctave.dll.a(d020219.o):(.text+0x0):
>  first defined here
> collect2: ld returned 1 exit status
> make: *** [optiminterp.oct] Error 1
> 
> I have tried '--allow-multiple-definition' but the results were the same.
> Therefore I have tryied
> 

Tatsuro,

If you built your mingw version yourself, then please try out the 
following patch I applied to the octave sources.

diff -r fd11a08a9b31 configure.in
--- a/configure.in      Sun Jan 11 07:55:44 2009 +0100
+++ b/configure.in      Sun Jan 11 13:32:47 2009 +0100
@@ -833,13 +833,19 @@
  fi

  XTRA_CRUFT_SH_LDFLAGS=
+XTRA_OCTINTERP_SH_LDFLAGS=
  case "$canonical_host_type" in
    *-*-msdosmsvc)
      FLIBS="$FLIBS -lkernel32"
      XTRA_CRUFT_SH_LDFLAGS="-Wl,-def:cruft.def"
    ;;
+  *-*-mingw*)
+    XTRA_CRUFT_SH_LDFLAGS="-Wl,--exclude-libs=libgfortran.a"
+    XTRA_OCTINTERP_SH_LDFLAGS="-Wl,--exclude-libs=libgfortran.a"
+  ;;
  esac
  AC_SUBST(XTRA_CRUFT_SH_LDFLAGS)
+AC_SUBST(XTRA_OCTINTERP_SH_LDFLAGS)

  FC=$F77
  AC_SUBST(FC)
diff -r fd11a08a9b31 src/Makefile.in
--- a/src/Makefile.in   Sun Jan 11 07:55:44 2009 +0100
+++ b/src/Makefile.in   Sun Jan 11 13:32:47 2009 +0100
@@ -348,6 +348,9 @@
    endif
  endif

+XTRA_OCTINTERP_SH_LDFLAGS = @XTRA_OCTINTERP_SH_LDFLAGS@
+SH_LDFLAGS += $(XTRA_OCTINTERP_SH_LDFLAGS)
+
  libraries: $(LIBRARIES)
  .PHONY: libraries


It disables exporting symbols from gcc's system gfortran library.
Don't know why this is not done in the first place anyway.

Since this patch is a bit of a mingw-gcc-with-gfortran-only hack I did 
not post it to be included into octave.

benjamin

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to