html2text icon indicating copy to clipboard operation
html2text copied to clipboard

Using the "EXPLICIT" variable may result in an inconsistent build

Open manfredsc opened this issue 3 years ago • 1 comments

I don't know the intended purpose of "EXPLICIT", but if used to pass compile flags, this may give an inconsistent build, as this variable is only passed to the compile step. Some arguments need to be present in the link step as well to give a consistent state.

So I would propose the following patch:

--- html2text-2.1.1/Makefile.in.orig	2022-06-20 21:47:38.000000000 +0200
+++ html2text-2.1.1/Makefile.in	2022-08-02 12:14:58.990470532 +0200
@@ -45,7 +45,7 @@ DEFINES     = -DVERSION=$(VERSION) \
 			  $(NULL)
 
 H2TCPPFLAGS = $(CPPFLAGS) $(INCLUDES) $(DEFINES)
-H2TCXXFLAGS = $(CXXFLAGS)
+H2TCXXFLAGS = $(CXXFLAGS) $(EXPLICIT)
 H2TLIBS     = $(LIBSTDCXX_LIBS) $(SOCKET_LIBRARIES) $(ICONV_LIBRARIES) $(LIBS)
 
 .SUFFIXES: .cpp .o

manfredsc avatar Aug 02 '22 10:08 manfredsc

Proposed patch is not ideal, results in duplicated options. New try:

--- html2text-2.1.1/Makefile.in.orig	2022-06-20 21:47:38.000000000 +0200
+++ html2text-2.1.1/Makefile.in	2022-08-02 15:46:21.930340358 +0200
@@ -40,12 +40,11 @@ LDFLAGS             = @LDFLAGS@
 INCLUDES    = $(LIBSTDCXX_INCLUDES)
 DEFINES     = -DVERSION=$(VERSION) \
 			  $(BOOL_DEFINITION) \
-			  $(EXPLICIT) \
 			  $(AUTO_PTR_BROKEN) \
 			  $(NULL)
 
 H2TCPPFLAGS = $(CPPFLAGS) $(INCLUDES) $(DEFINES)
-H2TCXXFLAGS = $(CXXFLAGS)
+H2TCXXFLAGS = $(CXXFLAGS) $(EXPLICIT)
 H2TLIBS     = $(LIBSTDCXX_LIBS) $(SOCKET_LIBRARIES) $(ICONV_LIBRARIES) $(LIBS)
 
 .SUFFIXES: .cpp .o

manfredsc avatar Aug 02 '22 13:08 manfredsc

EXPLICIT is (supposed to be) set by configure, not sure what it really checks, but it seems to dummify explicit if the compiler won't grok it.

grobian avatar Sep 23 '22 18:09 grobian