8000 Fix resolution of BLAS dependency, blas-devel is broken on latest fedora by achernet · Pull Request #442 · aubio/aubio · GitHub
[go: up one dir, main page]

Skip to content

Fix resolution of BLAS dependency, blas-devel is broken on latest fedora - #442

Open
achernet wants to merge 1 commit into
aubio:masterfrom
achernet:fix_blas_dep
Open

achernet wants to merge 1 commit into
aubio:masterfrom
achernet:fix_blas_dep

Conversation

@achernet
Copy link
Copy Markdown

If you compile and test on latest Fedora enabling everything and running tests, it fails on broken linkage:

[104/252] Linking build/tests/test-peakpicker
03:20:39 runner ['/usr/lib64/ccache/gcc', 'tests/src/onset/test-peakpicker.c.17.o', '-o/home/achernetz/workspace/aubio/build/tests/test-peakpicker', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Lsrc', '-laubio', '-lm', '-lfftw3f', '-lsamplerate', '-lsndfile', '-lrubberband', '-lfftw3', '-lsamplerate', '-lavcodec', '-lavformat', '-lswresample', '-lavutil', '-lvorbisenc', '-lvorbis', '-logg', '-lFLAC', '-lblas']
/usr/bin/ld.bfd: src/libaubio.so: undefined reference to `cblas_sswap'
/usr/bin/ld.bfd: src/libaubio.so: undefined reference to `cblas_scopy'
/usr/bin/ld.bfd: src/libaubio.so: undefined reference to `cblas_sdot'
collect2: error: ld returned 1 exit status

Also, if the headers can't be found...

In file included from ../src/io/sink_sndfile.c:22:
../src/aubio_priv.h:87:2: error: #error "HAVE_BLAS was defined, but no blas header was found"
   87 | #error "HAVE_BLAS was defined, but no blas header was found"

Now when --enable-blas is specified, it will resolve one that is usable - either cblas, openblas, or flexiblas - and print which one it is on configure:

Checking for usable BLAS library         : flexiblas 

So yeah this PR should fix all that.

@dajiaohuang
Copy link
Copy Markdown

I checked the linked Ubuntu 18.04 report (#279) against this change. That report says the BLAS library path resolves through , while the installed header is (and is absent). This patch still chooses whenever contains , then requires that exact header, so it appears the reported Ubuntu configuration would continue to fail. Could the detection probe the candidate headers (, , ) using the configured include paths and select the matching aubio header define rather than infer the header from the library path?

@dajiaohuang
Copy link
Copy Markdown

Correction to my previous comment: shell quoting removed the inline-code spans and their contents, so please disregard that comment. The issue #279 report gives the BLAS library path as /usr/lib/x86_64-linux-gnu/openblas/libblas.so and the header as /usr/include/x86_64-linux-gnu/cblas.h; it says openblas/cblas.h is absent. This change still selects openblas/cblas.h when LIBPATH_BLAS contains openblas, and then requires that exact header. Thus the reported Ubuntu configuration appears likely to fail this probe too. Could detection test candidate headers (cblas.h, openblas/cblas.h, atlas/cblas.h) with the configured include paths and select the corresponding aubio header define, rather than infer the header from the library path?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0