New: compile failure, gcc 3.2.3, gentoo SPARC, Sun Ultra 5
Took this to linux-sparc - someone may have encountered the same.
I have looked at the build output, and what I see is that ld complains about symbols declared weak in the corresponding ksymall.c file.
The quick way is to avoid defining KSYMALL in .config.
The root cause seems to be caused by a too old binutils, unable to deal with weak symbols for sparc64.
Could you please reply with current version of binutils (ld --version), and tell if it succeeeds without KSYMALL defined.
Sam
Below is relevant part of mail conversation for reference. [Note - a make clean/mrporper did not cure it].
Quoted 6 lines · Brian
I may be missing something, but kallsyms doesn't seem to be being run in the sequence you describe. Therefore, the entire build trace is in:
http://www.stat.ufl.edu/~bb/2.6.3-build_fail.txt Brian
Quoted 102 lines · Andrew Morton
hm,
kallsyms_addressesis generated by the build.Did you try `make clean' and then redo it all?
Sam, `make clean' leaves some dotfiles around in $TOPDIR
rw-r--r-- 1 akpm akpm 683158 Feb 26 01:08
.tmp_kallsyms1.S-rw-r--r-- 1 akpm akpm 683158 Feb 26 01:08 .tmp_kallsyms2.S drwxr-xr-x 2 akpm akpm 4096 Feb 26 03:37 .tmp_versions/Begin forwarded message:
Date: Thu, 26 Feb 2004 19:45:54 -0800
From: [email protected]
To: [email protected]
Subject: [Bugme-new] [Bug 2205] New: compile failure, gcc 3.2.3, gentoo SPARC, Sun Ultra 5http://bugme.osdl.org/show_bug.cgi?id"05
Summary: compile failure, gcc 3.2.3, gentoo SPARC, Sun Ultra 5
Kernel Version: 2.6.3
Status: NEW
Severity: high
Owner: [email protected]
Submitter: [email protected]Distribution: gentoo
Hardware Environment: Sun Ultra 5
Software Environment: gentoo
Problem Description:There were a couple of small compile problems, such as the gcc version check in
init/main.cdeciding that gcc 3.2.3 was too old, having to expand and remove the SPRINTK macro in reiserfs, and unconfiguring two scsi drivers that failed, but then I hit a showstopper:[...]
CC arch/sparc64/lib/rwsem.o AS arch/sparc64/lib/strlen.o AS arch/sparc64/lib/strlen_user.o AS arch/sparc64/lib/strncmp.o AS arch/sparc64/lib/strncpy_from_user.o AS arch/sparc64/lib/xor.o AR arch/sparc64/lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1kernel/built-in.o(.text+0x208f0): In function `kallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x208f4): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20970): In functionkallsyms_lookup':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20974): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20978): In functionkallsyms_lookup':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x2097c): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20988): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20990): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20a1c): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20a2c): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20a7c): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20c24): In functionget_ksymbol_mod':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20c34): In functionget_ksymbol_mod':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20c84): In functionget_ksymbol_core':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20c90): In functionget_ksymbol_core':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20cd4): In functionget_ksymbol_core':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20cdc): In functionget_ksymbol_core':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20d44): In functionupdate_iter':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20d48): In functionupdate_iter':
: undefined reference to `kallsyms_num_syms'
make: *** [.tmp_vmlinux1] Error 1real 118m4.563s user 114m31.810s sys 3m3.380sSteps to reproduce: make vmlinux
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Re: Fw: [Bugme-new] [Bug 2205] New: compile failure, gcc 3.2.3,
Successfully compiled and running 2.6.3, 2.6.3_rc1 (Gentoo sparc-dev-sources) 2.6.3-bk8 and 2.6.4-rc1
on Ultra 10 with Gentoo 1.4_rc5 Sparc64.
Try "emerge"ing sparc-dev-sources.
Quoted 136 lines · Sam Ravnborg
Took this to linux-sparc - someone may have encountered the same.
I have looked at the build output, and what I see is that ld complains about symbols declared weak in the corresponding
ksymall.cfile.The quick way is to avoid defining KSYMALL in .config.
The root cause seems to be caused by a too old binutils, unable to deal with weak symbols for sparc64.
Could you please reply with current version of binutils (ld --version), and tell if it succeeeds without KSYMALL defined.
Sam
Below is relevant part of mail conversation for reference. [Note - a make clean/mrporper did not cure it].
Quoted 6 lines · Brian
I may be missing something, but kallsyms doesn't seem to be being run in the sequence you describe. Therefore, the entire build trace is in:
http://www.stat.ufl.edu/~bb/2.6.3-build_fail.txt BrianQuoted 101 lines · Andrew Morton
hm,
kallsyms_addressesis generated by the build.Did you try `make clean' and then redo it all?
Sam, `make clean' leaves some dotfiles around in $TOPDIR
rw-r--r-- 1 akpm akpm 683158 Feb 26 01:08
.tmp_kallsyms1.S-rw-r--r-- 1 akpm akpm 683158 Feb 26 01:08 .tmp_kallsyms2.S drwxr-xr-x 2 akpm akpm 4096 Feb 26 03:37 .tmp_versions/Begin forwarded message:
Date: Thu, 26 Feb 2004 19:45:54 -0800
From: [email protected]
To: [email protected]
Subject: [Bugme-new] [Bug 2205] New: compile failure, gcc 3.2.3, gentoo SPARC, Sun Ultra 5http://bugme.osdl.org/show_bug.cgi?id"05
Summary: compile failure, gcc 3.2.3, gentoo SPARC, Sun Ultra 5
Kernel Version: 2.6.3
Status: NEW
Severity: high
Owner: [email protected]
Submitter: [email protected]Distribution: gentoo
Hardware Environment: Sun Ultra 5
Software Environment: gentoo
Problem Description:There were a couple of small compile problems, such as the gcc version check in
init/main.cdeciding that gcc 3.2.3 was too old, having to expand and remove the SPRINTK macro in reiserfs, and unconfiguring two scsi drivers that failed, but then I hit a showstopper:[...]
CC arch/sparc64/lib/rwsem.o AS arch/sparc64/lib/strlen.o AS arch/sparc64/lib/strlen_user.o AS arch/sparc64/lib/strncmp.o AS arch/sparc64/lib/strncpy_from_user.o AS arch/sparc64/lib/xor.o AR arch/sparc64/lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/built-in.o LD .tmp_vmlinux1kernel/built-in.o(.text+0x208f0): In function `kallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x208f4): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20970): In functionkallsyms_lookup':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20974): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20978): In functionkallsyms_lookup':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x2097c): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20988): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20990): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20a1c): In functionkallsyms_lookup':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20a2c): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20a7c): In functionkallsyms_lookup':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20c24): In functionget_ksymbol_mod':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20c34): In functionget_ksymbol_mod':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20c84): In functionget_ksymbol_core':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20c90): In functionget_ksymbol_core':
: undefined reference tokallsyms_names' kernel/built-in.o(.text+0x20cd4): In functionget_ksymbol_core':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20cdc): In functionget_ksymbol_core':
: undefined reference tokallsyms_addresses' kernel/built-in.o(.text+0x20d44): In functionupdate_iter':
: undefined reference tokallsyms_num_syms' kernel/built-in.o(.text+0x20d48): In functionupdate_iter':
: undefined reference to `kallsyms_num_syms'
make: *** [.tmp_vmlinux1] Error 1real 118m4.563s user 114m31.810s sys 3m3.380sSteps to reproduce: make vmlinux
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
This is getting to be pretty off topic; if anything it's a Gentoo problem. That said, however, I test-build all sparc-dev-sources and development-sources on sparc64 with gcc 3.2.3 and 3.3.2 before I release them on sparc. They work.
Quoted 2 lines
There were a couple of small compile problems, such as the gcc version check in
init/main.cdeciding that gcc 3.2.3 was too old, having to
I don't buy it. The checks in init/main.c are for old 2.x compilers. Please be sure your system is up to date. 3.2.3 is fine; if there is a check that is failing on it then something else is wrong. My guess is that you have:
gcc-3.2.3-r2
egcs64-1.1.2_whatever
and think that because gcc --version says 3.2.3 you're ok. That's no good on sparc64. You need to update your 64-bit compiler to 3.2 or higher to build 2.6. So emerge -C egcs64; emerge gcc-sparc64. If you have any doubts, please do:
ld --version
sparc64-linux-gcc --version
If gentoo lets you install 2.6 without gcc-sparc64, that's my bug and you should file it at bugs.gentoo.org. If you're circumventing that dependency yourself, don't.
Quoted 1 line
Try "emerge"ing sparc-dev-sources.
Please don't. sparc-dev-sources is now deprecated; you should use development-sources. If you want people other than gentoo developers to help you, you can also just use Linus 2.6.3, which works fine on sparc64.
If you have current tools and it still doesn't work, please open a Gentoo bug.
Signature · 1 line
Keith M Wesolowski