help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mex -> oct problems


From: Fredrik Lingvall
Subject: mex -> oct problems
Date: Tue, 06 Apr 2004 14:27:53 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040130

Hi All!

I'm trying to add Octave support for att freeware Matlab toolbox and I'm using
2.1.57 and the corresponding octave-forge mex-tools. The toolbox contains
a number of mex-files that I want to build oct-files for.

I have some problems though. The first is that octave segfaults
the second time that I call the oct-function. This is the the part of the
strace output where it segfaults:
...

gettimeofday({1081252373, 30650}, NULL) = 0
gettimeofday({1081252373, 30810}, NULL) = 0
gettimeofday({1081252373, 30969}, NULL) = 0
stat64("/disk2/users/staff/fl/projects/DREAM/dream_oct/scirc_sir.oct", {st_mode=S_IFREG|0755, st_size=89826, ...}) = 0
brk(0)                                  = 0x8a5e000
brk(0x8a60000)                          = 0x8a60000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
write(2, "p", 1p)                        = 1
write(2, "a", 1a)                        = 1

...


The second problem is that the octave-forge mex script, which uses
mkoctfile, allways links with my optimized BLAS libs and fftw3,

-llapack_LINUX_p4
-lblas_goto_p4_512
-lfftw3

that not all users have installed. In an attempt to solve this I skipped the mkoctfile and mex tools
and used g++ with the flags/libs in my Makefile

    -shared
    -L/usr/local/lib/octave-$(OCTVER) -loctinterp -loctave -lcruft
/usr/local/libexec/octave/$(OCTVER)/site/oct/i686-pc-linux-gnu/octave-forge/mex.o.

Is this sufficient or am I missing something? For example, when building mex-files for MatIab I need to use -rdynamic as well.

Regards,

Fredrik



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]