BinaryBuilder.jl icon indicating copy to clipboard operation
BinaryBuilder.jl copied to clipboard

The compiler wrappers could provide some useful suggestions

Open giordano opened this issue 4 years ago • 0 comments

Idea I shared today on Slack:

what about making the compiler wrapper capture the output (probably only stderr is sufficient) of the compiler and issue some useful suggestions based on it, like

I couldn't find a header file, try
    export CPPFLAGS="-I${includedir}"

or

I couldn't find library, try
    export LDFLAGS="-L${libdir}"

@staticfloat also suggested

It would be amazingly cool if we could reliably detect messages like unable to find -lopenblas and then do a quick search in ${prefix} for the library, and if it exists suggest adding that directory to LDFLAGS. I wonder if we can add no-op flags to LDFLAGS so that we can detect whether adding it to global LDFLAGS would work at all e.g. if the build system pays attention to LDFLAGS or if you have to patch it.

giordano avatar Jun 18 '20 23:06 giordano