xCode 4.3+ and NASM

Mac OSX specific forum
rodego
User
User
Posts: 10
Joined: Thu Nov 08, 2007 7:39 pm

xCode 4.3+ and NASM

Post by rodego »

Hello guys,

I just get computer with OS X Lion, install from appStore last xCode (4.3) version and found, that PureBasic didn't work. On compilation it takes error about unknown command 'sh nasm'. Well, this is obliviously, becouse xCode 4.3 use LLVM instead of gcc+nasm.

So, any ideas, how fix this?

(PureBasic 4.61 Beta 1, MacOS X Lion 10.7, XCode 4.3)
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: xCode 4.3+ and NASM

Post by wilbert »

I'm still using XCode 4.2 so I don't know if nasm is included or not with XCode 4.3 .
You should be able to install nasm yourself
http://www.nasm.us/
rodego
User
User
Posts: 10
Joined: Thu Nov 08, 2007 7:39 pm

Re: xCode 4.3+ and NASM

Post by rodego »

Okey, here small workaround for MacOSX Lion:


Way #1 (Simple):
Go to https://github.com/kennethreitz/osx-gcc-installer and download package for your MacOS. It's contain everithyng you need: GCC, CLang, NASM, headers, etc.
Package size ~700 mb. If you use this package, than XCode not required for PureBasic (You do not need to download a huge XCode package of almost 2 gigabytes :D ).

Way #2 (For those who have nothing to do):

First of all, you will need GCC: http://opensource.apple.com/ and XCode.

Than, get last stable NASM sources and comile it:

Code: Select all

./configure
 
make
 
sudo make install
Enjoy!
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Re: xCode 4.3+ and NASM

Post by Kukulkan »

To fix the missing nasm, simply download and install commandline_tools_for_xcode from apple store (free).

Kukulkan
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: xCode 4.3+ and NASM

Post by Fred »

I will add it to the final package to ease the things.
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: xCode 4.3+ and NASM

Post by moogle »

This is quickest way to fix this, if you've got XCode 4.3.

Open XCode then go to preferences and click the Download tab. Right at the bottom is Command Line Tools 180MB and click install.

After that PB will run fine and you can run programs.
Image
User avatar
fsw
Addict
Addict
Posts: 1603
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: xCode 4.3+ and NASM

Post by fsw »

Hi,
I'm new to OSX :D

Downloaded the latest Purebasic beta and have a dumb question:

The Purebasic install readme file says XCode is needed, but according to this thread I do not need XCode but either download and install:

the installer at: https://github.com/kennethreitz/osx-gcc-installer
or
the commandline_tools_for_xcode from apple store

Is this correct?

So if I want to stay away from the Apple store the only solution would be the installer on github...

Really hope that future PureBasic versions come with all it's needed :P
Last edited by fsw on Wed May 23, 2012 12:26 am, edited 2 times in total.

I am to provide the public with beneficial shocks.
Alfred Hitshock
moogle
Enthusiast
Enthusiast
Posts: 372
Joined: Tue Feb 14, 2006 9:27 pm
Location: London, UK

Re: xCode 4.3+ and NASM

Post by moogle »

I've not tried the gcc-installer but I suppose if you don't have an app store account (you need to put in a credit card to verify your info) then I suppose that would be the way to do it.
Hopefully it should work.
Image
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: xCode 4.3+ and NASM

Post by J. Baker »

One thing I noticed after installing the new Mountain Lion and xCode 4.4 tonight is that it's an all-in-one app now, located in the Applications folder. There was also no Application Loader in the normal spot/folder. It appears it's now built into xCode itself. I guess it could be removed and used if you want to uninstall xCode but haven't tried yet.
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: xCode 4.3+ and NASM

Post by wilbert »

@Joe, I still don't know if I should upgrade to Mountain Lion or not.
What's your experience so far ?
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: xCode 4.3+ and NASM

Post by Polo »

wilbert wrote:@Joe, I still don't know if I should upgrade to Mountain Lion or not.
What's your experience so far ?
Haven't updated yet but people say it's a bit faster than Lion. The notification center seems nice, too!
I'll update in a few days :)
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: xCode 4.3+ and NASM

Post by WilliamL »

I used the gcc-installer link on my new computer with Lion and PB works fine.
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: xCode 4.3+ and NASM

Post by srod »

How much is the update from Lion? Can't imagine it's going to be free knowing Apple!
I may look like a mule, but I'm not a complete ass.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3942
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: xCode 4.3+ and NASM

Post by wilbert »

The update is $19.99 .
What worries me a bit is that I read somewhere that XCode doesn't support the gcc compiler anymore, only llvm .
One of my iOS apps didn't compile properly using llvm on Lion.
User avatar
J. Baker
Addict
Addict
Posts: 2181
Joined: Sun Apr 27, 2003 8:12 am
Location: USA
Contact:

Re: xCode 4.3+ and NASM

Post by J. Baker »

wilbert wrote:@Joe, I still don't know if I should upgrade to Mountain Lion or not.
What's your experience so far ?
So far it's been good. I only upgraded mainly for Game Center. Unless there was a feature you were waiting for, no need to upgrade right away. ;)
www.posemotion.com

PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef


Even the vine knows it surroundings but the man with eyes does not.
Post Reply