[OpenAFS-devel] solaris 10 x86 64-bit lwp compile issues

Sean O'Malley omalleys@msu.edu
Tue, 12 Dec 2006 00:55:34 -0500 (EST)


In my quest to get our new machines running all 64-bit code. I was trying
to get aklog linked against the kerberos 64-bit libraries, and of course
it didnt work because the libraries are all 32-bit and the linker gave me
all sorts of xmas elf32 errors.  I am using the sun studio 11 compiler.

I mucked with the configure files and got the 64-bit flags in. It crapped
out at '(stdin->_cnt > 0)' line like 178 of lwp/waitkey.c (undefined
structure _cnt error)..

I changed that to if (getc_unlocked(stdin) > 0)
which surprisingly compiled (i wont say it works...)

Now it is hung up in lwp trying to do the inline of assembly code..

if I use the process.i386.s code it compiles and ar has no problems until
you get to somewhere way down the line and then i get to
/opt/dloads/openafs-1.4.2/src/sys
 where it is creating rmtsysd

i get:
Undefined symbols in (first referenced in) liblwp.a
for savecontext and for returnto. (and if you run nm on them they exist..)


If I try to use the process.amd64.s code i get totally horked
+ /usr/ccs/lib/cpp -P -D__i386 -D__sun -DIGNORE_STDS_H
-I/opt/dloads/openafs-1.4.2/include -I. ./process.amd64.s process.ss
+ as -o process.o process.ss
Assembler: process.s
        "process.ss", line 129 : Illegal mnemonic
        Near line: "    pushq   %rbp                    "
        "process.ss", line 129 : Illegal register: "rbp"
        "process.ss", line 129 : Syntax error
        Near line: "    pushq   %rbp                    "
        "process.ss", line 130 : Illegal register: "rsp"
        "process.ss", line 130 : Syntax error
        Near line: "    movq    %rsp,%rbp"
        "process.ss", line 130 : Illegal register: "rbp"
        "process.ss", line 131 : Illegal mnemonic
        Near line: "    subq    $32, %rsp               "
        "process.ss", line 131 : Illegal register: "rsp"
        "process.ss", line 131 : Syntax error
        Near line: "    subq    $32, %rsp               "
        "process.ss", line 132 : Illegal register: "rdi"
        "process.ss", line 132 : Syntax error
        Near line: "    movq    %rdi, f(%rbp)           "
        "process.ss", line 132 : Illegal register: "rbp"
        "process.ss", line 133 : Illegal register: "rsi"
        "process.ss", line 133 : Syntax error
        Near line: "    movq    %rsi, area1(%rbp)       "
        "process.ss", line 133 : Illegal register: "rbp"
        "process.ss", line 134 : Illegal register: "rdx"
        "process.ss", line 134 : Syntax error
        Near line: "    movq    %rdx, newsp(%rbp)       "
        "process.ss", line 134 : Illegal register: "rbp"
        "process.ss", line 138 : Illegal mnemonic
        Near line: "    pushq   %rsp                    "
        "process.ss", line 138 : Illegal register: "rsp"
        "process.ss", line 138 : Syntax error
        Near line: "    pushq   %rsp                    "
        "process.ss", line 139 : Illegal mnemonic
        Near line: "    pushq   %rax                    "
        "process.ss", line 139 : Illegal register: "rax"
        "process.ss", line 139 : Syntax error
        Near line: "    pushq   %rax                    "
        "process.ss", line 140 : Illegal mnemonic
        Near line: "    pushq   %rcx                    "
        "process.ss", line 140 : Illegal register: "rcx"
        "process.ss", line 140 : Syntax error
        Near line: "    pushq   %rcx                    "
        "process.ss", line 141 : Illegal mnemonic
        Near line: "    pushq   %rdx                    "
        "process.ss", line 141 : Illegal register: "rdx"
        "process.ss", line 141 : Syntax error
        Near line: "    pushq   %rdx                    "
        "process.ss", line 142 : Illegal mnemonic
        Near line: "    pushq   %rbx"
Too many errors - Goodbye

and of course process.o never gets made so liblwp.a never gets made..

Does anyone have any ideas or fixes for this? Without taking a crash
course in assembly language? :)



--------------------------------------
  Sean O'Malley, Information Technologist
  Michigan State University
-------------------------------------