Mountain Lion

I tried to install nme on mountain lion and when I do `nme setup mac` it wants to install xcode even though I already have it. Has anyone got nme working on mountain lion?

Viewing 1 to 20 (31 Total)
Mountain Lion

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

I tried to install nme on mountain lion and when I do `nme setup mac` it wants to install xcode even though I already have it. Has anyone got nme working on mountain lion?

Tags:
Posted on July 17, 2012 at 3:22 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

Upgrade to NME 3.4, and it should work with Xcode 4.4 and 4.5

Posted on July 17, 2012 at 3:24 PM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Thats what I was using. I suppose another question I have is is there any difference to installing everything with nme and just installing haxe 2.10 and installing nme with haxelib? Because I have it working I think with haxe 2.10 and haxelib.

Posted on July 17, 2012 at 3:41 PM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Never mind, just tried both ways and no go. Still wants me to install xcode (I have 4.4 GM and command line tools) and when I try to compile a nme sample I get:
Sample.hx:1: characters 0-17 : You can't access the flash package with current compilation flags (for flash.Lib)
Might just go back to cocos2d lol.

Posted on July 17, 2012 at 4:07 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

Hi!

Thanks for your patience smiling

The installer will give you Haxe 2.10, HXCPP 2.10, NME 3.4, Actuate 1.43 and SWF 1.13, and installs the "nme" shortcut so you can run "nme" instead of "haxelib run nme" to access the command-line tools.

Use the Pirate Pig sample, hosted here:

http://github.com/jgranick/PiratePig...

You should be able to run it like this:

nme test "Pirate Pig.nmml" mac
nme test "Pirate Pig.nmml" ios -simulator
nme test "Pirate Pig.nmml" ios

Posted on July 17, 2012 at 4:14 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

You could then target additional platforms, so long as you run setup first:

nme setup android
nme setup blackberry
nme setup webos


...and compile for additional platform targets:

nme test "Pirate Pig.nmml" android
nme test "Pirate Pig.nmml" blackberry -simulator
nme test "Pirate Pig.nmml" blackberry
nme test "Pirate Pig.nmml" webos
nme test "Pirate Pig.nmml" flash
nme test "Pirate Pig.nmml" html5


Currently you need to compile the Windows or Linux targets while running a Windows or Linux host

Posted on July 17, 2012 at 4:17 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

If you encounter any problems, let me know. I am running Mountain Lion here, and it has been working fine.

Posted on July 17, 2012 at 4:19 PM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Here's my output of nme test "Pirate Pig.nmml" mac:

/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/as: assembler (/Applications/Xcode.app/Contents/Developer/usr/bin/clang) not installed
Called from ? line 1
Called from BuildTool.hx line 1265
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 744
Called from BuildTool.hx line 200
Uncaught exception - Error : 256 - build cancelled
Error: Source path "Export/cpp/mac/obj/ApplicationMain" does not exist

Not sure why it's looking for clang in there as that's not where it lives anymore, but I'll try a symlink.

Posted on July 17, 2012 at 4:32 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

Hmm, that's strange.

I'm actually getting that same error now. I must not have noticed it because I (likely?) upgraded from Lion, and recompiled and the offending file was already compiled for me.

It's very strange how the GCC assembler is looking for clang, but in the wrong path. I hope this will be fixed before Xcode 4.4 goes live? Perhaps not since this is the GM.

Let me see if I can get it to use clang instead of GCC

Posted on July 17, 2012 at 4:44 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

You can also use "mac -neko" to compile for Mac using the Neko target (instead of C++), or the other targets should work. Thanks for bringing this up, investigating.

Posted on July 17, 2012 at 4:45 PM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Ok cool, the symlink seems to have worked. Couldn't get sample 02 to work but 15 worked and the piratepig sample works fine. Might consider using xcrun or some such to resolve those paths better, I'm not sure. Thanks for the help.

Posted on July 17, 2012 at 4:49 PM

singmajesty

singmajesty
Total Posts: 2146
Joined: August 25, 2011

Re: Mountain Lion

It is disappointing that Xcode comes with a bad symlink.

I have updated the development builds of NME and HXCPP to support Clang for the Mac target and use it by default for application code. The native binaries compile fine using g++, I'm not really sure why one of the application files trigger GCC to use clang.

When we put out the next point release, this should work out of the box. I apologize for the trouble, and thanks for bringing this to our attention! smiling

Posted on July 17, 2012 at 6:06 PM

mypalmike

mypalmike
Total Posts: 1
Joined: July 29, 2012

Re: Mountain Lion

