Back to the main page.

Bug 3258 - Compilation of MEX files for Octave

Status NEW
Reported 2017-02-24 18:24:00 +0100
Modified 2017-06-13 22:53:50 +0200
Product: FieldTrip
Component: octave
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also: http://bugzilla.fieldtriptoolbox.org/show_bug.cgi?id=3308

Guillaume - 2017-02-24 18:24:54 +0100

I had to make the following changes for compilation with Octave. Also, most functions have an helper text with generic "funname" - Octave displays a warning for these. Index: geometry.c =================================================================== --- geometry.c (revision 7030) +++ geometry.c (working copy) @@ -17,7 +17,7 @@ */ #include -#include "matrix.h" +#include "mex.h" #include "geometry.h" /****************************************************************************/ Index: read_16bit.c =================================================================== --- read_16bit.c (revision 7030) +++ read_16bit.c (working copy) @@ -1,3 +1,4 @@ +#include #include #include #include "mex.h" Index: read_24bit.c =================================================================== --- read_24bit.c (revision 7030) +++ read_24bit.c (working copy) @@ -28,6 +28,7 @@ #define _LARGEFILE_SOURCE +#include #include #include <sys/types.h> #include "mex.h" </p>

Robert Oostenveld - 2017-02-24 19:00:45 +0100

Hi Guillaume, Can you please coordinate with Nic (CC)? He is (informally) heading the Octave support for FT. There are still some PRs on github that I have not fully looked into, I think one relates to mex files. Robert


nno - 2017-02-25 11:02:39 +0100

(In reply to Robert Oostenveld from comment #1) Please see https://github.com/fieldtrip/fieldtrip/pull/329 for a pull request with changes to make .c files compilable on Octave. This PR includes the changes in your patch. Also see https://github.com/fieldtrip/fieldtrip/pull/330 for work-in-progress (not ready to merge yet) to make it easier to compile those.


Guillaume - 2017-02-27 14:25:38 +0100

(In reply to nno from comment #2) Thanks, both. Changes in PR 329 will fix the compilation issues and it would be great to have them accepted. I would still change the H1 line of relevant functions to remove warnings: function [varargout] = funname(varargin) I also observe that the nan* functions compile but are not working correctly in Octave - segfault most of the time. As for a Makefile, I'm in favour of it. I already use one to compile the FieldTrip's MEX files we use in SPM. When the day comes, it will make it easier to package FieldTrip for, eg, NeuroDebian.


Robert Oostenveld - 2017-06-13 22:53:50 +0200

(In reply to Guillaume from comment #3) PR 329 has been merged (compilation issues) PR 330 has been merged (Makefile) PR 455 has been merged (function names) I believe this leaves only "the nan* functions compile but are not working correctly in Octave - segfault most of the time" as an open issue.