appplemac
@appplemac

Проблема с gcc в Solaris 11?

Доброго времени суток.

Сегодня установил на сервер Oracle Solaris 11, с горем пополам установил gcc. После установки system/headers попробовал скомпилировать «Hello, World!» на С++ – и получил следующее сообщение:



alexey@test:~$ gcc hw.cpp -o hw.cpp <br/>
Assembler: hw.cpp<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 121 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 121 : Syntax error<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 121 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 121 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_onceP5_oncePFvvE,pthread_once&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 122 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 122 : Syntax error<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 122 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 122 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_getspecificj,pthread_getspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 123 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 123 : Syntax error<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 123 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 123 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL27__gthrw_pthread_setspecificjPKv,pthread_setspecific&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 124 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 124 : Syntax error<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 124 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 124 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_createPjPK13_pthread_attrPFPvS3_ES3_,pthread_create&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 125 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 125 : Syntax error<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 125 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 125 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_joinjPPv,pthread_join&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 126 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 126 : Syntax error<br/>
 Near line: &quot; .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 126 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 126 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL21__gthrw_pthread_equaljj,pthread_equal&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 127 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_selfv,pthread_self&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 127 : Syntax error<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_selfv,pthread_self&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 127 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_selfv,pthread_self&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 127 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL20__gthrw_pthread_selfv,pthread_self&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 128 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_detachj,pthread_detach&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 128 : Syntax error<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_detachj,pthread_detach&quot;<br/>
 &quot;/var/tmp//ccN27OcI.s&quot;, line 128 : Illegal mnemonic<br/>
 Near line: &quot; .weakref _ZL22__gthrw_pthread_detachj,pthread_detach&quot;<br/>
Too many errors - Goodbye




Подскажите, что мне такого сделать, чтобы программы компилировались без ошибок?

Заранее спасибо за ответы.
  • Вопрос задан
  • 2857 просмотров
Решения вопроса 1
@gribozavr
Это ассемблер ругается. У вас as из binutils?
Ответ написан
Пригласить эксперта
Ответы на вопрос 2
@EaS
Вряд ли поможет, но почему вы пишете туда же, откуда сорсы берете? Может
$ gcc hw.cpp -o hw
Ответ написан
@EaS
g++ попробуйте. gcc вроде не линкует стандартную библиотеку плюсовую.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы