Skip to contentSkip to conversation

What causes this error on LinuxPPC?

DISCUSSION ian geiser 3 participants 3 messages Jul 14, 2000

lore
Share & tools
lore

ian geiser

author
#0 lore raw

Greetings

I am trying to compile a program using gcc version 2.95.3 19991030 (prerelease/franzo/20000622)

for some reason i get this error. I do not get this error on my stock Linux Mandrake 7.1

box though. Any ideas?

gencode.o: In function `prcode':
gencode.o(.text+0x8bf0): undefined reference to `__va_arg_type_violation' gencode.o(.text+0x8bf0): relocation truncated to fit: R_PPC_REL24 __va_arg_type_violation
collect2: ld returned 1 exit status

-ian reinhart geiser

--
.---------------------------------------------------.

| Ian Reinhart Geiser - Computer Engineering Student|
| HOME:                           |
| WORK:                       |
| WEB:  http://www.msoe.edu/~geiseri                |

`---------------------------------------------------'

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#1 lore raw

From: ian geiser <[email protected]>
To: "[email protected]" <[email protected]>
Subject: What causes this error on LinuxPPC?
Date: Thu, 13 Jul 2000 23:24:19 -0500

Quoted 4 lines

Greetings

I am trying to compile a program using gcc version 2.95.3 19991030 (prerelease/

franzo/20000622)

Quoted 2 lines

for some reason i get this error. I do not get this error on my stock Linux

Mandrake 7.1

Quoted 2 lines

box though. Any ideas?

See at

/usr/gcc-lib/ppc-redhatt-linux/2.95.3/include/va-ppc.h

Kaoru

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

#2 lore raw
In reply to ian geiser
Quoted 8 lines · ian geiser

Greetings

I am trying to compile a program using gcc version 2.95.3 19991030
(prerelease/franzo/20000622)

for some reason i get this error. I do not get this error on my
stock Linux Mandrake 7.1

Quoted 7 lines

box though. Any ideas?

gencode.o: In function `prcode':
gencode.o(.text+0x8bf0): undefined reference to `__va_arg_type_violation' gencode.o(.text+0x8bf0): relocation truncated to fit: R_PPC_REL24 __va_arg_type_violation
collect2: ld returned 1 exit status

The source in gencode.c is buggy, change this illegal C line:

       char c = va_arg(ap,char);

to the correct one

       char c = (char) va_arg(ap,int);

and you should be fine.

Franz.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/