Discussion:
Error attempting to link during buildworld
(too old to reply)
Pete Wright
2017-12-01 19:43:06 UTC
Permalink
Hi All,

I am running into this error when attempting to buildworld from a
checkout I made recently (git hash 76ca06b62f3bfb21f1f2e1295eb89e3c235bdda7)

--- all_subdir_stand ---
/usr/home/pete/git/freebsd/stand/i386/libi386/libi386.a(bootinfo64.o):
In function `bi_checkcpu':
/usr/home/pete/git/freebsd/stand/i386/libi386/bootinfo64.c:149:
undefined reference to `read_eflags'
/usr/home/pete/git/freebsd/stand/i386/libi386/bootinfo64.c:150:
undefined reference to `write_eflags'
/usr/home/pete/git/freebsd/stand/i386/libi386/bootinfo64.c:151:
undefined reference to `read_eflags'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [loader.sym] Error code 1


Has anyone else seen this?  I'm not sure if I have some stale files that
need to be purged, or if this is a bug due to me using ccache.  I'm
asking here tho as I'd love to preserve my ccache and save some cycles
rebuilding LLVM :)


Cheers,

-pete
--
Pete Wright
***@nomadlogic.org
@nomadlogicLA
Warner Losh
2017-12-02 20:30:27 UTC
Permalink
Post by Pete Wright
Hi All,
I am running into this error when attempting to buildworld from a
checkout I made recently (git hash 76ca06b62f3bfb21f1f2e1295eb89e
3c235bdda7)
--- all_subdir_stand ---
undefined reference to `read_eflags'
undefined reference to `write_eflags'
undefined reference to `read_eflags'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [loader.sym] Error code 1
Has anyone else seen this? I'm not sure if I have some stale files that
need to be purged, or if this is a bug due to me using ccache. I'm asking
here tho as I'd love to preserve my ccache and save some cycles rebuilding
LLVM :)
just following up on this thread - i assume others have been able to
buildworld on amd64, and have not been getting this linker error? i have a
fresh checkout from this morning, tested with and without ccache and am
$ uname -ar
me/pwright/git/freebsd/amd64.amd64/sys/GENERIC-EVDEV amd64
any tips on helping debug this as well would be appreciated - as i'm not
%100 sure where to start (i.e. how to invoke the linker with the "-v" flag
for buildworld :)
With today's tree, I can both build the loader by hand and as part of
buildworld. I'm keen on fixing this, but I've no clue why it's failing for
you.

Have any weird optimizer settings? Do you get any reports of functions not
declared?

Warner
Pete Wright
2017-12-03 01:45:17 UTC
Permalink
Post by Warner Losh
Post by Pete Wright
Hi All,
I am running into this error when attempting to buildworld from a
checkout I made recently (git hash 76ca06b62f3bfb21f1f2e1295eb89e
3c235bdda7)
--- all_subdir_stand ---
undefined reference to `read_eflags'
undefined reference to `write_eflags'
undefined reference to `read_eflags'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [loader.sym] Error code 1
Has anyone else seen this? I'm not sure if I have some stale files that
need to be purged, or if this is a bug due to me using ccache. I'm asking
here tho as I'd love to preserve my ccache and save some cycles rebuilding
LLVM :)
just following up on this thread - i assume others have been able to
buildworld on amd64, and have not been getting this linker error? i have a
fresh checkout from this morning, tested with and without ccache and am
$ uname -ar
me/pwright/git/freebsd/amd64.amd64/sys/GENERIC-EVDEV amd64
any tips on helping debug this as well would be appreciated - as i'm not
%100 sure where to start (i.e. how to invoke the linker with the "-v" flag
for buildworld :)
With today's tree, I can both build the loader by hand and as part of
buildworld. I'm keen on fixing this, but I've no clue why it's failing for
you.
Have any weird optimizer settings? Do you get any reports of functions not
declared?
thanks for getting back to me Warner.

I do not have any optimization flags, although while i do use ccache i
am able to reproduce this by disabling it in src.conf.

i also am not seeing any reports of functions not being declared,
although i'm currently re-testing the build now with a single worker
passed to make so that i can get clearer output to validate this. i'm
also going to try on another box running current i have to see if this
is just my laptop being silly or if there is a real issue.

cheers,
-pete
--
Pete Wright
***@nomadlogic.org
@nomadlogicLA
Loading...