ieee8023 / blucat

Blucat (netcat for Bluetooth)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

blucat doctor crashes on OS X 10.11 El Capitan

ilovezfs opened this issue · comments

iMac-TMP:homebrew-core joe$ blucat doctor
dyld: lazy symbol binding failed: Symbol not found: _IOBluetoothLocalDeviceReadSupportedFeatures
  Referenced from: /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/bluecove_joe_0/libbluecove.jnilib
  Expected in: /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth

dyld: Symbol not found: _IOBluetoothLocalDeviceReadSupportedFeatures
  Referenced from: /private/var/folders/w6/9r0nb9011glb8fdz__srd78c0000gq/T/bluecove_joe_0/libbluecove.jnilib
  Expected in: /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth

/usr/local/Cellar/blucat/0.9/libexec/blucat: line 43: 52388 Trace/BPT trap: 5       java -cp $COMMONLIBS:$LIBS blucat.Main $@ 2> >(grep --line-buffered -v NSAutoreleaseNoPool >&2)

But it should be fixable

iMac-TMP:homebrew-core joe$ nm /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth|grep LocalDev
000000000007707f T _IOBluetoothLocalDeviceAvailable
0000000000076ae8 T _IOBluetoothLocalDeviceGetConfigState
0000000000012443 T _IOBluetoothLocalDeviceGetPowerState
00000000000770fe T _IOBluetoothLocalDeviceGetUSBProductID
000000000007718f T _IOBluetoothLocalDeviceGetUSBVendorID
0000000000077edb T _IOBluetoothLocalDeviceReadName
0000000000076ab0 T _IOBluetoothLocalDeviceSetDiscoverable
00000000000123d4 T _IOBluetoothLocalDeviceSetPowerState
0000000000012329 T _IOBluetoothLocalDeviceSupportsPowerOff

yet

iMac-TMP:homebrew-core joe$ nm /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth|grep Features
0000000000065c55 t -[BroadcomHostController BluetoothHCIBroadcomBFCReadRemoteBPCSFeatures:outBPCSFeatures:]
0000000000067e3a t -[BroadcomHostController BluetoothHCILEBroadcomEnableCustomerSpecificFeatures:outLEextOpcode:]
0000000000074aa9 t -[IOBluetoothHandsFree deviceSupportedFeatures]
0000000000074ab9 t -[IOBluetoothHandsFree setDeviceSupportedFeatures:]
0000000000070ba2 t -[IOBluetoothHandsFree setSupportedFeatures:]
00000000000749ed t -[IOBluetoothHandsFree supportedFeatures]
000000000005535d t -[IOBluetoothHandsFreeAudioGateway sendSupportedFeatures:]
0000000000062234 t -[IOBluetoothHostController BluetoothHCIBroadcomBFCReadRemoteBPCSFeatures:outBPCSFeatures:]
0000000000062373 t -[IOBluetoothHostController BluetoothHCILEBroadcomEnableCustomerSpecificFeatures:outLEextOpcode:]
0000000000060d24 t -[IOBluetoothHostController BluetoothHCILEReadLocalSupportedFeatures:]
000000000006164d t -[IOBluetoothHostController BluetoothHCILEReadRemoteUsedFeatures:]
000000000005fc62 t -[IOBluetoothHostController BluetoothHCIReadLocalExtendedFeatures:outMaximumPageNumber:outExtendedLMPFeatures:]
000000000005fb58 t -[IOBluetoothHostController BluetoothHCIReadLocalSupportedFeatures:]
000000000005866b t -[IOBluetoothHostController BluetoothHCIReadRemoteExtendedFeatures:inPageNumber:outReadRemoteExtendedFeaturesCompleteResults:]
00000000000584c7 t -[IOBluetoothHostController BluetoothHCIReadRemoteSupportedFeatures:outReadRemoteSupportedFeaturesCompleteResults:]
0000000000061bd6 t -[IOBluetoothHostController supportedFeatures]
0000000000074e1c t -[IOBluetoothSDPServiceRecord(HandsFreeSDPServiceRecordAdditions) handsFreeSupportedFeatures]
00000000000c9830 S _OBJC_IVAR_$_IOBluetoothHandsFree._deviceSupportedFeatures
00000000000c97f8 S _OBJC_IVAR_$_IOBluetoothHandsFree._supportedFeatures

I updated the launcher script to assume that OSX 15 is just like OSX 14 572dfc8 . Are you able to test if it works? I think I can also just submit a pull request to homebrew to have it test on OSX 15 right?

Yes I can test it. The most important thing will be a new tag, though.

@ieee8023 Yup it works:

