Jump to content

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


Recommended Posts

Geschrieben

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

 

Geschrieben

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 :).

Geschrieben

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$

 

 

Geschrieben

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?

Geschrieben

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.. :-(

Geschrieben

Can you please tell me what the file sizes and MD5 hashes are for the versions of brickd that I've got so far?

 

The file looks hopefully broken if it can't even run its main() entry point correctly.

 

Given that it crashes means that OS X views it as an executable, but apart from that ... ?

 

:(

Geschrieben

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

Geschrieben

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.

Geschrieben

:) It works. Thx for fixing this. I got all my Bricks & Bricklets flashed to 2.0, and everything apart from IR Distance seems to work OK. Will investigate the IR Distance further (calibration gone due to 1.0 -> 2.0 flashing?)

 

BTW, does step-down bricklet need flashing too?

Join the conversation

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

Gast
Reply to this topic...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   Du kannst Bilder nicht direkt einfügen. Lade Bilder hoch oder lade sie von einer URL.

×
×
  • Neu erstellen...