compiler.link_executable doesn't find headers in /usr/local/include
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
An attempt to find fftw3.h in /usr/local/include on FreeBSD here https://github.com/pavlin-policar/fastTSNE/blob/master/setup.py#L51 fails because compiler.link_executable doesn't use CFLAGS.
This link suggests that CFLAGS environment variable should be sufficient: https://stackoverflow.com/questions/6928110/how-may-i-override-the-compiler-gcc-flags-that-setup-py-uses-by-default
Environment does contain CFLAGS:
XDG_DATA_HOME=/usr/ports/biology/py-fastTSNE/work-py36 XDG_CONFIG_HOME=/usr/ports/biology/py-fastTSNE/work-py36 HOME=/usr/ports/biology/py-fastTSNE/work-py36 PATH=/usr/ports/biology/py-fastTSNE/work-py36/.bin:/home/yuri/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing " CPP="cpp" CPPFLAGS="-fno-omit-frame-pointer -isystem /usr/local/include" LDFLAGS=" -fstack-protector -L/usr/local/lib " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fno-omit-frame-pointer -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-omit-frame-pointer -isystem /usr/local/include " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444"
Yet:
===> Building for py36-fastTSNE-0.2.13
./tmpyibjm545/fftw3..c:1:10: fatal error: 'fftw3.h' file not found
#include <fftw3.h>
^~~~~~~~~
Reference issue: https://github.com/pavlin-policar/fastTSNE/issues/43
FreeBSD 11.2, port infrastructure.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at compiler.link_executable and inspect how the shown CFLAGS and CPPFLAGS reach header compilation. Reproduce the fftw3.h failure with the referenced fastTSNE setup.py on FreeBSD. Done means the compiler can find headers in /usr/local/include using the environment flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100