glimpse icon indicating copy to clipboard operation
glimpse copied to clipboard

dynfilters/Makefile: make target does not honor previously configured LDFLAGS

Open rotocki opened this issue 3 years ago • 0 comments

Found in version:

$ glimpse -V
This is glimpse version 4.18.7, 2015.

How to reproduce the issue?

  1. Run an environment where libfl is not installed in the system.
  2. Have libfl installed locally under path defined as $DEVLIBPATH/lib.
  3. Execute: ./configure --prefix=$DEVLIBPATH LDFLAGS='-L$DEVLIBPATH/lib'
  4. Check contents of dynfilters/Makefile file where LDFLAGS is defined as LDFLAGS=

Workaround: There are two ways to proceed with compilation.

First approach depends on your compiler. If you use GCC, you can insert $DEVLIBPATH/lib into LIBRARY_PATH variable. This will guide the compiler to search that path for libfl (-lfl) instead of failing. LIBRARY_PATH is different than LD_LIBRARY_PATH so pay attention.

Second approach relies on dirty replacement of LDFLAGS to match what was passed during ./configure ... step. After performing step 3, run sed to replace LDFLAGS with the expected value: sed 's!^LDFLAGS=$!LDFLAGS='-L$DEVLIBPATH/lib'!' dynfilters/Makefile

After applying this workaround, you should be able to proceed with make && make check && make install

rotocki avatar Apr 19 '21 12:04 rotocki