FS#12659 - RBUtilqt: Lets devices be detected on Mac OS X

Attached to Project: Rockbox
Opened by Eric Le Lay (elelay) - Sunday, 29 April 2012, 08:36 GMT
Last edited by Dominik Riebeling (bluebrother) - Thursday, 03 April 2014, 18:57 GMT
Task Type Patches
Category Rbutil
Status Closed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Release 3.10
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I'm on Mac OSX 10.6.8.
Before these patches I was not able to use Rockbox Utility to install Rockbox on my Sansa Clip+.
It seems to be because the code uses an API not available on 10.6.
I'm attaching the patches in hope that it will lead to a proper solution (I've just overriden calls with the new calls, but this makes the utility incompatible with Mac OS X 10.4 ; there must be a way using conditional preprocessor sections).
This task depends upon

Closed by  Dominik Riebeling (bluebrother)
Thursday, 03 April 2014, 18:57 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Pretty much the same changes as posted have been done recently. Also, support for targeting 64bit is now included. Sorry, lost track of this still being open.
Comment by Dominik Riebeling (bluebrother) - Sunday, 29 April 2012, 13:04 GMT
Can you please explain the problem you're trying to solve, and if possible a system trace that shows it?

1. Using 10.6 headers will break all older versions, and I have no problems using the code as it is right now (i.e. the current IOKit includes). What makes you believe that the new ones are needed?
2. PBHGetVolParmsSync is present in my 10.6 SDK headers. It's marked as deprecated, but why do you think you can't use it?

Furthermore, the Clip+ uses the AMS bootloader installation method which doesn't use Utils::filesystemName() so I don't understand why you shouldn't be able to use Rockbox Utility for installing on the Clip+. Or is your problem merely you not being able to build Rockbox Utility? Which version of XCode are you using? I'm on 10.6.8 myself and don't have any problems (using XCode 3)
Comment by Eric Le Lay (elelay) - Wednesday, 02 May 2012, 19:16 GMT
Yes, I should have started with that.
At the time I got my Clip+ (in March), RBUtilQt would not let me install Rockbox on my CLIPZ. I always got errors about the Mount point (can't remember which message now) in the autodection or even manual selection.
So I installed RB manually, no problem.
When I set to it, I downloaded the code, used Qt from Macports, wasn't able to compile with XCode 3.2.6, messed with things until it compiled.
Without 0002-use-new-10.5-or-later-call-to-get-volume-details.patch I got the same error messages in the setup window of rbutilqt, with the patch I didn't get error messages.

Now I can't reproduce the problem with the published RBUtilQT 1.2.13 (I updated to the latest version in between, could it be that ?).
Comment by Eric Le Lay (elelay) - Wednesday, 02 May 2012, 19:22 GMT
oh dear, did I say clip+ ? I mean Clip ZIP !
Comment by Eric Le Lay (elelay) - Wednesday, 02 May 2012, 19:34 GMT
I've been compiling for x86_64 only, and HParamBlockRec is not available for 64 bit applications, dixit apple (
Here is the output error without the patch :
/usr/bin/g++-4.2 -c -pipe -g -gdwarf-2 -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.6 -arch i386 -Wall -W -isysroot /Developer/SDKs/MacOSX10.6.sdk -DDBG -DRBUTIL -D_LARGEFILE64_SOURCE -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/opt/local/share/qt4/mkspecs/macx-g++ -I. -Ibuild/moc -I. -Iirivertools -Izlib -Ibase -Izlib -Igui -I../ipodpatcher -I../sansapatcher -I../../tools/rbspeex -I../../tools -I/usr/local/include -I/opt/local/include/QtGui -I/opt/local/include/QtNetwork -I/opt/local/include/QtCore -I/opt/local/include -Ibuild/ui -o build/o/utils.o base/utils.cpp
base/utils.cpp: In static member function ‘static QString Utils::filesystemName(QString)’:
base/utils.cpp:161: error: ‘HParamBlockRec’ was not declared in this scope
base/utils.cpp:161: error: expected `;' before ‘hpb’
base/utils.cpp:162: error: ‘hpb’ was not declared in this scope
base/utils.cpp:167: error: ‘PBHGetVolParmsSync’ was not declared in this scope
lipo: can't open input file: /var/folders/+Y/+Yyb3hqmGZOK9EZLoa0lc++++TI/-Tmp-//ccTBNRkA.out (No such file or directory)
make: *** [build/o/utils.o] Error 1

You can ignore it since you build universal/32bits I suppose.
Comment by Dominik Riebeling (bluebrother) - Thursday, 03 May 2012, 17:58 GMT
For the mountpoint errors: this is a different bug that has been fixed in current git (but it's still present in 1.2.13). However, this problem only occurs if you never selected a mountpoint, and you can work around that by selecting a different mountpoint first.

For building as 64bit application only: ok, now I understand the problem :) Currently we're still building as 32bit only application (since we still support OS X 10.4) so this isn't an issue right now.