Dear all My name is Tatsuro MATSUOKA. I am a Octave-cygwin maintainer and also am trying to build octave system on the mingw. http://www.geocities.jp/tmoctwin/ I am struggling with Octave-forge packages on mingw. The Octave-forge packages, which are additional packages to Octave, have a symbolic package, which are mainly for used for get analytical derivatives for non-linear eq. and ODE solvers. Unlike the cygwin, the building process of GiNac is very difficult for me and has not been successful yet. (Cygwin build was easily successful) With the help of the cygwin pkg-config and fig2dev, I have at last been successful in ./configure. However I have not been successful for the 'make'. Error messages at the 'make' are described at the end of the mail. excompiler.cpp:116: error: `mktemp' was not declared in this scope This error might be critical and I have not been able to find the reason. I would like to wait for someone suggesting me. Regards Tatsuro ******************************** make[2]: Entering directory `/home/octaves/ginac-1.4.1/ginac' /bin/sh ../libtool --tag=CXX --mode=compile /mingw/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I/mingw/include -I/usr/local/octave-3.0.0/include -I/GnuWin32/include -I/usr/local/octave-3.0.0/include -g -O2 -MT excompiler.lo -MD -MP -MF .deps/excompiler.Tpo -c -o excompiler.lo excompiler.cpp /mingw/bin/g++ -DHAVE_CONFIG_H -I. -I.. -I/mingw/include -I/usr/local/octave-3.0.0/include -I/GnuWin32/include -I/usr/local/octave-3.0.0/include -g -O2 -MT excompiler.lo -MD -MP -MF .deps/excompiler.Tpo -c excompiler.cpp -DDLL_EXPORT -DPIC -o .libs/excompiler.o excompiler.cpp: In member function `void GiNaC::excompiler::create_src_file(std::string&, std::ofstream&)': excompiler.cpp:116: error: `mktemp' was not declared in this scope make[2]: *** [excompiler.lo] Error 1 -------------------------------------- Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar http://pr.mail.yahoo.co.jp/toolbar/
tmacchant4@yahoo.co.jp wrote:
Error messages at the 'make' are described at the end of the mail.
excompiler.cpp:116: error: `mktemp' was not declared in this scope
mktemp(3) is declared in cstdlib. That header file needs to be included. Try this patch: RCS file: /home/cvs/GiNaC/ginac/excompiler.cpp,v retrieving revision 1.4.2.2 diff -u -r1.4.2.2 excompiler.cpp --- ginac/excompiler.cpp 20 Nov 2007 22:38:41 -0000 1.4.2.2 +++ ginac/excompiler.cpp 2 Jan 2008 08:42:26 -0000 @@ -25,6 +25,7 @@ #include "excompiler.h" +#include <cstdlib> #include <stdexcept> #include <ios> #include <fstream> Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Hello! On Wed, Jan 02, 2008 at 09:45:11AM +0100, Richard B. Kreckel wrote:
tmacchant4@yahoo.co.jp wrote:
Error messages at the 'make' are described at the end of the mail.
excompiler.cpp:116: error: `mktemp' was not declared in this scope
mktemp(3) is declared in cstdlib. That header file needs to be included. Try this patch:
RCS file: /home/cvs/GiNaC/ginac/excompiler.cpp,v retrieving revision 1.4.2.2 diff -u -r1.4.2.2 excompiler.cpp --- ginac/excompiler.cpp 20 Nov 2007 22:38:41 -0000 1.4.2.2 +++ ginac/excompiler.cpp 2 Jan 2008 08:42:26 -0000 @@ -25,6 +25,7 @@
#include "excompiler.h"
+#include <cstdlib> #include <stdexcept> #include <ios> #include <fstream>
I doubt this is correct fix. That is, it helps to avoid compilation failure, but it doesn't make the excompiler thing functional. The code is very ELF- (or even glibc-) specific, so IMHO the right fix is to disable it on non-ELF platforms (mingw, darwin). Best regards, Alexei -- All science is either physics or stamp collecting.
Alexei Sheplyakov wrote:
--- ginac/excompiler.cpp 20 Nov 2007 22:38:41 -0000 1.4.2.2 +++ ginac/excompiler.cpp 2 Jan 2008 08:42:26 -0000 @@ -25,6 +25,7 @@
#include "excompiler.h"
+#include <cstdlib> #include <stdexcept> #include <ios> #include <fstream>
I doubt this is correct fix. That is, it helps to avoid compilation failure, but it doesn't make the excompiler thing functional. The code is very ELF- (or even glibc-) specific, so IMHO the right fix is to disable it on non-ELF platforms (mingw, darwin).
You're right, the code is ELF-specific because of dlopen and friends. I don't see what makes it glibc-specific, though. But then, the entire code is pretty much disabled to throwing stubs #if !defined(HAVE_LIBDL). Tatsuru, can you, please send us your config.log file? Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
On Wed, Jan 02, 2008 at 11:53:41AM +0100, Richard B. Kreckel wrote:
You're right, the code is ELF-specific because of dlopen and friends. I don't see what makes it glibc-specific, though.
I thought mktemp remove, and co are POSIXish functions, and GNU libstdc++ provides them, but other implementations might not do so. Apparently, this is not true. These functions are required by C89, thus, they should be declared in <cstdlib> and <cstdio>, respectively. So, excompiler.cpp should include those headers. But we got a different problem.
But then, the entire code is pretty much disabled to throwing stubs #if !defined(HAVE_LIBDL).
I guess the configure script got confused due to mixed Cygwin/MinGW environment. I think we should tell woe32 users to build GiNaC either in MinGW/msys environment, or Cygwin, but not a mixture of thereof (unless they know *what* are they doing). Best regards, Alexei -- All science is either physics or stamp collecting.
participants (3)
-
Alexei Sheplyakov
-
Richard B. Kreckel
-
tmacchant4@yahoo.co.jp