Total n00b gcc question

flexion

Administrator
Sep 23, 2020
222
150
43
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?
 
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
Oh wow! Thanks Mike! :) I tried in sgugshell too and it indeed works there!!
now I can continue my compile experiment! (y)
 
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..
 
Edit: With apologies, I no longer wish to have involvement with SGUG or SGI communities in general,
and have also chosen to remove all of my content. Many things have changed since I co-founded, named, and ultimately
then left SGUG. There are many good people around, to whom I apologize for frustrating by removing these things, and
also many petty people that over the years whittled down both the enjoyment as well as sense of obligation I used to
feel to anyone else regarding what was ultimately just a hobby. Unfortunately one of the latter now writes the rules
and so it is time for me to take my things and go.

This message will replace all of my previous forum posts because deleting threads that I started would have removed
other peoples' posts.
 
Last edited:

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