limine-bootloader / limine

Modern, advanced, portable, multiprotocol bootloader and boot manager.
https://limine-bootloader.org
BSD 2-Clause "Simplified" License
1.8k stars 139 forks source link

I have this error with the last release using gnu as toolchain #318

Closed Visone-Selektah closed 10 months ago

Visone-Selektah commented 10 months ago

log

+ ./configure '--prefix=/usr' --enable-uefi-x86-64 'TOOLCHAIN_FOR_TARGET=gnu'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for a race-free mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for gawk... gawk
checking for find... yes
checking for x86_64-pc-linux-gnu-strip... no
checking for strip... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdint.h... (cached) yes
checking for stddef.h... yes
checking for stdbool.h... yes
checking for limits.h... yes
checking for inttypes.h... (cached) yes
checking for stdio.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for x86_64-elf-gcc (x86_64)... no
checking for x86_64-pc-linux-gnu-gcc (x86_64)... yes
checking for x86_64-pc-linux-gnu-ld (x86_64)... no
checking for gcc (x86_64)... yes
checking for ld (x86_64)... yes
checking for objcopy (x86_64)... yes
checking for objdump (x86_64)... yes
checking for nasm... yes
configure: creating ./config.status
config.status: creating man/man1/limine.1
config.status: creating GNUmakefile
config.status: creating config.h
+ make
mkdir -p '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/bin'
cp '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/host/Makefile' '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/host/.gitignore' '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/bin/'
make all1
make[1]: Entering directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0'
make common-uefi-x86-64
make[2]: Entering directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0'
make -C '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/common' all \
    TOOLCHAIN_FILE='/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/toolchain-files/uefi-x86_64-toolchain.mk' \
    TARGET=uefi-x86-64 \
    BUILDDIR='/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/common-uefi-x86-64'
make[3]: Entering directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/common'
/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/toolchain-files/uefi-x86_64-toolchain.mk:1: *** target pattern contains no '%'.  Stop.
make[3]: Leaving directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/common'
make[2]: *** [GNUmakefile:333: common-uefi-x86-64] Error 2
make[2]: Leaving directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0'
make[1]: *** [GNUmakefile:243: limine-uefi-x86-64] Error 2
make[1]: Leaving directory '/var/cache/scratchpkg/work/limine/src/limine-5.20231114.0'
make: *** [GNUmakefile:108: all] Error 2
mintsuki commented 10 months ago

Hello, I can't reproduce this issue, sorry.

Have you tried downloading a fresh, clean tarball and trying the build there? Additionally, before trying that, what are the contents of /var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/toolchain-files/uefi-x86_64-toolchain.mk when the error appears?

Visone-Selektah commented 10 months ago

Hi!

Yes, I tried a couple times, each time with a new tarball, but always the same error. This is the content of that file uefi-x86_64-toolchain.mk

W: /var/cache/scratchpkg/work/limine/src/limine-5.20231114.0/freestanding-toolchain[141]: break: can't break
define DEFAULT_VAR =
    ifeq ($(origin $1),default)
        override $(1) := $(2)
    endif
    ifeq ($(origin $1),undefined)
        override $(1) := $(2)
    endif
endef

$(eval $(call DEFAULT_VAR,ADDR2LINE_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,AR_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,CC_FOR_TARGET,gcc))
$(eval $(call DEFAULT_VAR,CXX_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,CXXFILT_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,LD_FOR_TARGET,ld))
$(eval $(call DEFAULT_VAR,NM_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,OBJCOPY_FOR_TARGET,objcopy))
$(eval $(call DEFAULT_VAR,OBJDUMP_FOR_TARGET,objdump))
$(eval $(call DEFAULT_VAR,RANLIB_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,READELF_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,SIZE_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,STRINGS_FOR_TARGET,))
$(eval $(call DEFAULT_VAR,STRIP_FOR_TARGET,))

$(eval $(call DEFAULT_VAR,CC_FOR_TARGET_IS_CLANG,no))
$(eval $(call DEFAULT_VAR,LD_FOR_TARGET_HAS_NO_PIE,yes))

And this is the function that can't break in file freestanding-toolchain

if [ "x$FREESTANDING_TOOLCHAIN" = "xgnu" ]; then
    unset FREESTANDING_TOOLCHAIN
    break
fi

It's just check the toolchain

Visone-Selektah commented 10 months ago

I just build it with llvm as toolchain and it works, so I guess this just happens with gcc

mintsuki commented 10 months ago

Alright, thanks for sharing the info! I assume removing that break from the freestanding-toolchain file and then doing a make distclean and reconfiguring will make it work, right? If so, I'll go ahead and close this issue, let me know if it still doesn't work by reopening it. I will remove the bogus break from upstream freestanding-toolchain.

Visone-Selektah commented 10 months ago

Hi! I remove that break and it worked! Thanks!!