How to install native assembler for Mac OSX? - xcode

I am interested to know how can I install native assemblar (I think also known as AS) on Mac OSX Lion. Someone suggested that I can use the Xcode to do it but I didn't see any options.Terminal windows is not able to recognize AS as command right now. Can someone provide more insight on this ? I am new to Mac/Unix environment so please provide help accordingly.

If you have Xcode installed, then you have as.There is no option to install specific packages from the Xcode installer.
as should be in /usr/bin/:
ls -l /usr/bin/as
If not, you probably have a problem with your Xcode installation.
Otherwise, also check your PATH environment variable, to ensure /usr/bin/ is in the list.
echo $PATH

If you've installed Xcode 4.3, it doesn't install the command line tools anymore. To get them, you have to launch Xcode, go to Xcode > Preferences... > Downloads tab, then click the 'Download' button for 'Command Line Tools'. You'll need to sign in with an Apple Developer ID.

Using Xcode 4.6 with Command Line Utilities installed
export PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH
as will execute along with the other command line utilities.

Related

-bash : rvictl: command not found, Mac book pro OS X 10.7.5 & Xcode 4.6

I want to debug some network bug with my application ,I found a way to create rvi to trace, But I even can't finish step 1 :
rvictl -s
-bash : rvictl: command not found
what should I do ?
I follow the site:
https://developer.apple.com/library/mac/qa/qa1176/_index.html
help! thanks
Mavericks and beyond: You need to install XCode from the App Store, and then you need to launch XCode once, and accept installation of additional tools. Restart your terminal. Good to go.
I found the solution here.
In summary, the link above explains that the issue may stem from installing Xcode without installing the additional components.
Check rvictl is installed by looking for the /usr/bin/rvictl folder. If it does not exist, then rvictl is not installed. To install the packages, open your application folder through finder, right click on the Xcode app, and follow the path below to find the items which need to be installed manually:
Xcode.app/Contents/Resources/Packages/MobileDevice.pkg
Xcode.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg
Restart your terminal and.... Voila !! it should work now.
CATALINA UPDATE.
Based #KarthicRaghupathi's comments. the rvictl location was changed in Catalina. The rvictl file is now located at /Library/Apple/usr/bin.
The rest of the process stays the same as above.
I'm using macOS Catalina and Xcode 11, Could able to find rvictl file in /Library/Apple/usr/bin. but still got the same error
-bash : rvictl: command not found
Tried all provided solution nothing worked for me. Adding sudo saved me,
sudo rvictl -s [DEVICE UDID]
[or]
sudo /Library/Apple/usr/bin/rvictl -s [DEVICE UDID]
This may help some one.
You need to install the Command Line Tools for Xcode, available here:
https://developer.apple.com/downloads/index.action?name=for%20Xcode%20-#
That includes the rvictl program.
It seems like default location and installed location of rvictl on Catalina are different.
rvictl should be installed by Xcode. Look for it at path: /Library/Apple/usr/bin/rvictl. The default shell has /Library/Apple/usr/bin/ in its path, either customise it or provide full qualified path i.e
/Library/Apple/usr/bin/rvictl -s 00008020-XXXXXXXXXXXXXXXX
Source: https://forums.developer.apple.com/message/392193#392193
When you say: the command line tools for 10.10 apparently do not include the rvictl program - I get the error message: command not found
You need to see the comment above: Mavericks and beyond: You need to install XCode from the App Store, and then you need to launch XCode once, and accept installation of additional tools. Restart your terminal.
It will then appear.

xcodebuild and C standard library

I have a xcode project that was created for osx snow leopard. All it was required to be built was to run
xcodebuild
from the command prompt. I am now trying to build the same project on OS X 10.7 and the following error happens when I run the same command
/Users/repo/trunk/main.c:31:10: fatal error: 'stdlib.h' file not found
What exactly is going on? I tried to follow the instructions from this question but stdlib.h is still missing.
How can I fix this problem?
Likely you are getting bit by the repackaging of everything inside /Applications/Xcode.app starting with Xcode 4.3. In Unix-like installations stdlib.h usually lives in /usr/include and your project likely expects it to be there as it was pre-Xcode 4.3. You can fix this by installing the command line tools, which includes the tools and the associated headers and libraries in their standard location.
The easiest way to install the command line tools is from inside Xcode. In the Xcode Preferences select the "Downloads" pane and then the "Components" tab. Push the "Install" button next to "Command Line Tools".
You need to run xcode-select to tell xcodebuild and xcrun which Xcode you want to use.
See this manpage.

