Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
I cannot properly install gcc and gfortran
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="gcordoba" data-source="post: 919375" data-attributes="member: 125019"><p>Hello,</p><p>I just brought this Mac two weeks ago. I do not know if the operative system is Leopart or Snow-Leopard (how to know?).</p><p>As developer, I need to use gcc and gfortran. Following some google advices, I proceeded to install Xcode, with a supposed success: gcc was not found. Then, I installed SDX but the same happened. Then, I decided to download gcc4.3, but I only found an experimental gcc4.5 in sourceforce.net, gcc was installed apparently with success, but when I try to compile a simple example this was reported:</p><p>gcc: error trying to exec 'as': execvp: No such file or directory</p><p></p><p>After that, I sent Xcode to trash and installed SDX again, I searched for the included gcc4.2 version and installed it. Then I tested gcc and gfortran resulting in: </p><p>for the c version (one line program, which prints "hi"):</p><p></p><p>urcunina<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big grin :D" loading="lazy" data-shortname=":D" />ownloads gustavocordoba$ gcc tmp.c</p><p>tmp.c:2:19: fatal error: stdio.h: No such file or directory</p><p>compilation terminated.</p><p></p><p>By droping the include command (which of course is a programing mistake), the compilation reports:</p><p> </p><p>urcunina<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big grin :D" loading="lazy" data-shortname=":D" />ownloads gustavocordoba$ gcc tmp.c</p><p>tmp.c: In function ‘main’:</p><p>tmp.c:3:2: warning: incompatible implicit declaration of built-in function ‘printf’</p><p>gcc: error trying to exec 'as': execvp: No such file or directory</p><p></p><p>By compiling the fortran version of the same program it results in:</p><p></p><p>urcunina<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big grin :D" loading="lazy" data-shortname=":D" />ownloads gustavocordoba$ gfortran tmp.f</p><p>gfortran: error trying to exec 'as': execvp: No such file or directory</p><p></p><p>By doing some google search, the people only advice to reinstall Xcode, which I already did several times.</p><p></p><p>This problem is driven me crazy, as my research have become blocked by this problem.</p><p></p><p>Please, can any one help me?</p><p>With best regards,</p><p>Gustavo</p></blockquote><p></p>
[QUOTE="gcordoba, post: 919375, member: 125019"] Hello, I just brought this Mac two weeks ago. I do not know if the operative system is Leopart or Snow-Leopard (how to know?). As developer, I need to use gcc and gfortran. Following some google advices, I proceeded to install Xcode, with a supposed success: gcc was not found. Then, I installed SDX but the same happened. Then, I decided to download gcc4.3, but I only found an experimental gcc4.5 in sourceforce.net, gcc was installed apparently with success, but when I try to compile a simple example this was reported: gcc: error trying to exec 'as': execvp: No such file or directory After that, I sent Xcode to trash and installed SDX again, I searched for the included gcc4.2 version and installed it. Then I tested gcc and gfortran resulting in: for the c version (one line program, which prints "hi"): urcunina:Downloads gustavocordoba$ gcc tmp.c tmp.c:2:19: fatal error: stdio.h: No such file or directory compilation terminated. By droping the include command (which of course is a programing mistake), the compilation reports: urcunina:Downloads gustavocordoba$ gcc tmp.c tmp.c: In function ‘main’: tmp.c:3:2: warning: incompatible implicit declaration of built-in function ‘printf’ gcc: error trying to exec 'as': execvp: No such file or directory By compiling the fortran version of the same program it results in: urcunina:Downloads gustavocordoba$ gfortran tmp.f gfortran: error trying to exec 'as': execvp: No such file or directory By doing some google search, the people only advice to reinstall Xcode, which I already did several times. This problem is driven me crazy, as my research have become blocked by this problem. Please, can any one help me? With best regards, Gustavo [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
I cannot properly install gcc and gfortran
Top