Total n00b gcc question

flexion

Active member
Sep 23, 2020
139
93
28
Switzerland
I just don't get it.. I've now tried to compile a really simple "Hello World" using GCC, but I'm not even able to compile this noob example..

Code:
$ gcc test.c -o hello
as ERROR parsing -mabi=n32:  unknown flag
by passing a non existent option, I get a list of valid options for -mabi:
Code:
$ gcc -mabi=iloveyoutoo test.c -o hello
gcc: error: unrecognized argument in option '-mabi=iloveyoutoo'
gcc: note: valid arguments to '-mabi=' are: 32 64 eabi n32 o64
but none of those options work, always the same result: "unknown flag"
Code:
$ gcc -mabi=64 test.c -o hello
as ERROR parsing -mabi=64:  unknown flag
Code:
$ gcc --version
gcc (GCC) 9.2.0 20190812 (sgugver-0.2.0-mips3-ng)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If I try the same with cc instead of gcc, I get the usual long disclaimer about "contact SGI to obtain license", followed by missing "fec" (due to missing development CD installation.. which AFAIK requires a license in LicenseManager)
Code:
$ cc test.c -o hello
No such feature exists (-5,116:2) No such file or directory

 The MIPSpro C Compiler 
 (license FEATURE string = cc) 
 requires a license password. 
...... etc etc ....
cc ERROR:  cannot exec /usr/lib32/cmplrs/fec
Contents of test.c:
Code:
#include <stdio.h>
int main() {
   printf("Hello, cruel world!");
   return 0;
}
I thought I should be at least able to compile a simple "hello world" which does not require lots of dependencies using gcc? What am I doing wrong?
 

mgtremaine

Member
May 3, 2020
51
30
18
San Diego, Ca
www.stellarcore.net
Try that again in the sgugshell (I just did and your code compiled fine)

[sgugshell mgt@saiph ~]$ ./a.out
Hello, cruel world![sgugshell mgt@saiph ~]$

Obviously something about the ABI flag is wrong in the normal login env but the sgugshell seems to fix it. (Not a compiler guy so we can wait for a better answer also)

-Mike
 
  • Like
Reactions: flexion

flexion

Active member
Sep 23, 2020
139
93
28
Switzerland
Oh wow! Thanks Mike! :) I tried in sgugshell too and it indeed works there!!
now I can continue my compile experiment! (y)
 

flexion

Active member
Sep 23, 2020
139
93
28
Switzerland
and finally it compiles.. and compiles.. :cool: (y)

just wondering.. is the idea of sgugshell to be a full replacement for the default shell? should I change my default shell in /etc/passwd from tcsh to sgugshell?
I had the impression this shell is just for SGUG-RSE related tasks and maintenance..
 

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu