fabianishere / pve-edge-kernel

Newer Linux kernels for Proxmox VE 7
370 stars 50 forks source link

Сan't build after adding the patch #369

Closed Devanse7 closed 1 year ago

Devanse7 commented 1 year ago

Good day, friends. I apologize for what might be a naive question, but I need a bit of help:

I want to build cloned kernel git clone https://github.com/fabianishere/pve-edge-kernel

I follow all the steps in the "Building manually" section, but any attempt to add something causes build issues, and I can't figure out where.

It feels like the cloned copy checks all the files before building, and if there's even the slightest change, they won't compile. Is that possible?

I add my patch to /debian/patches/pve/, as instructed on the site, add a reference to it in series.linux, run the compiler, and always get an error. The error message is quite vague. Here's its output:

<code>
LD [M] drivers/gpu/drm/amd/amdgpu/amdgpu.o
AR drivers/gpu/built-in.a
AR drivers/built-in.a
make[2]: Leaving directory '/root/pve-edge-kernel/linux'
dh_auto_build: error: cd linux && make -j36 "INSTALL=install --strip-program=true" CC=cc KCFLAGS= EXTRAVERSION=-edge LOCALVERSION= "KBUILD_BUILD_VERSION_TIMESTAMP=PVE Edge 6.0.0-1 (2022-10-03)" returned exit code 2
make[1]: *** [debian/rules:61: override_dh_auto_build] Error 25
make[1]: Leaving directory '/root/pve-edge-kernel'
make: *** [debian/rules:16: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -b failed
root@h1:~/pve-edge-kernel#
</code>

If I build the exact same thing but without any changes, then the output should be:

<code>
LD [M] drivers/gpu/drm/amd/amdgpu/amdgpu.o
AR drivers/gpu/built-in.a
AR drivers/built-in.a
GEN .version
CHK include/generated/compile.h
LD vmlinux.o
MODPOST vmlinux.symvers
MODINFO modules.builtin.modinfo
GEN modules.builtin
CC .vmlinux.export.o
</code>

As we can see, we crash with an error at the GEN .version stage. Or am I wrong?

Do I need to somehow generate the version after making changes? Any help would be appreciated. I've already spent two days trying to understand why I can't make any changes before compiling.

fabianishere commented 1 year ago

The patch probably doesn’t build cleanly.

You should check the build logs for any compilation error. Because the kernel compiles multiple files at the same time, the errors might be scattered across the output.

Devanse7 commented 1 year ago

Pls close, yes, it was my mistake