Issue Details (XML | Word | Printable)

Key: OSUNIX-43
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: codestr0m
Reporter: codestr0m
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OSUNIX

Solaris kernel fails to build

Created: 22/Jan/09 04:46 AM   Updated: 24/Jan/09 07:13 AM
Component/s: None
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File solaris-kernel-01.diff (0.4 kB)
2. File solaris-kernel-03.diff (0.5 kB)
3. File solaris-kernel.eclass (9 kB)

Environment: Same results with both SS12 and SunStudioExpress 10/22 using vanilla bldenv environment


 Description  « Hide

The sys-kernel/solaris-kernel/solaris-kernel-105.ebuild fails to bulid under OSUNIX
----
The latest build log can be found here..

http://www.osunix.org/docs/DOC-1013

Apply this patch to get past this error, but there are more to follow..


@@ -199,7 +199,7 @@
 
        ENTRY_NP(get_cs_register)
        movq $0, %rax
- movw %cs, %rax
+ movw %cs, %ax
        ret
        SET_SIZE(get_cs_register)
--
Request zone access to follow-up and attach any official patch here

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
codestr0m added a comment - 22/Jan/09 07:19 AM
First patch needed to fix small asm nit

codestr0m added a comment - 22/Jan/09 10:50 AM
Here's where I get stuck

/usr/ccs/bin/ld -dy -b -o debug64/unix -e dboot_image -znointerp -M ../../i86pc/conf/Mapfile.amd64 \
    ./debug64/unix.o debug64/dboot.o ./debug64/modstubs.o -L ../../intel/genunix/debug64 -l genunix \
    debug64/libdtracestubs.so
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol ops: value 0xfffffffffbc3c0d0 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol romp: value 0xfffffffffbc3cf60 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_fuword64: value 0xfffffffffb84f095 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_fuword32: value 0xfffffffffb84f0f3 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_fuword16: value 0xfffffffffb84f155 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_fuword8: value 0xfffffffffb84f1b3 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_suword64: value 0xfffffffffb84f212 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_suword32: value 0xfffffffffb84f271 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_suword16: value 0xfffffffffb84f2d2 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _flt_suword8: value 0xfffffffffb84f332 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb8553fc does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol nopanicdebug: value 0xfffffffffbc08104 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858c66 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858d08 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858d34 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858dfe does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858c69 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858d0b does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858e01 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858c66 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858d08 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858dfe does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858d89 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858dd1 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858e86 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858e44 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858bfc does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858aca does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858b33 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858bb3 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol .text (section): value 0xfffffffffb858c14 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _lfence_insn: value 0xfffffffffb858fc2 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _lfence_insn: value 0xfffffffffb858fc2 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _lfence_insn: value 0xfffffffffb858fc2 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol _lfence_insn: value 0xfffffffffb858fc2 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol workaround_6323525_patched: value 0xfffffffffbc05d88 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol workaround_6323525_patched: value 0xfffffffffbc05d88 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol kdi_cpusave: value 0xfffffffffbc66260 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol kdi_cpusave: value 0xfffffffffbc66260 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol kdi_nmemranges: value 0xfffffffffbc83af4 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol kdi_memranges: value 0xfffffffffbc453f0 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol psm_shutdownf: value 0xfffffffffbc02840 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol rm_platter_va: value 0xfffffffffbc031a0 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol rm_platter_pa: value 0xfffffffffbc3f6c8 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol kernel_cs_code: value 0xfffffffffb838258 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol bootops: value 0xfffffffffbc03190 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol x86_feature: value 0xfffffffffbc01280 does not fit
ld: fatal: relocation error: R_AMD64_32: file ./debug64/unix.o: symbol boothowto: value 0xfffffffffbc547b4 does not fit

codestr0m added a comment - 22/Jan/09 10:52 AM
This patch makes it so that gas isn't required to build.. Which later probably causes this other error

codestr0m added a comment - 22/Jan/09 12:21 PM
Here's the current eclass which you can clearly see which env variables are being set

codestr0m added a comment - 22/Jan/09 01:52 PM
Changing RELEASE_BUILD does affect the error... I can get the one above or..

/usr/ccs/bin/ld -dy -b -o debug64/unix -e dboot_image -znointerp -M ../../i86pc/conf/Mapfile.amd64 \
    ./debug64/unix.o debug64/dboot.o ./debug64/modstubs.o -L ../../intel/genunix/debug64 -l genunix \
    debug64/libdtracestubs.so
*** Error code 1
*** Error code 1
The following command caused the error:
BUILD_TYPE=DBG64 VERSION='onnv-gate' /usr/posix/bin/make def.targ

*joy*

codestr0m added a comment - 23/Jan/09 03:10 AM
This is mostly observation..

1) You *must* have gas installed to assemble certain parts unless you want to debug the assembly code and also make changes to some of the assembler flags in Makefile.master

2) I've stopped overriding the assembler flags and for the 107 build it gets *a lot* further. I hit an error with spcs_errors.h missing. From there I assume it's a generated header and will be installed with one of the onnv-header targets.

The problem with this is that onnv-header is not built at the same time the kernel is. So either both of those need to be combined or a slot system for the handling of multiple build versions currently building and installed needs to be developed. This should be relatively easy to resolve, but still not implemented now.

(I work around this by attempting a full build all straight through and then where -Y is used to cheat and have the build make a symlink between /usr/include (bad idea) and ${WORKDIR}/onnv-gate/usr/include.. it works for now and until slots are done is probably needed.

codestr0m added a comment - 23/Jan/09 03:11 AM
patches 2 and 3.. are *not* needed and should *not* be used if you are doing things the Sun away and depending on aw as your assembler. It will force sun as instead of gas.. as noted above it's a much larger issue.

codestr0m added a comment - 23/Jan/09 03:26 AM
Maybe solve this by running make setup first?

codestr0m added a comment - 24/Jan/09 07:12 AM
svn_105 successfully built and installed last night. I'm resolving the issues that have come up because of conflicting files, but marking this as closed/completed.

codestr0m added a comment - 24/Jan/09 07:13 AM
closed/fixed.. solaris-kernel eclass has been updated and any snv version should build cleanly