I ran into the same problem. I'm on Lion with XCode 4.4. I'm new to nme as of today, so I don't know much about the nme build system. However, I found the problem only stopped URLRequestMethod and URLRequest from building. My workaround was to manually run the offending commands:

$ cd Export/cpp/mac/obj
$ g++ -I. -Iinclude -c -fvisibility=hidden -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -I/usr/lib/haxe/lib/hxcpp/2,10//include -DHX_MACOS -m32 -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -x c++ -frtti ./src/neash/net/URLRequestMethod.cpp -oobj/darwin//src/neash/net/URLRequestMethod.o
$ g++ -I. -Iinclude -c -fvisibility=hidden -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -I/usr/lib/haxe/lib/hxcpp/2,10//include -DHX_MACOS -m32 -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -x c++ -frtti ./src/neash/net/URLRequest.cpp -oobj/darwin//src/neash/net/URLRequest.o

Note: the g++ commands are the exact commands that were printed in the failed output: I'd recommend anyone trying this to copy-paste from their own screen.

After this, I was able to run "nme test [project] mac" and the build completed and ran.

Posted on July 29, 2012 at 3:38 PM

kay

kay
Total Posts: 4
Joined: August 01, 2012

Re: Mountain Lion

Not sure how you solved that, creating a sym link gives me a message about "no input files":
clang: error: no input files
Called from ? line 1
Called from BuildTool.hx line 1246
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 746
Called from BuildTool.hx line 200
Uncaught exception - Error : 512 - build cancelled

Thanks for any help
-Kay

Posted on August 01, 2012 at 8:08 AM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Note the line : assembler (/Applications/Xcode.app/Contents/Developer/usr/bin/clang) not installed
in my error message, that's why the symlink. You're error seems like the build script is messed up or somthing, have you tried removing nme and reinstalling?

Posted on August 01, 2012 at 8:45 AM

kay

kay
Total Posts: 4
Joined: August 01, 2012

Re: Mountain Lion

Sorry for not being precise, that above error happens after creating the sym link. W/o the sym link I get the same error as you (see below). Thus my question how you created the sym link so that it works, obviously I did something wrong. This is how I created the sym link

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang /Applications/Xcode.app/Contents/Developer/usr/bin/clang

Error w/o sym link of clang to clang:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++ -I. -Iinclude -c -g -fmessage-length=0 -pipe -Wno-trigraphs -fno-stack-protector -fpascal-strings -fasm-blocks -Wreturn-type -Wunused-variable -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -fvisibility=hidden -miphoneos-version-min=5.1 -DIPHONE -DIPHONESIM -DHXCPP_DEBUG -DSTATIC_LINK -DHXCPP_SET_PROP -DHXCPP_MULTI_THREADED -I/Users/kay/ws/client.dev/libs/hxcpp//include -x c++ -fvisibility-inlines-hidden -frtti ./src/prezi/service/PreziLoadRequest.cpp -oobj/iphonesim-dbg//src/prezi/service/PreziLoadRequest.o
/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/as: assembler (/Applications/Xcode.app/Contents/Developer/usr/bin/clang) not installed
Called from ? line 1
Called from BuildTool.hx line 1246
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 746
Called from BuildTool.hx line 200
Uncaught exception - Error : 512 - build cancelled

Posted on August 01, 2012 at 9:03 AM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

Do you have the command line tools for xcode installed? My symlink was like this: ln -s /usr/bin/clang /Applications/Xcode.app/Contents/Developer/usr/bin/clang
and my clang --version: 4.0 (tags/Apple/clang-421.0.57)

Posted on August 01, 2012 at 1:24 PM

Alexin

Alexin
Total Posts: 5
Joined: March 02, 2012

Re: Mountain Lion

I'm having the same problem as Kay.

I couldn't find /usr/bin/clang so I created a symbolic link, like Kay did, and got a slightly different error:


/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/as: can't find or exec: /Applications/Xcode.app/Contents/Developer/usr/bin/clang (Permission denied)


It fails with sudo too.

I have Mountain Lion and the latest releases from the download page.

Posted on August 01, 2012 at 7:01 PM

Kamek

Kamek
Total Posts: 15
Joined: July 17, 2012

Re: Mountain Lion

You need to install the command line tools. Pretty much have to have them for tons of other things anyway (brew, gems, etc).

Posted on August 01, 2012 at 11:35 PM

kay

kay
Total Posts: 4
Joined: August 01, 2012

Re: Mountain Lion

I had the command line tools installed, certainly smiling Anyway, I switched back to 4.3.3 and it works for now.

Posted on August 02, 2012 at 3:36 AM
« Previous12Next »