JavaLaurence Geschrieben January 23, 2013 at 18:13 Geschrieben January 23, 2013 at 18:13 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 Zitieren
borg Geschrieben January 23, 2013 at 19:05 Geschrieben January 23, 2013 at 19:05 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 . Zitieren
JavaLaurence Geschrieben January 23, 2013 at 19:11 Autor Geschrieben January 23, 2013 at 19:11 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$ Zitieren
borg Geschrieben January 23, 2013 at 19:32 Geschrieben January 23, 2013 at 19:32 I am no OS X expert. I will have to ask my collegue tomorrow morning, perhaps he has an idea. Sorry for the problems! Zitieren
photron Geschrieben January 24, 2013 at 10:56 Geschrieben January 24, 2013 at 10:56 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? Zitieren
JavaLaurence Geschrieben January 24, 2013 at 17:50 Autor Geschrieben January 24, 2013 at 17:50 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.. :-( Zitieren
JavaLaurence Geschrieben January 24, 2013 at 18:35 Autor Geschrieben January 24, 2013 at 18:35 BTW, is the source of brickd open source? If so, where can I have a look at it? Maybe I can find the problem.. Zitieren
borg Geschrieben January 24, 2013 at 18:44 Geschrieben January 24, 2013 at 18:44 Everything we do is Open Source, you can find everything at github: https://github.com/Tinkerforge The Brick Daemon code is here: https://github.com/Tinkerforge/brickd/tree/master/src/brickd Did you try the new .dmg that photron made? Zitieren
JavaLaurence Geschrieben January 24, 2013 at 18:54 Autor Geschrieben January 24, 2013 at 18:54 I tried it. Same result. Looking at the source now.. Zitieren
JavaLaurence Geschrieben January 24, 2013 at 19:02 Autor Geschrieben January 24, 2013 at 19:02 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 ... ? Zitieren
borg Geschrieben January 24, 2013 at 19:25 Geschrieben January 24, 2013 at 19:25 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 Zitieren
JavaLaurence Geschrieben January 24, 2013 at 19:34 Autor Geschrieben January 24, 2013 at 19:34 The MD5 match. But I'm afraid I'll leave it to TF to get your makefile fixed. I appreciate receiving email updates on this.. AFAIMK no point in continuing in this thread. Zitieren
photron Geschrieben January 25, 2013 at 19:08 Geschrieben January 25, 2013 at 19:08 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. Zitieren
JavaLaurence Geschrieben January 25, 2013 at 19:21 Autor Geschrieben January 25, 2013 at 19:21 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? Zitieren
borg Geschrieben January 25, 2013 at 20:17 Geschrieben January 25, 2013 at 20:17 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! Zitieren
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.