linux icon indicating copy to clipboard operation
linux copied to clipboard

Compiling with 5.10 branch not working

Open ionutnechita opened this issue 3 years ago • 7 comments

Hi Alexandre Frade,

I try to compile 5.10 branch, but i observe one issue with infiniband driver.

Error:

...
  CC [M]  drivers/infiniband/core/uverbs_std_types_counters.o
  CC [M]  drivers/infiniband/core/uverbs_uapi.o
  CC [M]  drivers/infiniband/core/uverbs_std_types_device.o
In file included from ./include/linux/bitmap.h:9:0,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/smp.h:13,
                 from ./include/linux/lockdep.h:14,
                 from ./include/linux/mutex.h:17,
                 from drivers/infiniband/core/addr.c:36:
In function 'memcpy',
    inlined from 'rdma_resolve_ip' at drivers/infiniband/core/addr.c:687:3,
    inlined from 'rdma_addr_find_l2_eth_by_grh' at drivers/infiniband/core/addr.c:835:6:
./include/linux/string.h:395:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^~~~~~~~~~~~~~~~~~
In function 'memcpy',
    inlined from 'rdma_resolve_ip' at drivers/infiniband/core/addr.c:692:2,
    inlined from 'rdma_addr_find_l2_eth_by_grh' at drivers/infiniband/core/addr.c:835:6:
./include/linux/string.h:395:4: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
    __read_overflow2();
    ^~~~~~~~~~~~~~~~~~
  CC [M]  drivers/infiniband/core/uverbs_std_types_async_fd.o
scripts/Makefile.build:279: recipe for target 'drivers/infiniband/core/addr.o' failed
make[6]: *** [drivers/infiniband/core/addr.o] Error 1
make[6]: *** Waiting for unfinished jobs....
scripts/Makefile.build:496: recipe for target 'drivers/infiniband/core' failed
make[5]: *** [drivers/infiniband/core] Error 2
scripts/Makefile.build:496: recipe for target 'drivers/infiniband' failed
make[4]: *** [drivers/infiniband] Error 2
make[4]: *** Waiting for unfinished jobs....
Makefile:1824: recipe for target 'drivers' failed
make[3]: *** [drivers] Error 2
debian/rules:7: recipe for target 'build-arch' failed
make[2]: *** [build-arch] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
scripts/Makefile.package:82: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
Makefile:1552: recipe for target 'bindeb-pkg' failed
make: *** [bindeb-pkg] Error 2

OS:

# cat /etc/os-release
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
# gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Git:

commit 6ffe69c5e55c28dcdd241b1582febc4334381a3c (HEAD -> 5.10, tag: 5.10.41-xanmod1, origin/5.10)
Author: Alexandre Frade <[email protected]>
Date:   Fri May 28 15:11:02 2021 +0000

    Linux 5.10.41-xanmod1

    Signed-off-by: Alexandre Frade <[email protected]>

commit 93f2e30efcbb84ba8f6794174f27323edecd71f2
Merge: 46db942f911c 33069919e2dc
Author: Alexandre Frade <[email protected]>
Date:   Fri May 28 14:49:53 2021 +0000

    Merge tag 'v5.10.41' into 5.10

    This is the 5.10.41 stable release

commit 33069919e2dce440d3b8cd101b18f37bb35bdddf
Author: Greg Kroah-Hartman <[email protected]>
Date:   Fri May 28 13:17:44 2021 +0200

    Linux 5.10.41

    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Fox Chen <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>


Config: config-xanmod-5.10.txt

ionutnechita avatar May 31 '21 08:05 ionutnechita

Try using this config: config.txt

xanmod avatar May 31 '21 23:05 xanmod

I tried with the configuration file sent by you, but it didn't work.

ionutnechita avatar Jun 01 '21 08:06 ionutnechita

Before compiling, did you run make clean?

xanmod avatar Jun 01 '21 21:06 xanmod

The packages needed to build the kernel are:

build-essential bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev zstd lz4

https://wiki.debian.org/BuildADebianKernelPackage

xanmod avatar Jun 01 '21 21:06 xanmod

Hi,

I try with "make clean" and "apt-get install -y build-essential bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev zstd liblz4-dev", but not working.

I try with vanilla flavor kernel from kernel.org and working correctly with this. Maybe is minor regression in Xanmod 5.10 kernel.

List debian packages installed in docker container: apt-package.txt

ionutnechita avatar Jun 02 '21 06:06 ionutnechita

XanMod is based on the latest mainline with no commit rollbacks.

You are downloading the source code from git clone or applying this patchset?

I use a debian bullseye docker based environment (chroot) with gcc-11.

xanmod avatar Jun 02 '21 14:06 xanmod

I used 5.10 branch with git clone command for downloading project (source code from git clone). I not used patchset.

ionutnechita avatar Jun 02 '21 16:06 ionutnechita