Comments (27)
Hey,
since I added that line, I might have made a mistake there. Could you just comment out that line (prefix it with #
) and try again? For debugging your issue, that should not break anything important.
Additionally, can you post the output of make --version
?
from bart.
Hi,
I commented out that line and am now running into:
clang: error: unsupported option '-fopenmp'
The output of make --version
is:
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.This program built for i386-apple-darwin11.3.0
from bart.
Oh, that is a truly ancient version of GNU make. That might be the issue.
Did you follow the instructions in the README (not README.md) for Mac OS? (see here)
That should install a supported version of both gcc or clang and of make.
from bart.
I see. I just followed these instructions in the README, which I guess doesn't update make:
Using HomeBrew (https://brew.sh):
$ brew install --cask gcc-arm-embedded $ brew install libpng $ brew install fftw $ brew install openblas Select gcc as the compiler when building: $ CC=gcc make
Instead, I used brew to install gmake, which seemed to fix the issue but now I am encountering this error:
/bart/src/bart.c:50:10: fatal error: fftw3.h: No such file or directory
50 | #include <fftw3.h>
| ^~~~~~~~~
compilation terminated.
from bart.
Hmm, strange. Then we should probably add that to the instructions.
To your new problem: I would guess that $ brew install fftw
should fix that?
from bart.
I already tried that. I believe that it has something to do with fftw being installed on my machine but not being seen by the compiler. I will try to figure that out and post the solution here.
from bart.
I'm having the exact same issue here on my m1 mac
from bart.
Ok, then we probably need to adapt where bart
looks for fftw.
Could you try: find /opt /usr -iname fftw3.h
, to see where fftw is located? (I hope that find exists on Mac OS)
from bart.
Ok, then we probably need to adapt where
bart
looks for fftw.Could you try:
find /opt /usr -iname fftw3.h
, to see where fftw is located? (I hope that find exists on Mac OS)
IIt's found here
/opt/homebrew/include/fftw3.h
/opt/homebrew/Cellar/fftw/3.3.10_1/include/fftw3.h
from bart.
Ok, that is not where we expect it. You could try compiling with
CC=gcc FFTW_BASE=/opt/homebrew make
and see if that fixes the problem.
And if you not, please also post the compiler command that failed
from bart.
I'm still having the '-fopenmp" unsupported error...
clang: error: unsupported option '-fopenmp'
make: *** [/Users/yuhongze/git/bart/src/bart.o] Error 1
from bart.
That error should not be possible when passing CC=clang
. What are the lines directly before that message? Those should show the command line that was passed to the compiler, in addition to which compiler was used.
(some like this: gcc -Wall -Wextra -g -MMD -MF src/.bart.d -iquote /home/ch/bart/src/ -I/usr//include -DFFTWTHREADS -I/usr//include/ -Og -Wmissing-prototypes -Wno-vla-parameter -Wno-nonnull -Wno-maybe-uninitialized -g -std=gnu11 -fopenmp -c -o src/bart.o src/bart.c
)
Edit: Did you do brew install --cask gcc-arm-embedded
and pass CC=gcc
to make
?
from bart.
Yes I did pass CC=gcc
to make
. I re-followed the instructions in README for mac-os but still have this error
gcc -Wall -Wextra -DUSE_MACPORTS -MMD -MF /Users/yuhongze/git/bart/src/.bart.d -iquote /Users/yuhongze/git/bart/src/ -I/opt/local//include/ -I/opt/local//include -DFFTWTHREADS -DMAIN_LIST="avg, bench, bin, bitmask, cabs, calc, caldir, calmat, carg, casorati, cc, ccapply, cdf97, circshift, conj, conv, conway, copy, cpyphs, creal, crop, delta, ecalib, ecaltwo, epg, estdelay, estdims, estshift, estvar, extract, fakeksp, fft, fftmod, fftrot, fftshift, filter, flatten, flip, fmac, fovshift, homodyne, ictv, index, invert, itsense, join, looklocker, lrmatrix, mandelbrot, measure, mip, mnist, moba, mobafit, morphop, multicfl, nlinv, nlinvnet, nlmeans, nnet, noise, normalize, nrmse, nufft, nufftbase, onehotenc, ones, pattern, phantom, pics, pocsense, poisson, pol2mask, poly, psf, reconet, repmat, reshape, resize, rmfreq, rof, roistat, rovir, rss, rtnlinv, sake, saxpy, scale, sdot, show, signal, sim, slice, spow, sqpics, squeeze, ssa, std, svd, tensorflow, tgv, threshold, toimg, traj, transpose, twixread, upat, var, vec, version, walsh, wave, wavelet, wavepsf, whiten, window, wshfl, zeros, zexp, ()" -include src/main.h -O2 -Wmissing-prototypes -Wuseless-cast -Wno-c2x-extensions -std=gnu11 -fopenmp -c -o /Users/yuhongze/git/bart/src/bart.o /Users/yuhongze/git/bart/src/bart.c
clang: error: unsupported option '-fopenmp'
make: *** [/Users/yuhongze/git/bart/src/bart.o] Error 1
from bart.
Nice, on Mac OS, /usr/bin/gcc
is actually clang. Great, thank you Apple.
So we need to find out where the gcc that you installed with brew install --cask gcc-arm-embedded
actually is.
Could you run find /usr /opt -iname gcc
and find /usr /opt -iname gcc-\*
for me?
from bart.
Sure, here is the output:
(base) yuhongze@STOP-PROCRASNATING bart % find /usr /opt -iname gcc
/usr/bin/gcc
find: /usr/sbin/authserver: Permission denied
/usr/share/file/magic/gcc
/opt/homebrew/var/homebrew/linked/gcc
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc
/opt/homebrew/Library/Homebrew/shims/super/gcc
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc
/opt/homebrew/lib/gcc
/opt/homebrew/opt/gcc
/opt/homebrew/Cellar/gcc
/opt/homebrew/Cellar/gcc/13.2.0/libexec/gcc
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/13/gcc
find: /opt/cisco/anyconnect/temp/downloader: Permission denied
(base) yuhongze@STOP-PROCRASNATING bart % find /usr /opt -iname gcc-*
find: /usr/sbin/authserver: Permission denied
/opt/homebrew/bin/gcc-13
/opt/homebrew/bin/gcc-nm-13
/opt/homebrew/bin/gcc-ar-13
/opt/homebrew/bin/gcc-ranlib-13
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-4.9
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-13
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-12
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-5
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-10
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-11
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-4.2
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-8
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-6
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-7
/opt/homebrew/Library/Homebrew/shims/mac/super/gcc-9
/opt/homebrew/Library/Homebrew/shims/super/gcc-4.9
/opt/homebrew/Library/Homebrew/shims/super/gcc-13
/opt/homebrew/Library/Homebrew/shims/super/gcc-12
/opt/homebrew/Library/Homebrew/shims/super/gcc-5
/opt/homebrew/Library/Homebrew/shims/super/gcc-10
/opt/homebrew/Library/Homebrew/shims/super/gcc-11
/opt/homebrew/Library/Homebrew/shims/super/gcc-8
/opt/homebrew/Library/Homebrew/shims/super/gcc-6
/opt/homebrew/Library/Homebrew/shims/super/gcc-7
/opt/homebrew/Library/Homebrew/shims/super/gcc-9
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-4.9
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-13
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-12
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-5
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-10
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-11
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-4.2
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-8
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-6
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-7
/opt/homebrew/Library/Homebrew/shims/linux/super/gcc-9
/opt/homebrew/Caskroom/gcc-arm-embedded
/opt/homebrew/Caskroom/gcc-arm-embedded/.metadata/13.2.rel1/20231220170548.510/Casks/gcc-arm-embedded.json
/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-13
/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-nm-13
/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-ar-13
/opt/homebrew/Cellar/gcc/13.2.0/bin/gcc-ranlib-13
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13/plugin/include/ada/gcc-interface
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13/plugin/include/gcc-plugin.h
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13/plugin/include/gcc-rich-location.h
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13/plugin/include/gcc-symtab.h
/opt/homebrew/Cellar/gcc/13.2.0/share/man/man1/gcc-13.1
/opt/homebrew/Cellar/gcc/13.2.0/share/gcc-13
/opt/homebrew/share/man/man1/gcc-13.1
/opt/homebrew/share/gcc-13
from bart.
Thank you! so CC=gcc-13
or possibly CC=/opt/homebrew/bin/gcc-13
should do the trick for that error.
from bart.
Sorry for trouble you again, I tried CC=/opt/homebrew/bin/gcc-13 make FFTW_BASE=/opt/homebrew
which solves the previous two issues, but now it's not able to find openblas, as
(base) yuhongze@STOP-PROCRASNATING bart % CC=/opt/homebrew/bin/gcc-13 make FFTW_BASE=/opt/homebrew
/opt/homebrew/bin/gcc-13 -Wall -Wextra -DUSE_MACPORTS -MMD -MF /Users/yuhongze/git/bart/src/num/.blas.d -iquote /Users/yuhongze/git/bart/src/ -I/opt/homebrew/include/ -I/opt/local//include -DFFTWTHREADS -DMAIN_LIST="avg, bench, bin, bitmask, cabs, calc, caldir, calmat, carg, casorati, cc, ccapply, cdf97, circshift, conj, conv, conway, copy, cpyphs, creal, crop, delta, ecalib, ecaltwo, epg, estdelay, estdims, estshift, estvar, extract, fakeksp, fft, fftmod, fftrot, fftshift, filter, flatten, flip, fmac, fovshift, homodyne, ictv, index, invert, itsense, join, looklocker, lrmatrix, mandelbrot, measure, mip, mnist, moba, mobafit, morphop, multicfl, nlinv, nlinvnet, nlmeans, nnet, noise, normalize, nrmse, nufft, nufftbase, onehotenc, ones, pattern, phantom, pics, pocsense, poisson, pol2mask, poly, psf, reconet, repmat, reshape, resize, rmfreq, rof, roistat, rovir, rss, rtnlinv, sake, saxpy, scale, sdot, show, signal, sim, slice, spow, sqpics, squeeze, ssa, std, svd, tensorflow, tgv, threshold, toimg, traj, transpose, twixread, upat, var, vec, version, walsh, wave, wavelet, wavepsf, whiten, window, wshfl, zeros, zexp, ()" -include src/main.h -O2 -Wmissing-prototypes -Wno-vla-parameter -Wno-nonnull -Wno-maybe-uninitialized -std=gnu11 -fopenmp -c -o /Users/yuhongze/git/bart/src/num/blas.o /Users/yuhongze/git/bart/src/num/blas.c
/Users/yuhongze/git/bart/src/num/blas.c:19:10: fatal error: cblas_openblas.h: No such file or directory
19 | #include <cblas_openblas.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/Users/yuhongze/git/bart/src/num/blas.o] Error 1
I tried to follow the instructions on how to find fftw3.h to find it like find /opt /usr -iname cblas_openblas.h
, which returns nothing.
While I'm able to find openblas:
(base) yuhongze@STOP-PROCRASNATING bart % find /opt /usr -iname openblas
/opt/homebrew/opt/openblas
/opt/homebrew/Cellar/openblas
/opt/homebrew/Cellar/openblas/0.3.26/lib/cmake/openblas>
from bart.
Oh, that is because it defaults to MACPORTS=1. Maybe pass MACPORTS=0
as well.
By the way, instead of passing all of those arguments by hand, you can also create a file called Makefile.local
and write them in there (one per line)
from bart.
from bart.
from bart.
@hcmh @jtamir Thanks for help!
from bart.
Thanks for all your help!
@hongzeyu0319 did you manage to fix the error with the blas header files not being found?
I'm currently running gmake with the following flags:
CC=/opt/homebrew/bin/gcc-13
MACPORTS=0
FFTW_BASE=/opt/homebrew
OPENBLAS_BASE=/opt/homebrew
but it gives me the following error:
fatal error: cblas.h: No such file or directory
from bart.
Thanks for all your help! @hongzeyu0319 did you manage to fix the error with the blas header files not being found?
I'm currently running gmake with the following flags:
CC=/opt/homebrew/bin/gcc-13 MACPORTS=0 FFTW_BASE=/opt/homebrew OPENBLAS_BASE=/opt/homebrew
but it gives me the following error:
fatal error: cblas.h: No such file or directory
I'm still seeing this issue too, I haven't tried to look intio it after that
from bart.
OPENBLAS_BASE=/opt/homebrew
should be BLAS_BASE=/opt/homebrew
instead. But does /opt/homebrew/include/cblas.h
exist? Or where do you find cblas.h
?
from bart.
Indeed there is no cblas.h
but I have clblas.h
, which appears to be what's available on Homebrew.
from bart.
clblas.h is not what we need.
brew install openblas
Should install what we need, but I have no idea where homebrew installs those things..
from bart.
I see. I have openblas installed but there is appears to be no cblas.h under /opt/homebrew/include/
There appears to be a cblas.h under /opt/homebrew/Cellar/openblas/0.3.26/include/ though
from bart.
Related Issues (20)
- library build errors with RHEL7: Field 'name' not cached HOT 3
- unreachable code
- identical code
- Issues with making bart v 0.8.00 HOT 5
- assignment twice
- return statement boolean
- declaration different vs definition HOT 1
- How to install packages without sudo access HOT 1
- slow ecalib HOT 5
- identical condition HOT 2
- CFL file error HOT 1
- Compile fail on Mac OS X with gcc12 - conflicting types for 'FILE'
- uint error again
- Nufft with DFT option not running on GPU
- Newer GPUs needs additional nvcc arguments HOT 7
- Seek help HOT 1
- make error: fatal error: lapacke.h: HOT 3
- Questions: In SCC coil compression, why eigen decomposition of covariance instead of SVD ? HOT 1
- Style identical include HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bart.