[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Octave & PostgreSQL
From: |
Tatsuro MATSUOKA |
Subject: |
RE: Octave & PostgreSQL |
Date: |
Tue, 25 May 2010 15:47:40 +0900 (JST) |
Hello
I have tried
octave:1> cd D:\usr\Tatsu\program\Octave\OctaveForge
octave:2> pkg install database-1.0.4.tar.gz
odbc_wrap.cpp: In member function 'void octave_swig_type::install_global()':
odbc_wrap.cpp:1197: error: 'curr_sym_tab' was not declared in this scope
odbc_wrap.cpp:1197: error: 'link_to_global_variable' was not declared in this
scope
odbc_wrap.cpp:1204: error: 'symbol_record' was not declared in this scope
odbc_wrap.cpp:1204: error: 'sr' was not declared in this scope
odbc_wrap.cpp:1204: error: 'global_sym_tab' was not declared in this scope
odbc_wrap.cpp: In function 'void SWIG_Octave_SetModule(void*,
swig_module_info*)':
odbc_wrap.cpp:2110: error: 'curr_sym_tab' was not declared in this scope
odbc_wrap.cpp:2110: error: 'link_to_global_variable' was not declared in this
scope
odbc_wrap.cpp: In function 'SQLRETURN SQLGetData(void*, SQLUSMALLINT,
std::string*, SQLINTEGER*)':
odbc_wrap.cpp:2429: warning: comparison between signed and unsigned integer
expressions
odbc_wrap.cpp:2431: warning: comparison between signed and unsigned integer
expressions
odbc_wrap.cpp: In function 'octave_value_list _wrap_SQLExtendedFetch(const
octave_value_list&, int)':
odbc_wrap.cpp:5287: error: 'SQLROWSETSIZE' was not declared in this scope
odbc_wrap.cpp:5287: error: 'arg4' was not declared in this scope
odbc_wrap.cpp:5287: error: expected primary-expression before ')' token
odbc_wrap.cpp:5287: error: expected ';' before numeric constant
odbc_wrap.cpp:5324: error: expected primary-expression before ')' token
odbc_wrap.cpp: In function 'octave_value_list Fodbc(const octave_value_list&,
int)':
odbc_wrap.cpp:9826: error: 'curr_sym_tab' was not declared in this scope
odbc_wrap.cpp:9826: error: 'link_to_global_variable' was not declared in this
scope
odbc_wrap.cpp: At global scope:
odbc_wrap.cpp:853: warning: 'void
Swig::swig_register_director(octave_swig_type*, void*,
Swig::Director*)' declared 'sta
tic' but never defined
mingw32-g++-4.4.0-dw2: odbc_wrap.o: No such file or directory
make: *** [odbc.oct] Error 1
'make' returned the following error: make: Entering directory
`/tmp/oct-2/database-1.0.4/src'
CXXFLAGS="-D_GLIBCXX_DLL -march=i686 -mtune=generic -O3 -Wall" mkoctfile
-DHAVE_OCTAVE_32 -v -o
odbc.oct -lodbc32 odbc_w
rap.cpp
mingw32-g++-4.4.0-dw2 -c -I/usr/local/octmgw32_gcc-4.4.0-dw2/include
-Ic:\Programs\Octave\3.2.4_gcc-4.4.0\include\octav
e-3.2.4 -Ic:\Programs\Octave\3.2.4_gcc-4.4.0\include\octave-3.2.4\octave
-Ic:\Programs\Octave\3.2.4_gcc-4.4.0\include -m
ieee-fp -D_GLIBCXX_DLL -march=i686 -mtune=generic -O3 -Wall
-DHAVE_OCTAVE_32 odbc_wrap.cpp -o
odbc_wrap.o
mingw32-g++-4.4.0-dw2 -shared -Wl,--export-all-symbols -Wl,--enable-auto-import
-Wl,--enable-runtime-pseudo-reloc -share
d-libgcc -Wl,--allow-multiple-definition -o odbc.oct odbc_wrap.o -lodbc32
-Lc:\Programs\Octave\3.2.4_gcc-4.4.0\lib\o
ctave-3.2.4 -Lc:\Programs\Octave\3.2.4_gcc-4.4.0\lib -loctinterp -loctave
-lcruft -shared-libgcc
-Wl,--allow-multiple-d
efinition -llapack -lblas -lfftw3 -lfftw3f -lreadline -lncurses -liberty
-lhdf5 -lz -lm -lgdi32
-lws2_32 -luser32 -lke
rnel32 -lgfortran -lstdc++_s
make: Leaving directory `/tmp/oct-2/database-1.0.4/src'
error: called from `pkg>configure_make' in file
C:\Programs\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m near l
ine 1253, column 2
error: called from:
error: C:\Programs\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at
line 714, column 5
error: C:\Programs\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at
line 287, column 7
The error messages of mine are quite different from yours.
The 'pkg install' commands extract the compressed file in the temporary
directory that is specified
by the TMP environment variables.
Please confirm whether TMP is set in your system or not by the getenv function
from the octave prompt.
octave: > getenv('TMP')
Please also try pkg install with -verbose option.
-verbose'
The package manager will print the output of all of the
commands that are performed.
With the verbose option,
pkg -verbose install database-1.0.4.tar.gz
I have gotten.
mkdir (C:\DOCUME~1\Tatsu\LOCALS~1\Temp\oct-3)
untar (database-1.0.4.tar.gz, C:\DOCUME~1\Tatsu\LOCALS~1\Temp\oct-3)
checking for gcc... mingw32-gcc-4.4.0-dw2
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
:
:
octave-forge is configured with
octave: octave (version 3.2.4)
mkoctfile: mkoctfile for Octave 4
swig: pre-generated
postgres: postgresql/libpq-fe.h not found
mysql: mysql/mysql.h not found
sqlite3: sqlite3.h not found
odbc: yes
If you want to use the PostgreSQL, you have to build the PostgreSQL libraries
on the Msys+mingw
tools.
Building the libraries might be possible by the Msys+mingw system bundled with
the octave/mingw32
package. But I do not know how hard it might be.
You can use Msys+MinGW tool chain from octave prompt
octave: > system('sh')
sh-3.1$
The term 'sh-3.1$ ' is the msys sh prompt, you might build the PostgreSQL unixy
way build method.
./configure, make, make install(-strip)
At the time when the version of octave is 3.0, I have tried database package.
However, I have only try the sqlite but did not try the postgres.
I cannot remember in detail but perhaps I used the tricky technique to install
the database package
but I cannot remember what I have done.
Perhaps you will need much efforts to get successful results.
Good Luck
Tatsuro
--- Don Catanzaro wrote:
>
> Hi All,
>
> I am a newbie to Octave and wish to pull data from a PostgreSQL database for
> analysis.
>
> I am using Octave-3.2.4_i686-pc-mingw32_gcc-4.4.0_setup.exe on Windows
> Vista.
> After downloading the database package 1.0.4 from
> http://octave.sourceforge.net/database/index.html
> http://octave.sourceforge.net/database/index.html and installing, I get
> errors (see below).
>
> I have a few questions:
>
> 1) Can someone point out how to fix this error ? If this is simple it
> makes sense for me to fix this bit and move on. The first error does not
> indicate where the permission is denied, and I am logged in as admin -
> perhaps some sub-folder has read only rights but which one ?
>
> 2) If this is a more complicated error I believe there are other ways of
> obtaining data from a PostgreSQL from Octave:
> 2a) Octave database bindings
> http://octave-swig.sourceforge.net/octave-db.html
> http://octave-swig.sourceforge.net/octave-db.html
> 2b) pg_lib
> http://www.mail-archive.com/address@hidden/msg02008.html
> http://www.mail-archive.com/address@hidden/msg02008.html
>
> However, I am not exactly sure how the differences between 1, 2a, or 2b nor
> on the ease of install.
>
> Could someone give a newbie a little direction ?
>
> Thanks in advance
>
> ----------------- DATABASE PACKAGE INSTALL ERROR -----------------
>
> octave-3.2.4.exe:2> pkg install database-1.0.4.tar.gz
> error: Permission denied
> error: ignoring octave_execution_exception while preparing to exit
> error: Permission denied
> error: ignoring octave_execution_exception while preparing to exit
> error: Permission denied
> error: ignoring octave_execution_exception while preparing to exit
> odbc_wrap.cpp: In member function 'void octave_swig_type::install_global()':
> odbc_wrap.cpp:1197: error: 'curr_sym_tab' was not declared in this scope
> odbc_wrap.cpp:1197: error: 'link_to_global_variable' was not declared in
> this
> ope
> odbc_wrap.cpp:1204: error: 'symbol_record' was not declared in this scope
> odbc_wrap.cpp:1204: error: 'sr' was not declared in this scope
> odbc_wrap.cpp:1204: error: 'global_sym_tab' was not declared in this scope
> odbc_wrap.cpp: In function 'void SWIG_Octave_SetModule(void*,
> swig_module_inf
> ':
> odbc_wrap.cpp:2110: error: 'curr_sym_tab' was not declared in this scope
> odbc_wrap.cpp:2110: error: 'link_to_global_variable' was not declared in
> this
> ope
> odbc_wrap.cpp: In function 'SQLRETURN SQLGetData(void*, SQLUSMALLINT,
> std::st
> g*, SQLINTEGER*)':
> odbc_wrap.cpp:2429: warning: comparison between signed and unsigned integer
> e
> essions
> odbc_wrap.cpp:2431: warning: comparison between signed and unsigned integer
> e
> essions
> odbc_wrap.cpp: In function 'octave_value_list _wrap_SQLExtendedFetch(const
> oc
> e_value_list&, int)':
> odbc_wrap.cpp:5287: error: 'SQLROWSETSIZE' was not declared in this scope
> odbc_wrap.cpp:5287: error: 'arg4' was not declared in this scope
> odbc_wrap.cpp:5287: error: expected primary-expression before ')' token
> odbc_wrap.cpp:5287: error: expected ';' before numeric constant
> odbc_wrap.cpp:5324: error: expected primary-expression before ')' token
> odbc_wrap.cpp: In function 'octave_value_list Fodbc(const
> octave_value_list&,
> t)':
> odbc_wrap.cpp:9826: error: 'curr_sym_tab' was not declared in this scope
> odbc_wrap.cpp:9826: error: 'link_to_global_variable' was not declared in
> this
> ope
> odbc_wrap.cpp: At global scope:
> odbc_wrap.cpp:853: warning: 'void
> Swig::swig_register_director(octave_swig_ty
> , void*, Swig::Director*)' declared 'static' but never defined
> mingw32-g++-4.4.0-dw2: odbc_wrap.o: No such file or directory
> make: *** [odbc.oct] Error 1
> 'make' returned the following error: make: Entering directory
> `/tmp/oct-2/dat
> se-1.0.4/src'
> CXXFLAGS="-D_GLIBCXX_DLL -march=i686 -mtune=generic -O3 -Wall" mkoctfile
> -DHA
> OCTAVE_32 -v -o odbc.oct -lodbc32 odbc_wrap.cpp
> mingw32-g++-4.4.0-dw2 -c -I/usr/local/octmgw32_gcc-4.4.0-dw2/include
> -Ic:\Oc
> e\3.2.4_gcc-4.4.0\include\octave-3.2.4
> -Ic:\Octave\3.2.4_gcc-4.4.0\include\oc
> e-3.2.4\octave -Ic:\Octave\3.2.4_gcc-4.4.0\include -mieee-fp -D_GLIBCXX_DLL
> rch=i686 -mtune=generic -O3 -Wall -DHAVE_OCTAVE_32 odbc_wrap.cpp -o
> odbc_w
> .o
> mingw32-g++-4.4.0-dw2 -shared -Wl,--export-all-symbols
> -Wl,--enable-auto-impo
> -Wl,--enable-runtime-pseudo-reloc -shared-libgcc
> -Wl,--allow-multiple-definit
> -o odbc.oct odbc_wrap.o -lodbc32
> -Lc:\Octave\3.2.4_gcc-4.4.0\lib\octave-
> .4 -Lc:\Octave\3.2.4_gcc-4.4.0\lib -loctinterp -loctave -lcruft
> -shared-libg
> -Wl,--allow-multiple-definition -llapack -lblas -lfftw3 -lfftw3f -lreadline
> curses -liberty -lhdf5 -lz -lm -lgdi32 -lws2_32 -luser32 -lkernel32
> -lgfortr
> -lstdc++_s
> make: Leaving directory `/tmp/oct-2/database-1.0.4/src'
> error: called from `pkg>configure_make' in file
> C:\Octave\3.2.4_gcc-4.4.0\sha
> octave\3.2.4\m\pkg\pkg.m near line 1253, column 2
> error: called from:
> error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at line
> 714
> olumn 5
> error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\pkg\pkg.m at line
> 287
> olumn 7
> octave-3.2.4.exe:2>
>
>
>
> --------------------------------------------------------------------------
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/RE-Octave-PostgreSQL-tp2228921p2228921.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
--------------------------------------
2010 FIFA World Cup News [Yahoo!Sports/sportsnavi]
http://pr.mail.yahoo.co.jp/southafrica2010/