Answer the question
In order to leave comments, you need to log in
Problem with gcc on Solaris 11?
Good day.
Today I installed Oracle Solaris 11 on the server, installed gcc with grief in half. After installing system/headers I tried to compile "Hello, World!" in C++ - and got the following message:
[email protected]:~$ gcc hw.cpp -o hw.cpp <br/>
Assembler: hw.cpp<br/>
"/var/tmp//ccN27OcI.s", line 121 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once"<br/>
"/var/tmp//ccN27OcI.s", line 121 : Syntax error<br/>
Near line: " .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once"<br/>
"/var/tmp//ccN27OcI.s", line 121 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once"<br/>
"/var/tmp//ccN27OcI.s", line 121 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once"<br/>
"/var/tmp//ccN27OcI.s", line 122 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific"<br/>
"/var/tmp//ccN27OcI.s", line 122 : Syntax error<br/>
Near line: " .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific"<br/>
"/var/tmp//ccN27OcI.s", line 122 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific"<br/>
"/var/tmp//ccN27OcI.s", line 122 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific"<br/>
"/var/tmp//ccN27OcI.s", line 123 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific"<br/>
"/var/tmp//ccN27OcI.s", line 123 : Syntax error<br/>
Near line: " .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific"<br/>
"/var/tmp//ccN27OcI.s", line 123 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific"<br/>
"/var/tmp//ccN27OcI.s", line 123 : Illegal mnemonic<br/>
Near line: " .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific"<br/>
"/var/tmp//ccN27OcI.s", line 124 : Illegal mnemonic<br/>
Near line: " .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create"<br/>
"/var/tmp//ccN27OcI.s", line 124 : Syntax error<br/>
Near line: " .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create"<br/>
"/var/tmp//ccN27OcI.s", line 124 : Illegal mnemonic<br/>
Near line: " .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create"<br/>
"/var/tmp//ccN27OcI.s", line 124 : Illegal mnemonic<br/>
Near line: " .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create"<br/>
"/var/tmp//ccN27OcI.s", line 125 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join"<br/>
"/var/tmp//ccN27OcI.s", line 125 : Syntax error<br/>
Near line: " .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join"<br/>
"/var/tmp//ccN27OcI.s", line 125 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join"<br/>
"/var/tmp//ccN27OcI.s", line 125 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join"<br/>
"/var/tmp//ccN27OcI.s", line 126 : Illegal mnemonic<br/>
Near line: " .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal"<br/>
"/var/tmp//ccN27OcI.s", line 126 : Syntax error<br/>
Near line: " .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal"<br/>
"/var/tmp//ccN27OcI.s", line 126 : Illegal mnemonic<br/>
Near line: " .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal"<br/>
"/var/tmp//ccN27OcI.s", line 126 : Illegal mnemonic<br/>
Near line: " .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal"<br/>
"/var/tmp//ccN27OcI.s", line 127 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_selfv,pthread_self"<br/>
"/var/tmp//ccN27OcI.s", line 127 : Syntax error<br/>
Near line: " .weakref _ZL20__gthrw_pthread_selfv,pthread_self"<br/>
"/var/tmp//ccN27OcI.s", line 127 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_selfv,pthread_self"<br/>
"/var/tmp//ccN27OcI.s", line 127 : Illegal mnemonic<br/>
Near line: " .weakref _ZL20__gthrw_pthread_selfv,pthread_self"<br/>
"/var/tmp//ccN27OcI.s", line 128 : Illegal mnemonic<br/>
Near line: " .weakref _ZL22__gthrw_pthread_detachj,pthread_detach"<br/>
"/var/tmp//ccN27OcI.s", line 128 : Syntax error<br/>
Near line: " .weakref _ZL22__gthrw_pthread_detachj,pthread_detach"<br/>
"/var/tmp//ccN27OcI.s", line 128 : Illegal mnemonic<br/>
Near line: " .weakref _ZL22__gthrw_pthread_detachj,pthread_detach"<br/>
Too many errors - Goodbye
Answer the question
In order to leave comments, you need to log in
It is unlikely to help, but why do you write to the same place where you get the sources from? Can
$ gcc hw.cpp -o hw
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question