linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include)
@ 2021-09-12 21:32 Adam Borowski
  2021-09-12 21:32 ` [PATCH 2/3] scsi: aic7xxx: explain a mysterious build failure message Adam Borowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Adam Borowski @ 2021-09-12 21:32 UTC (permalink / raw)
  To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen, linux-scsi
  Cc: Adam Borowski

This is an userland helper tool to generate data rather than something
compiled into the kernel, thus it wants regular POSIX functions.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
index 975fcfcc0d8f..2cd87ea86dfc 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
@@ -45,6 +45,7 @@
 #include <sys/types.h>
 
 #include "aicdb.h"
+#include <ctype.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <regex.h>
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] scsi: aic7xxx: explain a mysterious build failure message
  2021-09-12 21:32 [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) Adam Borowski
@ 2021-09-12 21:32 ` Adam Borowski
  2021-09-12 21:32 ` [PATCH 3/3] scsi: aic7xxx: post-edit includes in generated code Adam Borowski
  2021-09-12 22:09 ` [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) James Bottomley
  2 siblings, 0 replies; 5+ messages in thread
From: Adam Borowski @ 2021-09-12 21:32 UTC (permalink / raw)
  To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen, linux-scsi
  Cc: Adam Borowski

"*** Install db development libraries" doesn't ring a bell that it's talking
about libdb (Berkeley DB).  Because of BDB's relicensing to Affero,
incompatible with many users including Linux, most if not all distributions
can be expected to keep version 5.3 for the foreseable future, thus we can
point the user directly to libdb5.3-dev as the package to install.

(This patch was written in 2017 -- since then, distributions are getting
serious about dropping BDB).

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 drivers/scsi/aic7xxx/aicasm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile
index 243adb0a38d1..635a2d52dc37 100644
--- a/drivers/scsi/aic7xxx/aicasm/Makefile
+++ b/drivers/scsi/aic7xxx/aicasm/Makefile
@@ -55,7 +55,7 @@ $(OUTDIR)/aicdb.h:
 	 elif [ -e "/usr/include/db_185.h" ]; then		\
 		echo "#include <db_185.h>" > $@;		\
 	 else							\
-		echo "*** Install db development libraries";	\
+		echo "*** Install BerkeleyDB development libraries (usually libdb5.3-dev)";\
 	 fi
 
 clean:
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] scsi: aic7xxx: post-edit includes in generated code
  2021-09-12 21:32 [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) Adam Borowski
  2021-09-12 21:32 ` [PATCH 2/3] scsi: aic7xxx: explain a mysterious build failure message Adam Borowski
@ 2021-09-12 21:32 ` Adam Borowski
  2021-09-12 22:09 ` [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) James Bottomley
  2 siblings, 0 replies; 5+ messages in thread
From: Adam Borowski @ 2021-09-12 21:32 UTC (permalink / raw)
  To: Hannes Reinecke, James E.J. Bottomley, Martin K. Petersen, linux-scsi
  Cc: Adam Borowski

We rename the files in the very line prior...

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
 drivers/scsi/aic7xxx/aicasm/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile
index 635a2d52dc37..8f354c9b0c9d 100644
--- a/drivers/scsi/aic7xxx/aicasm/Makefile
+++ b/drivers/scsi/aic7xxx/aicasm/Makefile
@@ -69,6 +69,7 @@ $(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
 	$(YACC) $(YFLAGS) -b $(<:.y=) $<
 	mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
 	mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
+	sed -i 's/\.tab\././' $(OUTDIR)/$(<:.y=.c)
 
 # Create a dependency chain in generated files
 # to avoid concurrent invocations of the single
@@ -78,6 +79,7 @@ $(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
 	$(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
 	mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
 	mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
+	sed -i 's/\.tab\././' $(OUTDIR)/$(<:.y=.c)
 
 $(OUTDIR)/aicasm_scan.c: aicasm_scan.l
 	$(LEX) $(LFLAGS) -o $@ $<
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include)
  2021-09-12 21:32 [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) Adam Borowski
  2021-09-12 21:32 ` [PATCH 2/3] scsi: aic7xxx: explain a mysterious build failure message Adam Borowski
  2021-09-12 21:32 ` [PATCH 3/3] scsi: aic7xxx: post-edit includes in generated code Adam Borowski
@ 2021-09-12 22:09 ` James Bottomley
  2021-09-27 20:59   ` Adam Borowski
  2 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2021-09-12 22:09 UTC (permalink / raw)
  To: Adam Borowski, Hannes Reinecke, Martin K. Petersen, linux-scsi

On Sun, 2021-09-12 at 23:32 +0200, Adam Borowski wrote:
> This is an userland helper tool to generate data rather than
> something compiled into the kernel, thus it wants regular POSIX
> functions.
> 
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
> ---
>  drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> index 975fcfcc0d8f..2cd87ea86dfc 100644
> --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> @@ -45,6 +45,7 @@
>  #include <sys/types.h>
>  
>  #include "aicdb.h"
> +#include <ctype.h>

I'm really dubious about trying to get aicasm to compile with -Werror
... the driver is dying and we have prebuilt firmware headers in the
tree so it's not like it's required.

I'm also curious: if you compiled with -Werror how did you get around
the missing function declarations induced by the -p mm in the bison
command line?

James



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include)
  2021-09-12 22:09 ` [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) James Bottomley
@ 2021-09-27 20:59   ` Adam Borowski
  0 siblings, 0 replies; 5+ messages in thread
From: Adam Borowski @ 2021-09-27 20:59 UTC (permalink / raw)
  To: James Bottomley; +Cc: Hannes Reinecke, Martin K. Petersen, linux-scsi

On Sun, Sep 12, 2021 at 03:09:58PM -0700, James Bottomley wrote:
> On Sun, 2021-09-12 at 23:32 +0200, Adam Borowski wrote:
> > This is an userland helper tool to generate data rather than
> > something compiled into the kernel, thus it wants regular POSIX
> > functions.

> > --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> > +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
> > @@ -45,6 +45,7 @@
> >  #include <sys/types.h>
> >  
> >  #include "aicdb.h"
> > +#include <ctype.h>
> 
> I'm really dubious about trying to get aicasm to compile with -Werror
> ... the driver is dying and we have prebuilt firmware headers in the
> tree so it's not like it's required.

To be honest, I don't care much about this driver, but when it fails here,
it stops build tests.

> I'm also curious: if you compiled with -Werror how did you get around
> the missing function declarations induced by the -p mm in the bison
> command line?

The Makefile passes -Werror from external flags to some but not other
invocations of the compiler; those spew warnings but don't cause the build
to fail.

Obviously, if we wanted to polish the driver it'd be nice to fix those
warnings, but as I mentioned above that's currently not my itch to scratch.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ According to recent spams, "all my email accounts are owned
⢿⡄⠘⠷⠚⠋⠀ by a hacker".  So what's the problem?
⠈⠳⣄⠀⠀⠀⠀

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-27 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 21:32 [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) Adam Borowski
2021-09-12 21:32 ` [PATCH 2/3] scsi: aic7xxx: explain a mysterious build failure message Adam Borowski
2021-09-12 21:32 ` [PATCH 3/3] scsi: aic7xxx: post-edit includes in generated code Adam Borowski
2021-09-12 22:09 ` [PATCH 1/3] scsi: aic7xxx: fix building with -Werror (missing include) James Bottomley
2021-09-27 20:59   ` Adam Borowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).