running ocaml on Mac OS X gives bus error - macos

I've just installed Ocaml on Mac OS X, and when I run the ocaml program I get a "Bus Error" with no other clues to what might be going on. Can anyone offer suggestions on where to go from here?
EDIT:
I installed via the package:
http://caml.inria.fr/pub/distrib/ocaml-3.10/ocaml-3.10.2-ppc.dmg
(I have an iBook G4, so PPC is appropriate)
To run ocaml, I just typed:
ocaml
in a terminal window
I also tried
/usr/local/bin/ocaml
and running from an xterm window. All three give:
Bus Error
I have Xcode and X11 installed as the README requires.

Turns out I was installing a version of OCaml built for Mac OS X 10.5.x (Leopard) on my machine running 10.4.x (Tiger). One would think it would be easy for the installer to catch this, but alas...

Did you install it from macports? It's working fine for me. Can you describe some more details about your installation? Perhaps what you're doing to get the error?

Related

How to install wxPython on Mac OS 10.8 using MacPorts?

I would like to install wxPython on Mac OS 10.8 using MacPorts. So for I have run into errors. Using pip didn't work because of errors. There are a lot of packages in MacPorts that are related to wxPython. The trick is finding one that works on my version of Mac OS. Hopefully someone knows the right formula.
You've already found that there are several wxPython-related ports in MacPorts:
$ port echo name:wxp
py-wxpython-3.0
py-wxpython-4.0
py27-wxpython-3.0
py27-wxpython-4.0
py35-wxpython-4.0
py36-wxpython-4.0
py37-wxpython-4.0
py38-wxpython-4.0
py39-wxpython-4.0
wxPython-3.0
Looks like if you want wxPython 3, your only option is to sudo port install py27-wxpython-3.0 which is for Python 2.7. If you want wxPython 4, you can pick which version of Python 2.7 or 3.x you want.
OS X 10.8 is very old, so there is a possibility that these or any other ports in MacPorts will not work on it. You can look up ports in the ports web site and check to see if they built successfully on the automated build system.
For example, as of this writing, py39-wxpython-4.0 built successfully on OS X 10.11 and later but not on 10.10 or earlier. That information could be outdated. You can always try installing the port yourself to see what happens. If you encounter a build failure, please report it to MacPorts so that it can hopefully be fixed.

How to install MATLAB 2012b Mac OSX 10.9.2?

I'm trying to install MATLAB 2012b on my mac OSX 10.9.2 but when I run the installer I get the message:
"You can’t open the application “InstallForMacOSX” because PowerPC
applications are no longer supported".
Is there anyway I could install the software?
Try to install XQuartz. Upgrading to Matlab R2014a will not do the trick, because you will have to go through the same process (however, Matlab 2013a does not need XQuartz installed strangely enough).

Invoke Mac Kernel Panic?

So i am lookin for some source code to crash the mac kernel. I found crashme for debain linux but that does not work for the mac kernel. So i was wondering if anyone knows where i can find a command-line utility or some source code to invoke the mac kernel panic? This would be a huge help, thanks.
Apple has a tech note about how to do this.
The short way to do it is with this command, sudo dtrace -w -n "BEGIN{ panic();}", run from the terminal.
Update 2020: As noted by Wei Shen in the comments, you'll need to disable SIP to make this work in modern versons of macOS.
I recently updated crashme to work on Mac OS X Lion. You will need to download the source code from http://crashme.codeplex.com/ and compile it using Xcode command line tools. More details are in a answer to question 5085136. But note that crashme hasn't found any immediate kernel panics on the Mac yet. However, after running crashme on the native MacBook Pro, and running it in VirtualBox VM's on the same machine, one in an x86 PC-BSD and another in an x64 Centos, my Lion Kernel became unhappy enough that it threw a kernel panic a few minutes later as I was editing a file using the native Emacs. So crashme may have stumbled upon a kernel bug.
Go in terminal and type "killall kernel_task" it should force the computer into a panic without downloading any software. Just make sure you have everything saved before you try :D
although this requires a password it works every time
sudo halt

Debugging ppc binary on OS X 10.6 — gdb error: Don't know how to run

I have an old PowerPC Binary which runs on my system (Snow Leopard intel) using Rosetta. I wanted to debug the binary using GDB, however it tells me that it doesn't know how to run it. I think this may be because GDB only supports x86 binaries? I'm using the gdb which is supplied with the XCode environment supplied with the Mac OS X CD.
I searched and found one person with the same issue, but no answers. Do I have to install a special gdb?
gdb on OS X is actually a wrapper script which gives you options to run gdb itself under Rosetta.
Try something like gdb --translate --arch ppc .... (I don't have Rosetta installed here and don't want to install it, so I can't test it easily.)
The only sensible solution I could think about might be GDB for CW.
I doubt it is still worthwhile, though.

confused about macports

I am using MacBook Pro Mac OS 10.5 with related version of XCode. I am new to this development environment. I am learning macports, and I read information about macports from http://www.macports.org/. But I am still confused what macports is after reading information from this site.
I am previous working on Windows and Linux, could anyone let me know what macports is (in easy words) and what is the similar item on Windows/Linux?
thanks in avdance,
George
macports is a way of getting executables and other compiled code installed on your computer without having to work out the details of compiling/linking each apllication.
It is equivalent to a package manager under Linux and other Unicies. There is no direct equivalent under Windows.
It is just a convenient way to install a lot of *nix soft on your mac book. They are installed separately (not overwriting) from binaries/daemons/libs already installed on your mac (by default in folder /opl/local). Also they are much fresher than those installed on your mac.
For example 10.6 ships with bash 3.2, but after running sudo port install bash, you will get version 4.x (to make it your default shell add /opt/local/bin/bash to file /private/etc/shells, run chsh -s /opt/local/bin/bash and reopen terminal).
Note other os x package managers: fink and homebrew (superuser question)

Resources