New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus • Advice and insight from world-class Apple enthusiasts • Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

I cannot properly install gcc and gfortran


Post Reply New Thread Subscribe

 
Thread Tools
gcordoba

 
Member Since: Oct 05, 2009
Posts: 2
gcordoba is on a distinguished road

gcordoba is offline
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"):

urcuninaownloads 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:

urcuninaownloads 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:

urcuninaownloads 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 Thanks
gcordoba

 
Member Since: Oct 05, 2009
Posts: 2
gcordoba is on a distinguished road

gcordoba is offline
I installed Xcode again (just Xcode) and now it seems to work properly.
Thanks,
Gustavo
QUOTE Thanks
philju

 
Member Since: Feb 17, 2010
Posts: 1
philju is on a distinguished road

philju is offline
Hi Gustavo,

From reading your posts above it seems you are more knowledgeable with Macs and compilers than I. I have a small problem that I am unsure how to resolve on my own.

I use the NetBeans IDE which is currently working well with the GNU C/C++ compilers bundled with XCode. I have downloaded and installed the GFortran compiler using the idiot-proof package available from: gfortran for Leopard | MacResearch. NetBeans can utilise the same functionality provided by a fortran compiler but because GCC is currently in /usr/bin and GFortran installs to /usr/local/bin I cannot get them to work together because they are in different base directories.

Are you aware of a method for merging the GFortran installation made by this package with the existing GCC compiler located in /usr/bin?

Cheers,
Phil
QUOTE Thanks
xstep

 
xstep's Avatar
 
Member Since: Jun 25, 2005
Location: On the road
Posts: 3,231
xstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to allxstep is a name known to all
Mac Specs: 2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid

xstep is offline
Quote:
Originally Posted by gcordoba View Post
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?).
On any Mac OS system, click on the Apple icon on the upper left of the menu bar and choose `About This Mac'.

Glad to see you got it working.

CameraTime - Time lapse photography for novice and advanced users.

When asking questions, post the version of your software. You'll receive better answers.

Please post your results to the thread as it is good feedback.
QUOTE Thanks

Post Reply New Thread Subscribe


« AppleScript Help Needed: Delete Watched TV Shows in iTunes | passwd and openssl passwd »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
How to install GCC version 4.xx???? Philipina OS X - Development and Darwin 1 04-14-2006 10:25 AM

All times are GMT -4. The time now is 02:23 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?