Closed mlustig closed 11 months ago
This looks to be an issue with older Macs as well. I have traced it back to this commit:
1b142f6aca9252901ddd64cb515d7640640c4b93 is the first bad commit commit 1b142f6aca9252901ddd64cb515d7640640c4b93 Author: Martin Uecker @.***> Date: Thu Apr 8 21:25:25 2021 +0200
POSIX shared memory files
Makefile | 8 ++-- src/misc/io.c | 14 ++++++- src/misc/io.h | 2 +- src/misc/mmio.c | 116 +++++++++++++++++++++++++++++++++++++++----------------- src/misc/mmio.h | 3 ++
Jon Tamir, PhD Assistant Professor Electrical and Computer Engineering The University of Texas at Austin
www.jtsense.comhttp://www.jtsense.com
From: Miki Lustig @.> Sent: Tuesday, July 6, 2021 18:04 To: mrirecon/bart @.> Cc: Subscribed @.***> Subject: [mrirecon/bart] latest version in Repo fails to compile on OS X with clang, gcc-10 (#269)
/Users/mlustig/Downloads/bart/src/num/convcorr.c: In function 'detect_convcorr':
/Users/mlustig/Downloads/bart/src/num/convcorr.c:162:9: error: unknown type name 'uint'; did you mean 'int'?
162 | for (uint j = 0; !found && j < ARRAY_SIZE(test_strides); j++) {
| ^~~~
| int
/Users/mlustig/Downloads/bart/src/num/convcorr.c:162:33: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
162 | for (uint j = 0; !found && j < ARRAY_SIZE(test_strides); j++) {
| ^
/Users/mlustig/Downloads/bart/src/num/convcorr.c: In function 'check_trivial_cf':
/Users/mlustig/Downloads/bart/src/num/convcorr.c:585:7: error: 'uint' undeclared (first use in this function); did you mean 'int'?
585 | if ((uint)N > md_calc_blockdim(N, odims, ostrs, size))
| ^~~~
| int
/Users/mlustig/Downloads/bart/src/num/convcorr.c:585:7: note: each undeclared identifier is reported only once for each function it appears in
/Users/mlustig/Downloads/bart/src/num/convcorr.c:585:12: error: expected ')' before 'N'
585 | if ((uint)N > md_calc_blockdim(N, odims, ostrs, size))
| ~ ^
| )
/Users/mlustig/Downloads/bart/src/num/convcorr.c:588:12: error: expected ')' before 'N'
588 | if ((uint)N > md_calc_blockdim(N, idims, istrs, size))
| ~ ^
| )
/Users/mlustig/Downloads/bart/src/num/convcorr.c:591:12: error: expected ')' before 'N'
591 | if ((uint)N > md_calc_blockdim(N, kdims, kstrs, size))
| ~ ^
| )
/Users/mlustig/Downloads/bart/src/num/convcorr.c:569:25: warning: unused parameter 'ostrs' [-Wunused-parameter]
569 | long odims[N], long ostrs[N],
| ~^~~~
/Users/mlustig/Downloads/bart/src/num/convcorr.c:570:25: warning: unused parameter 'istrs' [-Wunused-parameter]
570 | long idims[N], long istrs[N],
| ~^~~~
/Users/mlustig/Downloads/bart/src/num/convcorr.c:571:25: warning: unused parameter 'kstrs' [-Wunused-parameter]
571 | long kdims[N], long kstrs[N],
| ~^~~~
/Users/mlustig/Downloads/bart/src/num/convcorr.c:573:12: warning: unused parameter 'size' [-Wunused-parameter]
573 | size_t size)
| ~^~
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/mrirecon/bart/issues/269, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACCQC2Z4ULS7RDGOGBYEMZ3TWODYNANCNFSM475PI3QA.
From the error message, you need to replace "uint" with "unsigned int" in num/convcorr.[ch]. The commit seems unrelated.
You are right, that commit was a separate issue. I will make a PR to fix both.
Jon Tamir, PhD Assistant Professor Electrical and Computer Engineering The University of Texas at Austin
www.jtsense.comhttp://www.jtsense.com
From: Martin Uecker @.> Sent: Wednesday, July 7, 2021 10:56 To: mrirecon/bart @.> Cc: Jon Tamir @.>; Comment @.> Subject: Re: [mrirecon/bart] latest version in Repo fails to compile on OS X with clang, gcc-10 (#269)
From the error message, you need to replace "uint" with "unsigned int" in num/convcorr.[ch]. The commit seems unrelated.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/mrirecon/bart/issues/269#issuecomment-875723987, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACCQC2YV4LN3RAO43I72C3DTWR2MDANCNFSM475PI3QA.
@mlustig can you check if this is fixed on master branch?
This should be fixed according to recent tests by Jon.
/Users/mlustig/Downloads/bart/src/num/convcorr.c: In function 'detect_convcorr': /Users/mlustig/Downloads/bart/src/num/convcorr.c:162:9: error: unknown type name 'uint'; did you mean 'int'? 162 | for (uint j = 0; !found && j < ARRAY_SIZE(test_strides); j++) { | ^~~~ | int /Users/mlustig/Downloads/bart/src/num/convcorr.c:162:33: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] 162 | for (uint j = 0; !found && j < ARRAY_SIZE(test_strides); j++) { | ^ /Users/mlustig/Downloads/bart/src/num/convcorr.c: In function 'check_trivial_cf': /Users/mlustig/Downloads/bart/src/num/convcorr.c:585:7: error: 'uint' undeclared (first use in this function); did you mean 'int'? 585 | if ((uint)N > md_calc_blockdim(N, odims, ostrs, size)) | ^~~~ | int /Users/mlustig/Downloads/bart/src/num/convcorr.c:585:7: note: each undeclared identifier is reported only once for each function it appears in /Users/mlustig/Downloads/bart/src/num/convcorr.c:585:12: error: expected ')' before 'N' 585 | if ((uint)N > md_calc_blockdim(N, odims, ostrs, size)) | ~ ^ | ) /Users/mlustig/Downloads/bart/src/num/convcorr.c:588:12: error: expected ')' before 'N' 588 | if ((uint)N > md_calc_blockdim(N, idims, istrs, size)) | ~ ^ | ) /Users/mlustig/Downloads/bart/src/num/convcorr.c:591:12: error: expected ')' before 'N' 591 | if ((uint)N > md_calc_blockdim(N, kdims, kstrs, size)) | ~ ^ | ) /Users/mlustig/Downloads/bart/src/num/convcorr.c:569:25: warning: unused parameter 'ostrs' [-Wunused-parameter] 569 | long odims[N], long ostrs[N], |
~^~~~ /Users/mlustig/Downloads/bart/src/num/convcorr.c:570:25: warning: unused parameter 'istrs' [-Wunused-parameter] 570 | long idims[N], long istrs[N], |~^~~~ /Users/mlustig/Downloads/bart/src/num/convcorr.c:571:25: warning: unused parameter 'kstrs' [-Wunused-parameter] 571 | long kdims[N], long kstrs[N], |~^~~~ /Users/mlustig/Downloads/bart/src/num/convcorr.c:573:12: warning: unused parameter 'size' [-Wunused-parameter] 573 | size_t size) |~^~