mrirecon / bart

BART: Toolbox for Computational Magnetic Resonance Imaging
https://mrirecon.github.io/bart/
BSD 3-Clause "New" or "Revised" License
294 stars 162 forks source link

libbox.a build error Under CentOS 7: Field 'name' not cached #249

Closed MIngPAPA closed 3 years ago

MIngPAPA commented 3 years ago

Hello, I met the compiling problems under CentOS 7. Could the bart be released with simple tar binary versions?

Environment: OS: CentOS 7 GCC: 4.8.5

Dependencies: all under /share/app/imaging/bart-0.7/

  1. Lapack 3.9.0 with cblas,lapacke,lapack++
  2. openblas-0.3.13
  3. fftw-3.3.9
  4. libpng-1.6.37

With modifying the the -I & -L flags in Makefile, I gained the outputs as follows.

Output:

/usr/bin/gcc -I/share/app/imaging/bart-0.7/include -MMD -MF src/.pics.d -iquote /share/softwarepackage/chenglan/bart-0.7/bart-0.7-src/src/ -DFFTWTHREADS -I/share/app/imaging/bart-0.7/include/ -I/share/app/imaging/bart-0.7/include -DMAIN_LIST="avg, bench, bin, bitmask, cabs, caldir, calmat, carg, casorati, cc, ccapply, cdf97, circshift, conj, conv, copy, cpyphs, creal, crop, delta, ecalib, ecaltwo, estdelay, estdims, estshift, estvar, extract, fakeksp, fft, fftmod, fftrot, fftshift, filter, flatten, flip, fmac, homodyne, index, invert, itsense, join, looklocker, lrmatrix, mandelbrot, mip, moba, nlinv, noise, normalize, nrmse, nufft, ones, pattern, phantom, pics, pocsense, poisson, poly, repmat, reshape, resize, rmfreq, rof, rss, rtnlinv, sake, saxpy, scale, sdot, show, slice, spow, sqpics, squeeze, ssa, std, svd, tgv, threshold, toimg, traj, transpose, twixread, upat, var, vec, version, walsh, wave, wavelet, wavepsf, whiten, window, wshfl, zeros, zexp, ()" -include src/main.h -O3 -ffast-math -Wmissing-prototypes -std=gnu11 -fopenmp -c -o src/pics.o src/pics.c In file included from src/num/ops.h:11:0, from src/pics.c:23: src/pics.c: In function ‘main_pics’: /share/softwarepackage/chenglan/bart-0.7/bart-0.7-src/src/misc/types.h:57:14: error: unknown type name ‘__auto_type’

define auto __auto_type

          ^

src/pics.c:645:3: note: in expansion of macro ‘auto’ auto op_tmp = operator_copy_wrapper(2, strs, op); ^ src/pics.c:645:17: warning: initialization makes integer from pointer without a cast [enabled by default] auto op_tmp = operator_copy_wrapper(2, strs, op); ^ src/pics.c:647:6: warning: assignment makes pointer from integer without a cast [enabled by default] op = op_tmp; make[1]: *** [src/pics.o] Error 1 rm src/resize.o src/mip.o src/fftmod.o src/squeeze.o src/wavelet.o src/scale.o src/transpose.o src/circshift.o src/bench.o src/crop.o src/nrmse.o src/avg.o src/fft.o src/threshold.o src/saxpy.o src/window.o src/flip.o src/reshape.o src/sdot.o src/carg.o src/conv.o src/fftrot.o src/show.o src/cpyphs.o src/version.o src/vec.o src/normalize.o src/repmat.o src/var.o src/extract.o src/index.o src/mandelbrot.o src/pattern.o src/filter.o src/cabs.o src/delta.o src/bitmask.o src/fftshift.o src/toimg.o src/fmac.o src/creal.o src/casorati.o src/rss.o src/std.o src/poly.o src/zeros.o src/flatten.o src/zexp.o src/ones.o src/invert.o src/slice.o src/cdf97.o src/noise.o src/spow.o src/conj.o src/copy.o src/join.o make[1]: lib/libbox.a(src/mip.o): Field 'name' not cached: lib/libbox.a(src/mip.o)

