lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 5 Mar 2020 22:14:28 +0100
From:   Michal Kubecek <mkubecek@...e.cz>
To:     "John W. Linville" <linville@...driver.com>
Cc:     netdev@...r.kernel.org, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH ethtool v2 00/25] initial netlink interface
 implementation for 5.6 release

On Thu, Mar 05, 2020 at 09:32:59PM +0100, Michal Kubecek wrote:
> On Thu, Mar 05, 2020 at 02:24:16PM -0500, John W. Linville wrote:
> > 
> > Just a quick check -- executing "./autogen.sh ; ./configure ; make
> > distcheck" fails with the attached log output.
> [...]
> > make[2]: Entering directory '/home/linville/git/ethtool/ethtool-5.4/_build/sub'
> > gcc -DHAVE_CONFIG_H -I. -I../..    -I./uapi -Wall  -g -O2 -MT ethtool-ethtool.o -MD -MP -MF .deps/ethtool-ethtool.Tpo -c -o ethtool-ethtool.o `test -f 'ethtool.c' || echo '../../'`ethtool.c
> 
> I can see what is going on: this runs in subdirectory and correctly adds
> "-I../.." but not "-I../../uapi". I'm afraid I'll have to dive into
> automake documentation to see how to make it adjust that path as well.
> 
> > ../../ethtool.c: In function ‘do_get_phy_tunable’:
> > ../../ethtool.c:4773:16: error: ‘ETHTOOL_PHY_EDPD’ undeclared (first use in this function); did you mean ‘ETHTOOL_PHYS_ID’?
> >  4773 |   cont.ds.id = ETHTOOL_PHY_EDPD;
> >       |                ^~~~~~~~~~~~~~~~
> >       |                ETHTOOL_PHYS_ID
> 
> This is a result of the missing include path above: instead of
> up-to-date uapi/linux/ethtool.h, older system file from /usr/include is
> used so that new additions are missing. I have many more errors like
> this and when I tried to rename /usr/include/linux/ethtool.h, the build
> failed with
> 
>   ../../internal.h:56:10: fatal error: linux/ethtool.h: No such file or directory
> 
> I'll try to find what is the right way to add an include directory,
> adding "-I./uapi" to AM_CFLAGS did the trick for regular build but
> clearly isn't sufficient for other targets.

The change below seems to fix the problem but I'll run some more tests
tomorrow to see that it does not break anything.

Michal

diff --git a/Makefile.am b/Makefile.am
index 2fd79eb8c79a..eae5a55ce933 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,5 @@
-AM_CFLAGS = -I./uapi -Wall
+AM_CFLAGS = -Wall
+AM_CPPFLAGS = -I$(top_srcdir)/uapi
 LDADD = -lm
 
 man_MANS = ethtool.8

Powered by blists - more mailing lists