[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mingw32 compiled binaries
From: |
Benjamin Lindner |
Subject: |
Re: Mingw32 compiled binaries |
Date: |
Wed, 06 Jun 2007 14:40:14 +0200 |
> On 6/6/07, Benjamin Lindner <address@hidden> wrote:
> > I have also used Michael's c++ code of mkoctfile and octave-config from
> > forge (slightly modified) instead of the shell scripts.
>
> Can you provide patches? It might be commited directly to CVS.
I made two changes, one straightforward and one possibly to be discussed
1) I replaced NPOS by std::string::npos, as NPOS is not defined in mingw's g++
2) I also dropped the FLIBS variable from the build command. I did
this because FLIBS contains paths valid only on the build system. But
the user of a (hypothetic) package need not have the same paths with
his mingw installation, so I dropped it. The whole octave installation
is relocatable, but these paths are hardwired (they are taken from the
compiler's configuration, so are not related to octave's installation
directory). I found that omitting FLIBS renders an equally working
mkoctfile, so I dropped it.
I'd like to discuss ths mkoctfile/octave-config files anyway, but this
would be important only if the C++ code versions would eventually
be included in octave's sources.
I have attached a patch against revision 1.6 from forge fyi.
> > What I have not yet tried is
> > Octplot - simply not used yet
> > gnuplot - here I used the win32 binaray available
>
> This is compiled with mingw32 anyway, so just use it. I recompiled
> gnuplot with MSVC to be able to share common DLL's (freetype, zlib,
> libpng...).
> OTOH, I also included a patch that makes gnuplot really work with
> input/output pipes: this avoid the additional gnuplot window and also
> solves a bug in gnuplot when octave is sending a lot of data to it.
Yes I read your comments on your compiled pgnuplot.
I would like to use your patched code, especially because of the
pipes-patch you provided. I thought of compiling it without the wxt
terminal, this would reduce dependencies.
However, I have not yet compiled the graphics libraries required for
the image forge-toolbox. This is also on my to-do list.
> > As micheal can probably tell, some problems arise in many small details,
> > and I created work-arounds to succeed a build. My current results are
> > not yet that professional to be immediately released, I did not expect
> > such quick positive response :)
>
> Can you make some benchmark comparison between your version and
> the one I compiled with MSVC? You can install the MSVC-version with the
> generic blas/lapack DLL's, which should more or less correspond to what
> you have with mingw. I used to use the octave2 script from
> http://www.sciviews.org/benchmark/index.html
Yes I can do this. Will post it when ready.
benjamin
$ diff -u mkoctfile.cc.in_forgecvs16.TXT ./octave-2.9.12/mkoctfile.cc.in
--- mkoctfile.cc.in_forgecvs16.TXT Wed Jun 6 14:13:07 2007
+++ ./octave-2.9.12/mkoctfile.cc.in Thu May 31 11:10:23 2007
@@ -116,7 +116,7 @@
{
size_t pos = bin_dir.rfind ("\\bin\\");
- if (pos != NPOS)
+ if (pos != std::string::npos)
vars["OCTAVE_HOME"] = bin_dir.substr (0, pos);
}
#endif
@@ -148,7 +148,11 @@
if (vars["INCLUDEDIR"] != "/usr/include")
DEFAULT_INCFLAGS += " -I" + vars["INCLUDEDIR"];
- std::string DEFAULT_LFLAGS = "-L" + vars["OCTLIBDIR"];
+#if defined (__WIN32__) && ! defined (_POSIX_VERSION)
+ std::string DEFAULT_LFLAGS = "-L" + vars["OCTLIBDIR"] + " -L" +
vars["OCTLIBDIR"] + "\\..";
+#else
+ std::string DEFAULT_LFLAGS = "-L" + vars["OCTLIBDIR"] + " -L" +
vars["OCTLIBDIR"] + "/.."
+#endif
vars["CPPFLAGS"] = get_variable("CPPFLAGS", %OCTAVE_CONF_CPPFLAGS%);
vars["INCFLAGS"] = get_variable("INCFLAGS", DEFAULT_INCFLAGS);
@@ -289,15 +293,15 @@
size_t pos = s.rfind('.');
string retval;
- if (pos == NPOS)
+ if (pos == std::string::npos)
retval = s;
else
retval = s.substr(0, pos);
if (strip_path)
{
size_t p1 = retval.rfind('/'), p2 = retval.rfind('\\');
- pos = (p1 != NPOS && p2 != NPOS ? max(p1, p2) : (p2 != NPOS ?
p2 : p1));
- if (pos != NPOS)
+ pos = (p1 != std::string::npos && p2 != std::string::npos ?
max(p1, p2) : (p2 != std::string::npos ? p2 : p1));
+ if (pos != std::string::npos)
retval = retval.substr(0, pos);
}
return retval;
@@ -664,8 +668,7 @@
cmd= vars["LD_CXX"] + " " + vars["CPPFLAGS"] +
" " + vars["ALL_CXXFLAGS"] + " " + vars["RDYNAMIC_FLAG"] + " " +
vars["ALL_LDFLAGS"] + " " +
pass_on_options + " " + output_option + " " + objfiles + " " + libfiles + " " +
ldflags + " " + vars["LFLAGS"] + " " +
vars["RLD_FLAG"] + " " + vars["OCTAVE_LIBS"] + " " +
- vars["BLAS_LIBS"] + " " +
vars["FFTW_LIBS"] + " " + vars["LIBREADLINE"] + " " + vars["LIBS"] + " " +
- vars["FLIBS"];
+ vars["BLAS_LIBS"] + " " +
vars["FFTW_LIBS"] + " " + vars["LIBREADLINE"] + " " + vars["LIBS"];
result = run_command(cmd);
}
else
@@ -677,7 +680,7 @@
else
{
string LINK_DEPS = vars["LFLAGS"] + " " +
vars["OCTAVE_LIBS"] + " " + vars["LDFLAGS"] + " " + vars["BLAS_LIBS"] + " " +
- vars["FFTW_LIBS"] + " " +
vars["LIBS"] + " " + vars["FLIBS"];
+ vars["FFTW_LIBS"] + " " +
vars["LIBS"];
cmd = vars["DL_LD"] + " " + vars["DL_LDFLAGS"] + " " +
pass_on_options + " -o " + octfile + " " + objfiles + " " +
libfiles + " " + ldflags + " " + LINK_DEPS;
result = run_command(cmd);
--- octave-config.cc.in_forgecvs13.TXT Wed Jun 6 14:18:16 2007
+++ ./octave-2.9.12/octave-config.cc.in Thu May 31 11:10:23 2007
@@ -106,7 +106,7 @@
{
size_t pos = bin_dir.rfind ("\\bin\\");
- if (pos != NPOS)
+ if (pos != std::string::npos)
OCTAVE_HOME = bin_dir.substr (0, pos);
}
#endif
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
- Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Mingw32 compiled binaries, John W. Eaton, 2007/06/06
- Re: Mingw32 compiled binaries, Michael Goffioul, 2007/06/06
- Re: Mingw32 compiled binaries, David Bateman, 2007/06/06
- Re: Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Re: Mingw32 compiled binaries, Michael Goffioul, 2007/06/06
- Re: Mingw32 compiled binaries,
Benjamin Lindner <=
- Re: Mingw32 compiled binaries, Michael Goffioul, 2007/06/06
- Re: Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Re: Mingw32 compiled binaries, Michael Goffioul, 2007/06/06
- Re: Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Re: Mingw32 compiled binaries, Tatsuro MATSUOKA, 2007/06/06
- Re: Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Re: Mingw32 compiled binaries, David Bateman, 2007/06/06
- Re: Mingw32 compiled binaries, Benjamin Lindner, 2007/06/06
- Re: Mingw32 compiled binaries, Tatsuro MATSUOKA, 2007/06/06