GithubHelp home page GithubHelp logo

Comments (27)

hcmh avatar hcmh commented on June 21, 2024

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.

rextlfung avatar rextlfung commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

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.

rextlfung avatar rextlfung commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

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.

rextlfung avatar rextlfung commented on June 21, 2024

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.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

I'm having the exact same issue here on my m1 mac

from bart.

hcmh avatar hcmh commented on June 21, 2024

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.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

Ok, that is not where we expect it. You could try compiling with
CC=gcc FFTW_BASE=/opt/homebrew makeand see if that fixes the problem.

And if you not, please also post the compiler command that failed

from bart.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

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-embeddedand pass CC=gccto make?

from bart.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

Nice, on Mac OS, /usr/bin/gccis 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.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

Thank you! so CC=gcc-13 or possibly CC=/opt/homebrew/bin/gcc-13 should do the trick for that error.

from bart.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

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.localand write them in there (one per line)

from bart.

jtamir avatar jtamir commented on June 21, 2024

from bart.

jtamir avatar jtamir commented on June 21, 2024

from bart.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

@hcmh @jtamir Thanks for help!

from bart.

rextlfung avatar rextlfung commented on June 21, 2024

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.

hongzeyu0319 avatar hongzeyu0319 commented on June 21, 2024

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.

hcmh avatar hcmh commented on June 21, 2024

OPENBLAS_BASE=/opt/homebrewshould be BLAS_BASE=/opt/homebrew instead. But does /opt/homebrew/include/cblas.hexist? Or where do you find cblas.h?

from bart.

rextlfung avatar rextlfung commented on June 21, 2024

Indeed there is no cblas.h but I have clblas.h, which appears to be what's available on Homebrew.

from bart.

hcmh avatar hcmh commented on June 21, 2024

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.

rextlfung avatar rextlfung commented on June 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.