Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.25k stars 157 forks source link

No rule to make target kernel_key.pem - Gentoo #960

Closed amarakon closed 1 week ago

amarakon commented 1 week ago

I get the following error when trying to compile:

make[1]: *** [/home/amar/.local/src/Frogging-Family/linux-tkg/linux-src-git/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
 -> exit cleanup done

This is the same error as the one in Issue #959. However, I'm compiling with GCC without LTO. Here's my config:

_distro="Gentoo"
_version=""
_EXT_CONFIG_PATH=~/.config/frogminer/linux-tkg.cfg
_NUKR="true"
_git_mirror="kernel.org"
_kernel_work_folder=""
_kernel_source_folder=""
CUSTOM_GCC_PATH=""
CUSTOM_LLVM_PATH=""
_force_all_threads="true"
_noccache="true"
_kernel_on_diet="false"
_modprobeddb="false"
_modprobeddb_db_path=~/.config/modprobed.db
_menunconfig=""
_diffconfig=""
_diffconfig_name=""
_dracut_options="--lz4"
_configfile="running-kernel"
_config_updating="olddefconfig"
_debugdisable="false"
_STRIP="true"
_cpusched="bore"
_compiler="gcc"
_libunwind_replace=""
_llvm_ias="1"
_lto_mode="no"
_preempt_rt=""
_preempt_rt_force=""
_sched_yield_type=""
_rr_interval="default"
_ftracedisable="true"
_numadisable="false"
_misc_adds="true"
_tickless="1"
_acs_override=""
_bcachefs="false"
_ntsync="true"
_waydroid=""
_glitched_base="true"
_zenify="true"
_compileroptlevel="2"
_processor_opt="skylake"
_cacule_rdb="false"
_cacule_rdb_interval="19"
_tt_high_hz="false"
_smt_nice=""
_eevdf_sched_ext_support="true"
_random_trust_cpu="true"
_timer_freq="1000"
_default_cpu_gov=""
_aggressive_ondemand="true"
_tcp_cong_alg="yeah"
_custom_commandline="intel_pstate=passive kernel.split_lock_mitigate=0"
_clear_patches="true"
_openrgb="true"
_custom_pkgbase=""
_kernel_localversion=""
_NR_CPUS_value="$(nproc)"
_install_after_building="yes"
_logging_use_script="yes"
_fsync_backport="true"
_fsync_legacy="true"
_fsync_futex2="false"
_zfsfix="true"
_runqueue_sharing=""
_irq_threading="false"
_mglru="true"
_community_patches=""
_user_patches="true"
_user_patches_no_confirm="false"
_config_fragments="true"
_config_fragments_no_confirm="false"

Here is my system-info.txt log:

NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.15"
#################
clang version 18.1.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
System configuration file directory: /etc/clang
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/14
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found HIP installation: /usr/local, version 5.7.31921
 "/usr/bin/x86_64-pc-linux-gnu-ld.bfd" --hash-style=gnu --eh-frame-hdr -m elf_x86_64 -pie -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o a.out /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/14/crtbeginS.o -L/usr/lib/gcc/x86_64-pc-linux-gnu/14 -L/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../x86_64-pc-linux-gnu/lib -L/lib -L/usr/lib -z relro -z now -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/14/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64/crtn.o
/usr/bin/x86_64-pc-linux-gnu-ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/14/../../../../lib64/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The last line is an error from clang, even though i set _compiler="gcc".

AdelKS commented 1 week ago

Can you drag and drop logs/shell-output.txt ? The error is probably something else

amarakon commented 1 week ago

Here it is: shell-output.log.txt

AdelKS commented 1 week ago

Here's your error

make[3]: *** No rule to make target '/var/tmp/portage/sys-kernel/gentoo-kernel-6.7.4/temp/kernel_key.pem', needed by 'certs/signing_key.x509'.  Stop.
make[3]: *** Waiting for unfinished jobs....
  HOSTCC  certs/extract-cert
make[2]: *** [scripts/Makefile.build:485: certs] Error 2
make[2]: *** Waiting for unfinished jobs....

Try with _configfile="running-kernel" in your customization.cfg file, that may solve this particular issue.

amarakon commented 1 week ago

I already have _configfile="running-kernel" in my config. Although it's in ~/.config/frogminer/linux-tkg.cfg. Does it need to be in customization.cfg?

amarakon commented 1 week ago

I just figured out what was causing the issue: my running kernel did not have a configuration file for some reason. Switching to a different kernel with a config file and recompiling solved it.