On Fri, Jan 15, 2021 at 4:33 PM Jeffrey Walton <noloa...@gmail.com> wrote:
>
> Hi Everyone,
>
> I'm testing on Ubuntu 18.05 x86_64 fully patched. It looks like the
> man2html recipe is not using LDFLAGS:
>
> /usr/bin/cc  -DHAVE_CONFIG_H -DSHELL
> -I/home/jwalton/Build-Scripts/bash-5.1 -I..
> -I/home/jwalton/ok2delete-asan/include -DNDEBUG -DTEST_ASAN=1 -g2 -O2
> -fsanitize=address -fno-omit-frame-pointer -march=native -fPIC
> -pthread man2html.o -o man2html -ldl -ltinfow -ldl -lpthread
> /usr/bin/ld: cannot find -ltinfow
> collect2: error: ld returned 1 exit status
> Makefile:80: recipe for target 'man2html' failed
> make[1]: *** [man2html] Error 1
> make[1]: Leaving directory '/home/jwalton/Build-Scripts/bash-5.1/support'
> Makefile:753: recipe for target 'support/man2html' failed
> make: *** [support/man2html] Error 1
> make: *** Waiting for unfinished jobs....
>
> LDFLAGS has the path to -ltinfow.

This patch cleared the issue.

# Written and placed in public domain by Jeffrey Walton.
--- support/Makefile.in
+++ support/Makefile.in
@@ -48,6 +48,8 @@
 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
 CPPFLAGS = @CPPFLAGS@
 CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = ${LDFLAGS}
 LOCAL_CFLAGS = @LOCAL_CFLAGS@
 DEFS = @DEFS@
 LOCAL_DEFS = @LOCAL_DEFS@
@@ -77,7 +79,7 @@
 all: man2html$(EXEEXT)

 man2html$(EXEEXT): $(OBJ1)
-    $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD}
+    $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@
${LDFLAGS_FOR_BUILD}  ${LIBS_FOR_BUILD}

 clean:
     $(RM) man2html$(EXEEXT) $(OBJ1)

Jeff

Reply via email to