Opened 3 months ago

Closed 2 months ago

#70616 closed defect (fixed)

fastfetch: bluetooth* modules fail to build on 10.8–10.10: error: type arguments cannot be applied to non-parameterized class 'NSArray'

Reported by: barracuda156 Owned by: Sergey Fedorov <barracuda@…>
Priority: Normal Milestone:
Component: ports Version: 2.10.1
Keywords: mountainlion, mavericks, yosemite Cc: herbygillot (Herby Gillot)
Port: fastfetch

Description

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/dns/dns_linux.c
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetooth/bluetooth_apple.m:/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetoothradio/bluetoothradio_apple.m:7:5: error: type arguments cannot be applied to non-parameterized class 'NSArray'
    7 |     NSArray<IOBluetoothDevice*>* ioDevices = IOBluetoothDevice.pairedDevices;
      |     ^      ~~~~~~~~~~~~~~~~~~~~
13:5: error: type arguments cannot be applied to non-parameterized class 'NSArray'
   13 |     NSArray<IOBluetoothHostController*>* ctrls = IOBluetoothHostController.controllers;
      |     ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetoothradio/bluetoothradio_apple.m:55:27: error: no visible @interface for 'NSString' declares the selector 'containsString:'
   55 |             if ([services containsString:@" LEA "])
      |                  ~~~~~~~~ ^~~~~~~~~~~~~~
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetoothradio/bluetoothradio_apple.m:57:32: error: no visible @interface for 'NSString' declares the selector 'containsString:'
   57 |             else if ([services containsString:@" GATT "])
      |                       ~~~~~~~~ ^~~~~~~~~~~~~~
3 errors generated.
make[2]: *** [CMakeFiles/libfastfetch.dir/src/detection/bluetoothradio/bluetoothradio_apple.m.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetooth/bluetooth_apple.m:70:22: error: use of undeclared identifier 'kBluetoothDeviceClassMajorToy'; did you mean 'kBluetoothDeviceClassMajoToy'?
   70 |                 case kBluetoothDeviceClassMajorToy:
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      kBluetoothDeviceClassMajoToy
/System/Library/Frameworks/IOBluetooth.framework/Headers/BluetoothAssignedNumbers.h:157:2: note: 'kBluetoothDeviceClassMajoToy' declared here
  157 |         kBluetoothDeviceClassMajoToy                                                    = 0x08,         // [01000] Toy
      |         ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/bluetooth/bluetooth_apple.m:73:22: error: use of undeclared identifier 'kBluetoothDeviceClassMajorHealth'; did you mean 'kBluetoothDeviceClassMajoHealth'?
   73 |                 case kBluetoothDeviceClassMajorHealth:
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                      kBluetoothDeviceClassMajoHealth
/System/Library/Frameworks/IOBluetooth.framework/Headers/BluetoothAssignedNumbers.h:158:2: note: 'kBluetoothDeviceClassMajoHealth' declared here
  158 |         kBluetoothDeviceClassMajoHealth                                                 = 0x09,         // [01001] Health devices
      |         ^
3 errors generated.
make[2]: *** [CMakeFiles/libfastfetch.dir/src/detection/bluetooth/bluetooth_apple.m.o] Error 1
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_fastfetch/fastfetch/work/fastfetch-2.21.3/src/detection/cursor/cursor_apple.m:24:40: error: no known class method for selector 'dictionaryWithContentsOfURL:error:'
   24 |     NSDictionary* dict = [NSDictionary dictionaryWithContentsOfURL:[NSURL URLWithString:fileName]
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   25 |                                        error:&error];
      |                                        ~~~~~
1 error generated.
make[2]: *** [CMakeFiles/libfastfetch.dir/src/detection/cursor/cursor_apple.m.o] Error 1

https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/188185/steps/install-port/logs/stdio https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/287798/steps/install-port/logs/stdio https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/280452/steps/install-port/logs/stdio

Change History (5)

comment:1 Changed 3 months ago by barracuda156

I am not gonna try fixing anything for Intel systems, this port is already too complex, but perhaps we could adjust which modules we build. For example, Bluetooth stuff should be disabled not only for < 10.7, but for all < 10.11.

comment:2 Changed 2 months ago by herbygillot (Herby Gillot)

Unfortunately there doesn't look to be a configure flag that can be used to disable Bluetooth specifically.

comment:3 in reply to:  2 Changed 2 months ago by barracuda156

Replying to herbygillot:

Unfortunately there doesn't look to be a configure flag that can be used to disable Bluetooth specifically.

Yes, but we can do like I did for this and other modules in CMakeLists. The source has stubbed versions for unsupported modules, those should be used in place of native ones. I.e. we simply need to extract a part of already existing patch and use it for a wider scope of macOS versions.

comment:4 in reply to:  2 Changed 2 months ago by barracuda156

Replying to herbygillot:

Unfortunately there doesn't look to be a configure flag that can be used to disable Bluetooth specifically.

If updating to 2.22.0 works for me, I will adapt a patch for bluetooth handling.

comment:5 Changed 2 months ago by Sergey Fedorov <barracuda@…>

Owner: set to Sergey Fedorov <barracuda@…>
Resolution: fixed
Status: newclosed

In a98b390de4241fb0ad12621978983ded2d4c25f0/macports-ports (master):

fastfetch: update to 2.22.0 for legacy systems

Closes: #70616

Note: See TracTickets for help on using tickets.