iMac-TMP:~ joe$ brew install --HEAD -vd blucat
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Taps/homebrew/homebrew-core/Formula/blucat.rb
/usr/local/Library/brew.rb (Formulary::FormulaLoader): loading /usr/local/Library/Taps/homebrew/homebrew-core/Formula/ant.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /usr/local/Library/Taps/homebrew/homebrew-core/Formula/blucat.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Taps/homebrew/homebrew-core/Formula/ant.rb
/usr/local/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Library/Taps/homebrew/homebrew-core/Formula/git.rb
==> Cloning https://github.com/ieee8023/blucat.git
git clone --depth 1 --branch master https://github.com/ieee8023/blucat.git /Users/joe/Library/Caches/Homebrew/blucat--git
Cloning into '/Users/joe/Library/Caches/Homebrew/blucat--git'...
remote: Counting objects: 71, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 71 (delta 2), reused 66 (delta 2), pack-reused 0
Unpacking objects: 100% (71/71), done.
Checking connectivity... done.
git config homebrew.cacheversion 0
==> Checking out branch master
git checkout -f master --
Already on 'master'
Your branch is up-to-date with 'origin/master'.
==> ant
Buildfile: /private/tmp/blucat-20160501-52667-1mv8cmf/build.xml

build-subprojects:

init:
    [mkdir] Created dir: /private/tmp/blucat-20160501-52667-1mv8cmf/bin

build-project:
     [echo] blucat: /private/tmp/blucat-20160501-52667-1mv8cmf/build.xml
    [javac] Compiling 16 source files to /private/tmp/blucat-20160501-52667-1mv8cmf/bin
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: /private/tmp/blucat-20160501-52667-1mv8cmf/src/com/intel/bluetooth/MicroeditionConnector.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 1 warning

build:

jar:
      [jar] Building jar: /private/tmp/blucat-20160501-52667-1mv8cmf/build/blucat.jar

BUILD SUCCESSFUL
Total time: 0 seconds
==> Cleaning
Fixing /usr/local/Cellar/blucat/HEAD/bin/blucat permissions from 644 to 555
==> Finishing up
ln -s ../Cellar/blucat/HEAD/bin/blucat blucat
Changing dylib ID of /usr/local/Cellar/blucat/HEAD/libexec/lib/IOBluetooth
  from /System/Library/Frameworks/IOBluetooth.framework/Versions/A/IOBluetooth
    to /usr/local/opt/blucat/libexec/lib/IOBluetooth
