LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Failing to build an older kernel on a newer system. (https://www.linuxquestions.org/questions/linux-general-1/failing-to-build-an-older-kernel-on-a-newer-system-4175644095/)

vysero 12-11-2018 02:11 PM

Failing to build an older kernel on a newer system.
 
kernel version: 2.6.35.14

I am able to build the kernel on one of my machines here are some specs on that machine:

Ubuntu: v14.04.5
Perl: v5.18.2
GCC: v4.8.4

When I go to build this same kernel on a machine with the following specs:

Ubuntu: v16.04.5
Perl: v5.22.1
GCC: v8.1.0

The build errors:

Code:

    make -f scripts/Makefile.build obj=fs
    make -f scripts/Makefile.build obj=ipc
      perl kernel/timeconst.pl 100 > kernel/timeconst.h
    Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at kernel/timeconst.pl line 373.
    /home/rob/sandbox/branches/CODEC-branch/Platform/kernel-2.6.35.14/kernel/Makefile:138: recipe for target 'kernel/timeconst.h' failed
    make[1]: *** [kernel/timeconst.h] Error 255
    Makefile:892: recipe for target 'kernel' failed
    make: *** [kernel] Error 2
    make: *** Waiting for unfinished jobs....
    make -f scripts/Makefile.build obj=fs/devpts
    make -f scripts/Makefile.build obj=fs/ext2

I tried downloading perlbrew and building with v5.18.2 while using GCC v4.8.4 and I got the exact same error. So if the version of gcc I am using and version of Perl I am using isn't the problem then what might be the problem?

Snipit starting @ line 373:

Code:

@val = @{$canned_values{$hz}};
        if (!defined(@val)) {
                @val = compute_values($hz);
        }
        output($hz, @val);

I would omit the defined but I dont know what its there for.

Note: bc is already installed

business_kid 12-11-2018 02:24 PM

The toolchain is: GCC; Kernel headers (installed in /usr/include); libc (Glibc).

There have been meaningful changes to kernel headers since 2.6, probably what the error 2 was about.
You're on your own with error 255 :-o.

vysero 12-11-2018 02:56 PM

Quote:

Originally Posted by business_kid (Post 5935984)
The toolchain is: GCC; Kernel headers (installed in /usr/include); libc (Glibc).

There have been meaningful changes to kernel headers since 2.6, probably what the error 2 was about.
You're on your own with error 255 :-o.

Yes, really wish Linux would cross-check their kernel updates to be sure the old versions can at least compile inside of the new ones.

jefro 12-11-2018 03:57 PM

255 is a perl file issue.

vysero 12-11-2018 04:44 PM

Quote:

Originally Posted by jefro (Post 5936021)
255 is a perl file issue.

Yeah based on what I have seen the only way to deal with it is to drop back to Ubuntu 14x. I am going to go ahead and close this thread.

business_kid 12-13-2018 06:39 AM

Quote:

Yes, really wish Linux would cross-check their kernel updates to be sure the old versions can at least compile inside of the new ones.
I don't stay abreast of kernel stuff, but there was a reorganisation of header directories and a dropping of kernel firmware that I noticed. The headers are usually fairly forgiving, although my latest set spout logspam of warnings. The kernel firmware dropped as 'defunct' stuff that WASN'T defunct but lying around.


All times are GMT -5. The time now is 06:05 AM.