jacquesdurden / yawtb

YAWTB : Yet Another Wavelet ToolBox
GNU General Public License v2.0
8 stars 4 forks source link

Error compiling for MATLAB R2022B #2

Open DuaneKaufman opened 1 year ago

DuaneKaufman commented 1 year ago

Dear SIrs, I modified yamake to accept version 9 (which is what MATLAB 2022 reports), using the same settings as MATLAB 2017. Trying to compile, I get the error below:

yamake Compiling all the YAWtb mex files: Building with 'gcc'. In file included from /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c:19: /home/duane/matlab/toolbox/yawtb-main/include/yawtb.h: In function ‘mxSetCellNb’: /home/duane/matlab/toolbox/yawtb-main/include/yawtb.h:47:60: warning: passing argument 3 of ‘mxCalcSingleSubscript_730’ from incompatible pointer type [-Wincompatible-pointer-types] 47 mxSetCell(cellarray, mxCalcSingleSubscript(cellarray, 1, &index), cell); ^~
int *
In file included from /usr/local/MATLAB/R2022b/extern/include/mex.h:43, from /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c:18: /usr/local/MATLAB/R2022b/extern/include/matrix.h:858:85: note: expected ‘const mwIndex ’ {aka ‘const long unsigned int ’} but argument is of type ‘int *’ 858 const mwIndex *subs); ~~~^~~~ /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c: In function ‘mexFunction’: /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c:77:33: warning: implicit declaration of function ‘mxCreateScalarDouble’ [-Wimplicit-function-declaration] 77 mxSetCellNb(wavparval, 1, mxCreateScalarDouble(1.25)); ^~~~~~~~ /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c:77:33: warning: passing argument 3 of ‘mxSetCellNb’ makes pointer from integer without a cast [-Wint-conversion] 77 mxSetCellNb(wavparval, 1, mxCreateScalarDouble(1.25)); ^~~~~~
int
/home/duane/matlab/toolbox/yawtb-main/include/yawtb.h:45:58: note: expected ‘mxArray ’ {aka ‘struct mxArray_tag ’} but argument is of type ‘int’ 45 void mxSetCellNb(mxArray cellarray, int index, mxArray cell) ~~~^~ /home/duane/matlab/toolbox/yawtb-main/continuous/sphere/wave_defs/dogsph.c:79:33: warning: passing argument 3 of ‘mxSetCellNb’ makes pointer from integer without a cast [-Wint-conversion] 79 mxSetCellNb(wavparval, 3, mxCreateScalarDouble(0)); ^~~~~~~
int

/home/duane/matlab/toolbox/yawtb-main/include/yawtb.h:45:58: note: expected ‘mxArray ’ {aka ‘struct mxArray_tag ’} but argument is of type ‘int’ 45 | void mxSetCellNb(mxArray cellarray, int index, mxArray cell) | ~~~^~

Error in compiling: mex dogsph.c -I"/home/duane/matlab/toolbox/yawtb-main/include" -DMATLAB6 -DMTLBR13 ... abort.

I am more than willing to help getting YAWTB working with MATLAB R2022B (Linux and Windows 10)

Sincerely, Duane Kaufman

DuaneKaufman commented 1 year ago

Hi All, Sorry to follow my own post, but I made modifications, and was able to compile (with warnings). and the toolbox seems to operate correctly under Linux. Sincerely, Duane

jacquesdurden commented 1 year ago

Dear Duane,

Sorry for the delay. This is great. Could you share your modifications via git, as well as the procedure you followed on linux ? That could be inserted in a Readme.

Afaik there is a test procedure you can launch to see if all is working. However, the toolbox was conceived for an old version of matlab, before 2010.

Best, Laurent Le 25 févr. 2023, 00:46 +0100, Duane Kaufman @.***>, a écrit :

Hi All, Sorry to follow my own post, but I made modifications, and was able to compile (with warnings). and the toolbox seems to operate correctly under Linux. Sincerely, Duane

— Reply to this email directly, view it on GitHubhttps://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1444732601, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANHD74MNDDCGGFIJD5AD5JDWZFB53ANCNFSM6AAAAAAVG4GDYY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

DuaneKaufman commented 1 year ago

Dear Laurent,

I have not tried yet under Windows, and would like to make an attempt to get things working there too, if possible. Is the compilation procedure much different under Windows, has it worked before?

I'm a newbie when it comes to git, but I'll give it a try. Just be ready for some goofs... :)

Sincerely, Duane

----- On Feb 25, 2023, at 1:42 AM, jacquesdurden @.***> wrote:

Dear Duane,

Sorry for the delay. This is great. Could you share your modifications via git, as well as the procedure you followed on linux ? That could be inserted in a Readme.

Afaik there is a test procedure you can launch to see if all is working. However, the toolbox was conceived for an old version of matlab, before 2010.

Best, Laurent Le 25 févr. 2023, 00:46 +0100, Duane Kaufman @.***>, a écrit :

Hi All, Sorry to follow my own post, but I made modifications, and was able to compile (with warnings). and the toolbox seems to operate correctly under Linux. Sincerely, Duane

— Reply to this email directly, view it on GitHub< [ https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1444732601 https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1444732601 ] >, or unsubscribe< [ https://github.com/notifications/unsubscribe-auth/ANHD74MNDDCGGFIJD5AD5JDWZFB53ANCNFSM6AAAAAAVG4GDYY

https://github.com/notifications/unsubscribe-auth/ANHD74MNDDCGGFIJD5AD5JDWZFB53ANCNFSM6AAAAAAVG4GDYY ] >. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, [ https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1445022627 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABK2PQDOXC5NWPIFRJYPZU3WZGZXBANCNFSM6AAAAAAVG4GDYY | unsubscribe ] . You are receiving this because you authored the thread. Message ID: < @.*** >

DuaneKaufman commented 1 year ago

Dear Laurent,

I was unable to find the test procedure you refer to. However, I did move my modified yawtb tree over to Windows 10 and can confirm it compiles there too (with the same modifications).

I have cloned the repository, and am updating the files I changed. What would you like the README for what I did to contain?

BTW, if you are French (as your E-mails may suggest - pardon me if this is incorrect), your English E-mails are very well written.

Sincerely, Duane

----- On Feb 25, 2023, at 1:42 AM, jacquesdurden @.***> wrote:

Dear Duane,

Sorry for the delay. This is great. Could you share your modifications via git, as well as the procedure you followed on linux ? That could be inserted in a Readme.

Afaik there is a test procedure you can launch to see if all is working. However, the toolbox was conceived for an old version of matlab, before 2010.

Best, Laurent Le 25 févr. 2023, 00:46 +0100, Duane Kaufman @.***>, a écrit :

Hi All, Sorry to follow my own post, but I made modifications, and was able to compile (with warnings). and the toolbox seems to operate correctly under Linux. Sincerely, Duane

— Reply to this email directly, view it on GitHub< [ https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1444732601 https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1444732601 ] >, or unsubscribe< [ https://github.com/notifications/unsubscribe-auth/ANHD74MNDDCGGFIJD5AD5JDWZFB53ANCNFSM6AAAAAAVG4GDYY

https://github.com/notifications/unsubscribe-auth/ANHD74MNDDCGGFIJD5AD5JDWZFB53ANCNFSM6AAAAAAVG4GDYY ] >. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, [ https://github.com/jacquesdurden/yawtb/issues/2#issuecomment-1445022627 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABK2PQDOXC5NWPIFRJYPZU3WZGZXBANCNFSM6AAAAAAVG4GDYY | unsubscribe ] . You are receiving this because you authored the thread. Message ID: < @.*** >