No Make or GCC on my OSX

I'm new with OSX. When I open a terminal I don't have make or gcc; however I have installed xcode so from what I have read they should by somewhere on the OS.
What should I do?
Go to the Apple Developer website, log in and then look for "Command Line Development Tools". They should be found at https://developer.apple.com/downloads.
Logging in is important as you need to do this to get access to these specific tools.

/usr/bin/make not found in Xcode

I recently installed Xcode 3.2.6 on my Mac, but after the program is ready to build it posts an "error: can't exec '/usr/bin/make' (No such file or directory)." I've seen the file, which is located in the folder for Xcode, but i don't know how to refer the program to it. Does anybody know the problem and how to fix it?
Try installing command line tools:
XCode > Preferences > Downloads > Components > command line tools.
Have you rebooted? Xcode 3 in particular is very fussy about finding its tools if you don't reboot after install.

Where is gcc on OSX? I have installed Xcode already

I have installed Xcode from the Tool cd, I thought that would let me use gcc from the command line but I can't find it.
What am I missing
EDIT
When I wrote I can't find it I meant "I look for it using which gcc"
If gcc would have been in the PATH in first place, which would have find it.
Since gcc is not in the PATH ( that's what brought me here in first place ) which won't find it!
I think that was obvious but I'm making the note here because it wasn't
As of version 4.3.1, XCode is now an application and the command line tools are now available through the Preferences (this is documented in the App Store for XCode under 'What's New in Version 4.3.1' if you click 'More...'). After installing XCode, open it, open the Preferences and click on the Download tab. Click on 'install' for the 'Command Line Tools' and then sign in with your computer's password. The code will then be downloaded and installed.
You didn't check the box that says "UNIX Development Support"[1] (or possibly you unchecked it; I can't remember if it's on by default or not) when you did the install, so it didn't install the necessary symlinks and drivers in /usr/bin/.
Reinstall, and make sure to read the descriptions of the configuration options and select the ones that you need.
1: "Optional content to allow command-line development from the boot volume. Installs a duplicate of the GCC compiler and command line tools blah blah blah..."
Something went wrong with your install.
gcc is installed under /usr/bin with a symlink to gcc-4.2:
cd diciu$ pkgutil --file-info /usr/bin/gcc-4.2
volume: /
path: /usr/bin/gcc-4.2
pkgid: com.apple.pkg.gcc4.2Leo
pkg-version: 4.2.0.9000000000.1.1249367152
[..]
pkgid: com.apple.pkg.Xcode3.2.1Update
pkg-version: 1.0.1.1249367152
[..]
pkgid: com.apple.pkg.Xcode3.2.1UpdateUNIXDevSupport
pkg-version: 1.0.1.1249367152
[..]
On my Mac $ which gcc displays /usr/bin/gcc.
Xcode 4.3+ you need to install 'Command Line Tools for Xcode' found here: https://developer.apple.com/downloads
Is it possible that rather than not having gcc installed, your $PATH variable is messed up? first check if gcc is in /usr/bin manually. Then echo $PATH...
The same thing happened to me. It worked for a while and then went away. Reinstall and it will be fixed.
You might want to download Xcode from Apple while you are at it. Almost guaranteed to be fresher / more up-to-date since Xcode is rapidly updated. Current Xcode is 3.2.1.10. You need an Apple ID to download, but that also gives you access to the development site. All free... .
It is 1/6/2014. Current Xcode is 5.0.1
It is 2016 -- Current Xcode is 8.0. I think this question should be closed now.
Yes, try to install 'command line tools' by clicking Preferences-Downloads-command line tools.

Resources