GithubHelp home page GithubHelp logo

Comments (5)

uecker avatar uecker commented on May 29, 2024

Hi Hans,

the error I get is this (I assume it is the same issue as reported last time, but I am not sure):

CMake Error at CMakeLists.txt:105 (message):
No valid linear algebra libraries found!

Referring to the discussion in the pull request: I am not exactly sure by what you mean by
the "build structure dictated by the Makefile makes it complicated". Could you be more specific? Maybe we can improve things?

Some of the complications come from renaming the main functions which we have to
do somehow if we want to create individual tools and the 'bart' tool from the same
sources. How you could do this with cmake in a simpler way and how does
the existing build system prevent you from doing this? Maybe there is a simple
solution. As mentioned before, we could also drop this functionality from the
cmake build system if there is no simple way to do this with cmake.

Martin

from bart.

jtamir avatar jtamir commented on May 29, 2024

I was able to build with Cmake on a Mac, but I get an error with mat2cfl.c on Ubuntu. I removed mat2cfl from the CMakeLists.txt and then was able to compile. Here are the commands I used to build:

export FC=/usr/bin/gfortran
CC=gcc CXX=g++ cmake -DCMAKE_Fortran_COMPILER:FILEPATH=${FC} -DLINALG_VENDOR=LAPACKE -DLAPACKE_DIR=/usr/lib/ ..
make

The error before removing mat2cfl.c was the following:

/usr/bin/ld: libbartsupport.a(vecops.c.o): undefined reference to symbol 'sincosf@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [mat2cfl] Error 1
make[1]: *** [CMakeFiles/mat2cfl.dir/all] Error 2
make: *** [all] Error 2

from bart.

hjmjohnson avatar hjmjohnson commented on May 29, 2024

10:29 $ CC=$(which gcc)
~/src/bart [ProvideErrorMessageForLapack L|]
10:29 $ $CC --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

NOTE: the compiler is really clang, not gcc. Sometimes you need to explicitly link libgfortran to make this work.

I've added some documentation in pull request #61. It does not fix the problem, but it does provide better documentation.

I've had better luck (i.e. easier configuration) with OpenBLAS on mac. LAPACK has been tricky to get linkage correct across compilers. I've had success with LAPACK when the gfortran & gcc come from the same compiler collection.

Hans

from bart.

jtamir avatar jtamir commented on May 29, 2024

I should clarify: I only had difficulty building on Ubuntu due to the mat2cfl program, which probably has more to do with where Matlab is intalled

For Mac I did not have trouble building using OpenBLAS and gcc. Also, my gcc is symlinked to gcc, and not to clang. Cmake output below:

export FC=$(which gfortran)
CC=gcc CXX=g++ cmake -DCMAKE_Fortran_COMPILER:FILEPATH=${FC} -DLINALG_VENDOR=OpenBLAS  ..
-- The C compiler identification is GNU 4.7.4
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /opt/local/bin/gcc
-- Check for working C compiler: /opt/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Setting build type to 'Release' as none was specified.
-- Found OpenBLAS: /opt/local/include
-- OpenBLAS_FOUND                  :TRUE:  - set to true if the library is found
-- OpenBLAS_INCLUDE_DIRS           :/opt/local/include: - list of required include directories
-- OpenBLAS_LIBRARIES              :/opt/local/lib/libopenblas.dylib;m: - list of libraries to be linked
-- OpenBLAS_HAS_PARALLEL_LIBRARIES :FALSE: - determine if there are parallel libraries compiled
-- OpenBLAS_PARALLEL_LIBRARIES     :: - list of libraries for parallel implementations
-- OpenBLAS_VERSION_MAJOR          :0: - major version number
-- OpenBLAS_VERSION_MINOR          :0: - minor version number
-- OpenBLAS_VERSION_PATCH          :0: - patch version number
-- OpenBLAS_VERSION_STRING         :: - version number as a string
-- FFTWF_LIBRARIES: /opt/local/lib/libfftw3f.dylib;/opt/local/lib/libfftw3f_threads.dylib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5")
-- Found PNG: /opt/local/lib/libpng.dylib (found version "1.6.23")
-- BART VERSION: v0.3.01-208-g61d5f51:  0 3 01
-- MATLAB LIBRARIES FOUND: /Applications/MATLAB_R2016a.app/bin/maci64
-- Configuring done
-- Generating done

from bart.

hjmjohnson avatar hjmjohnson commented on May 29, 2024

Fixed in #63. Sorry this was an oversight.

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.