==> Summary
🍺  /usr/local/Cellar/blucat/HEAD: 32 files, 9.9M, built in 8 seconds
iMac-TMP:~ joe$ brew test blucat
Testing blucat
==> Using the sandbox
==> /usr/local/Cellar/blucat/HEAD/bin/blucat doctor
iMac-TMP:~ joe$ brew test -v blucat
Testing blucat
==> Using the sandbox
/usr/bin/sandbox-exec -f /tmp/homebrew20160501-52873-1e8nzb7.sb /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -W0 -I /usr/local/Library/Homebrew -- /usr/local/Library/Homebrew/test.rb /usr/local/Library/Taps/homebrew/homebrew-core/Formula/blucat.rb -v --HEAD
==> /usr/local/Cellar/blucat/HEAD/bin/blucat doctor
 BlueCoveState
  ThreadBluetoothStackID = mac
  CurrentThreadBluetoothStackID = mac
  LocalDevicesID = []
 BlueCoveConfigProperties
  PROPERTY_DEBUG = null
  PROPERTY_DEBUG_STDOUT = null
  PROPERTY_DEBUG_LOG4J = null
  PROPERTY_STACK = mac
  PROPERTY_STACK_FIRST = null
  PROPERTY_NATIVE_RESOURCE = null
  PROPERTY_NATIVE_PATH = null
  PROPERTY_BLUEZ_CLASS = null
  PROPERTY_LOCAL_DEVICE_ID = null
  PROPERTY_LOCAL_DEVICE_ADDRESS = null
  PROPERTY_EMULATOR_CLASS = null
  PROPERTY_EMULATOR_HOST = null
  PROPERTY_EMULATOR_PORT = null
  PROPERTY_EMULATOR_RMI_REGISTRY = null
  PROPERTY_CONNECT_TIMEOUT = null
  PROPERTY_CONNECT_UNREACHABLE_RETRY = null
  PROPERTY_INQUIRY_DURATION = null
  PROPERTY_INQUIRY_DURATION_DEFAULT = null
  PROPERTY_INQUIRY_REPORT_ASAP = null
  PROPERTY_OBEX_MTU = null
  PROPERTY_OBEX_TIMEOUT = null
  PROPERTY_JSR_82_PSM_MINIMUM_OFF = null
  PROPERTY_SDP_STRING_ENCODING_ASCII = null
  PROPERTY_ANDROID_CONTEXT = null
  PROPERTY_ANDROID_DISCOVERABLE_DURATION = null
  PROPERTY_ANDROID_OBEX_UUIDS = null
 LocalDeviceProperties
  bluetooth.api.version = 1.1.1
  bluetooth.master.switch = false
  bluetooth.sd.attr.retrievable.max = 256
  bluetooth.connected.devices.max = 7
  bluetooth.l2cap.receiveMTU.max = 65535
  bluetooth.sd.trans.max = 7
  bluetooth.connected.inquiry.scan = true
  bluetooth.connected.page.scan = true
  bluetooth.connected.inquiry = true
  bluetooth.connected.page = true
  LOCAL_DEVICE_PROPERTY_BLUECOVE_VERSION = 2.1.1-SNAPSHOT
  LOCAL_DEVICE_PROPERTY_STACK = mac
  LOCAL_DEVICE_PROPERTY_STACK_VERSION = 10.0.8 rev 2
  LOCAL_DEVICE_PROPERTY_FEATURE_L2CAP = true
  LOCAL_DEVICE_PROPERTY_FEATURE_SERVICE_ATTRIBUTES = true
  LOCAL_DEVICE_PROPERTY_FEATURE_SET_DEVICE_SERVICE_CLASSES = false
  LOCAL_DEVICE_PROPERTY_FEATURE_RSSI = false
  LOCAL_DEVICE_PROPERTY_OPEN_CONNECTIONS = 0
  LOCAL_DEVICE_PROPERTY_DEVICE_ID = null
  LOCAL_DEVICE_DEVICES_LIST = null
  LOCAL_DEVICE_RADIO_VERSION = LMP Version: 8.14, HCI Version: 0.11456
  LOCAL_DEVICE_RADIO_MANUFACTURER = 2
 LocalDeviceFeatures
  FEATURE_L2CAP = true
  FEATURE_SERVICE_ATTRIBUTES = true
  FEATURE_SET_DEVICE_SERVICE_CLASSES = false
  FEATURE_RSSI = false
  FEATURE_ASSIGN_SERVER_PSM = false

I don't see anything wrong
iMac-TMP:~ joe$

I'll close Homebrew/homebrew-core#744 and open a new PR for you, if you don't mind creating a new tag here?

Ah I see you've already beat me to the punch with a tag. Awesome!

@ieee8023 Any known issues with > Java 1.6? The preexisting formula was pegged to that version for some reason but I have no idea why.

@ilovezfs I think it was pegged just to be safe. It works fine on 1.8. I think that restriction can be removed.

What's your preferred homepage? And would you like a --HEAD option available or not?

Homepage: http://blucat.sourceforge.net/blucat/

So with --HEAD it will make it so I can update the release tag and it will update the installed versions?

By default when a user does --build-from-source it will build from the same tag as the current stable spec. If head is defined, then they can pass --HEAD and it will build from the tip of tree on GitHub instead.

There's no automatic mechanism for bumping formulae tags without going through a PR, but we do now have this so that people can automate on their own if desired (or just to use manually if you'd like):
Homebrew/legacy-homebrew#49848
https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb

Thanks for explaining that. I think the --HEAD option sounds good to enable.

Great, look all right?

diff --git a/Formula/blucat.rb b/Formula/blucat.rb
index fbd262b..93d6278 100644
--- a/Formula/blucat.rb
+++ b/Formula/blucat.rb
@@ -1,12 +1,12 @@
 class Blucat < Formula
   desc "netcat for Bluetooth"
   homepage "http://blucat.sourceforge.net/blucat/"
-  url "http://blucat.sourceforge.net/blucat/wp-content/uploads/blucat-aa3e02.zip"
-  version "0.9"
-  sha256 "6dcd6bf538a06c2f29d21a9e94d859d91667a7014244462bffca9767bba5307d"
+  url "https://github.com/ieee8023/blucat/archive/v0.91.tar.gz"
+  sha256 "3e006d25b7e82689826c89ffbbfa818f8b78cced47e6d0647e901578d330a2f4"
+  head "https://github.com/ieee8023/blucat.git"

   depends_on "ant" => :build
-  depends_on :java => "1.6"
+  depends_on :java

   def install
     system "ant"

Looks good. Thanks!

Here we go: Homebrew/homebrew-core#746

Thanks so much for fixing it!