🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42054

Pb with static link on AIX 3.2

#42054
From: Jerome Thomas
Date: Wed, 17 Jan 1996 00:00
35 lines
1256 bytes
  Hi,

  I was trying to compile emacs-19.30 on AIX 3.2 with gcc 2.7.2, and
I've got a link error. All the system calls are undefined. This is
related to the fact that emacs links statically. For instance, if I
try to compile statically the following program:

% more foo.c
#include <unistd.h>
#include <stdio.h>

main() {
  printf("%d\n",getpgrp()) ;
}

with 
% gcc -static foo.c
collect2: ld returned 1 exit status
/tmp/ccsHoCrx1.o(.pr+0x1c):foo.c: undefined reference to `getpgrp'
/tmp/ccsHoCrx1.o: loader reloc in read-only section .text
/u/powerpc-ibm-aix3.2.5/bin/ld: final link failed: Invalid operation

  Any hint greatly apreciated,

  Thanks in advance,

Jerome Thomas

P.S. If this does help:
% uname -a
AIX infibm1 2 3 002063684800
% gcc -v
Reading specs from /u/lib/gcc-lib/powerpc-ibm-aix3.2.5/2.7.2/specs
gcc version 2.7.2
Technical Details
Message-ID: <JTHOMAS.96Jan17154525@crisv2.univ-pau.fr>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e5e2397778f6442a,start
X-Google-Attributes: gid11318c,public
From: jthomas@univ-pau.fr (Jerome Thomas)
Subject: Pb with static link on AIX 3.2
Date: 1996/01/17
Message-ID: <JTHOMAS.96Jan17154525@crisv2.univ-pau.fr>
X-Deja-AN: 136617372
organization: C.I.U.P.P.A. Universite de PAU
newsgroups: gnu.gcc.help