Skip to content

TOPDIR env causes LD to not find required files #10

@n33ll

Description

@n33ll

I faced this issue while making a custom embedded OS with the help of Buildroot, due to Buildroot setting a TOPDIR env for the build process. Verified this issue by locally building gun-efi (master) using "TOPDIR=~/topdir make" command. When executed, the build rocess fails with the following error :

ld -nostdlib --warn-common --no-undefined --fatal-warnings --build-id=sha1 -z nocombreloc -shared -Bsymbolic -L/home/neel/gnu-efi//apps/../x86_64/lib -L/home/neel/gnu-efi//apps/../x86_64/gnuefi /home/neel/gnu-efi//apps/../x86_64/gnuefi/crt0-efi-x86_64.o t.o -o t.so -lefi -lgnuefi /usr/lib/gcc/x86_64-linux-gnu/11/libgcc.a -T /home/neel/gnu-efi//apps/../gnuefi/elf_x86_64_efi.lds
ld: cannot find /home/neel/gnu-efi//apps/../x86_64/gnuefi/crt0-efi-x86_64.o: No such file or directory
ld: cannot find -lefi: No such file or directory
ld: cannot find -lgnuefi: No such file or directory
make[1]: * [/home/neel/gnu-efi//apps/../Make.rules:51: t.so] Error 1
make[1]: Leaving directory '/home/neel/testtesttest/x86_64/apps'
make: * [Makefile:82: apps] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions