Jump to content

brickd crashes on Mac OS X 10.7.5 [Segmentation 11, Illegal instruction: 4]


JavaLaurence

Recommended Posts

Got my gear unpacked, and trying to get things going for the very first time.. but brickd doesn't want to play ball.

 

After installing and checking with --version, I got a Segmentation fault. So I rebooted my Mac, thinking I'm probably to blame (hint), and tried again. Now I get Illegal instruction: 4.

 

Not so nice out-of-the-box behavior. What can I do to try to progress beyond this?

 

Thx!

 

  Laurence

 

Link to comment
Share on other sites

Mh, i am surprised that nobody ever had this problem, the Brick Daemon beta1 for Protocol 2.0 was available for quite some time.

 

The erorr means, that the binary contains instructions the version of  OS X that you want to run them under does not understand.

 

Unfortunately we only have OS X 10.8 here, according to google, one can fix this issue by compiling against older OS X SDK versions. I uploaded a .dmg that is compiled with -mmacosx-version-min=10.6:

 

http://download.tinkerforge.com/_stuff/brickd_macos_2_0_0_mmacosx_version_min106.dmg

 

Could you try that?

 

 

PS: You ordered the Bricks before Protocol 2.0 was released and got them after the release. That is a little bit unlucky, it means that you will have to update all of the Bricks and Bricklets. Just as a heads up :).

Link to comment
Share on other sites

Thx for the quick reply. Downloaded your other version.. but still no joy:

 

 

Laurence-Vanhelsuwes-iMac:libexec laurencevanhelsuwe$ cd brickd.app/

Laurence-Vanhelsuwes-iMac:brickd.app laurencevanhelsuwe$ cd Contents/

Laurence-Vanhelsuwes-iMac:Contents laurencevanhelsuwe$ cd MacOS/

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$ ls -l

total 352

-rwxr-xr-x@ 1 root  wheel  102192 Jan 23 20:08 brickd

-rwxr-xr-x@ 1 root  wheel  74156 Jan 23 20:08 libusb-1.0.0.dylib

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$ ./brickd --version

Illegal instruction: 4

Laurence-Vanhelsuwes-iMac:MacOS laurencevanhelsuwe$

 

 

Link to comment
Share on other sites

Even though our MacBook runs Mac OS X 10.8 the latest installed SDK is 10.6. So the original brickd 2.0.0 should just work on Mac OS X 10.6 and newer.

 

Here's a version explicitly compiled for SDK 10.5:

 

http://download.tinkerforge.com/_stuff/brickd_macos_2_0_0_mmacosx_version_min105.dmg

 

If this doesn't work either we need to look into more detail why it doesn't work for you. Do you have gdb installed (part of the Xcode commandline tools) an can get a backtrace of the segfault?

Link to comment
Share on other sites

I'm not familiar with any native Mac development, and I don't really fancy a dive into Apple's dev tools.

 

I think the most efficient way forwards is if we can work interactively, either via Skype, screen sharing, you name it. You're free to run gdb on my machine remotely.

 

One way or the other I'd like to get this problem solved ASAP, because I can't do absolutely anything with my gear.. :-(

Link to comment
Share on other sites

The problem has to do with the gcc configuration, with nearly 100% certainty. The code itself can't have an "illigal instruction". So you should look at the Makefile.

 

MD5s:

7fa9019d70248aff75bb554b417c5f97  brickd_macos_2_0_0_mmacosx_version_min106.dmg

b7840ebcf446b681020c743c7db5b923  brickd_macos_2_0_0_mmacosx_version_min105.dmg

Link to comment
Share on other sites

Okay, we obtained another Mac Book with Mac OS X 10.7.3 and were able to reproduce the segmentation and illegal instruction faults. A GDB backtrace is useless here because the errors occur before the main function is executed. So the problem is not in the C code, but in the way the binary is build.

 

I didn't figure out the real problem yet, but building the same unchanged source code using the same unchanged Makefile on Mac OS X 10.7.3 produces a binary that works.

 

Brick Daemon 2.0.1 was just released and is tested to work on Mac OS X 10.7.3 and 10.8.2. Therefore, it should work on your 10.7.5 too. Thanks for reporting this and sorry for the trouble.

Link to comment
Share on other sites

Step-Down Power Supply does not need flashing (it is completely analog). You can reflash the "voltage/distance mapping" of the Distance IR Bricklet if it got lost, thats no problem: http://www.tinkerforge.com/doc/Hardware/Bricklets/Distance_IR.html#voltage-distance-mappings

 

Good to hear that we got everything working and thank you for your help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...