make[1]: lib/libbox.a(src/mip.o): Field 'hname' not cached: lib/libbox.a(src/mip.o)

make[1]: lib/libbox.a(src/extract.o): Field 'name' not cached: lib/libbox.a(src/extract.o)

make[1]: lib/libbox.a(src/extract.o): Field 'hname' not cached: lib/libbox.a(src/extract.o)

make[1]: lib/libbox.a(src/pics.o): Field 'name' not cached: lib/libbox.a(src/pics.o)

make[1]: lib/libbox.a(src/pics.o): Field 'hname' not cached: lib/libbox.a(src/pics.o)

make[1]: lib/libbox.a(src/crop.o): Field 'hname' not cached: lib/libbox.a(src/crop.o)

make[1]: lib/libbox.a(src/rss.o): Field 'name' not cached: lib/libbox.a(src/rss.o)

make[1]: lib/libbox.a(src/rss.o): Field 'hname' not cached: lib/libbox.a(src/rss.o)

make[1]: lib/libbox.a(src/vec.o): Field 'name' not cached: lib/libbox.a(src/vec.o)

make[1]: lib/libbox.a(src/vec.o): Field 'hname' not cached: lib/libbox.a(src/vec.o)

make[1]: lib/libbox.a(src/spow.o): Field 'name' not cached: lib/libbox.a(src/spow.o) ...

uecker commented 3 years ago

As documented in the README, the minimum GCC version supported should be 5.0.0 (this is also ancient and not tested for a while). There packages for CentOS 8 here, does this help?

https://copr.fedorainfracloud.org/coprs/schaten/bart/package/bart/

MIngPAPA commented 3 years ago

Hello , Uecker Thanks for your immediate reply.

Unfortunately, the CentOS 8's rpm installs failed because of the dependent packages(e.g. gcc, openblas, etc.) under our CentOS 7 system.

The official maintenance for CentOS 8 will be terminated by the end of this year, 2021. The CentOS 7 release will still be supported till 2024 Q2. So we don't want to switch to the CentOS 8 release at present.

If you can build the bart rpm package for CentOS 7, that will be really helpful!

Otherwise, could you help to locate the field name error? Or simply, will the older bart version, take 0.4.04 as an example, avoid the error?


As documented in the README, the minimum GCC version supported should be 5.0.0 (this is also ancient and not tested for a while). There packages for CentOS 8 here, does this help?

https://copr.fedorainfracloud.org/coprs/schaten/bart/package/bart/

uecker commented 3 years ago

I believe the field name message can be ignored. The compilation fails because __auto_type is supported since GCC 4.9.

We will see what we can do regarding packages..

uecker commented 3 years ago

You can download a statically compiled BART binary from this notebook: https://mybinder.org/v2/gh/mrirecon/bart-binder/static?filepath=bart.ipynb

Maybe it runs on CentOS 7.

uecker commented 3 years ago

There are packages for CentOS 7 here, please test. https://copr.fedorainfracloud.org/coprs/schaten/bart/

MIngPAPA commented 3 years ago

hello, Uecker Thanks for your CentOS 7 RPM package! That's REALLY helpful! Here is my experience. Dependency:

  1. With the help of your CentOS 7 SPEC file, we install the following rpm packages for CentOS 7 official repo. yum install lapack lapack-static lapack-devel blas blas-static blas-devel fftw fftw-devel fftw-libs fftw-static atlas atlas-level atlas-static
  2. But CentOS 7 does not officially support openblas package, I borrowed the openblas from CentOS 8 repo by rpmfind openblas openblas-devel openblas-static updated: the EPEL 7 repo includes the openblas library.

With the above redundant dependencies,we finally successfully install the bart-0.7-rpm package.

bart bench

image
lemaiw commented 1 year ago

Hello,

I'm currently running into a similar issue compiling BART 0.8.00 on RHEL7 but with GCC 12.1.0. I don't have sudo/root on the machine I'm curious if there is a work around or precompiled binaries for RHEL7 that are available for download instead of via package manager.

Thank you in advance and happy new year.