Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Oct 2019
    Location
    Berlin
    Posts
    10

    Lightstreamer support for ARM macOS

    I am encountering linking errors when building macOS 11 apps/frameworks which use the Lightstreamer dynamic libraries. The exact error I get in the Xcode 12.2 build is:

    ld: warning: ignoring file /Users/.../Library/Developer/Xcode/DerivedData/.../Build/Products/Release/Lightstreamer_macOS_Client.framework/Lightstreamer_macOS_Client, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
    Undefined symbols for architecture arm64:
    "_OBJC_CLASS_$_LSLightstreamerClient", referenced from:
    objc-class-ref in StreamerLowlevelTests.o
    objc-class-ref in IG.o
    "_OBJC_CLASS_$_LSSubscription", referenced from:
    objc-class-ref in StreamerLowlevelTests.o
    objc-class-ref in IG.o

    The error references some of my test files, but if I understand it correctly, Xcode cannot link to the binary framework due to incompatibilities between the app architecture (arm64) and the dynamic library architecture (x86_64).

    I am trying to find solutions by tweaking my Swift Package Manifest and using Rosetta 2 for emulation. So far I am unsuccessful, but I am trying to contact people on the Swift forums. I will post any solution I find here. It would save me a lot of pain, though; if Lightstreamer would just release their dynamic libraries with both x86_64 and arm64 as fat binaries. Lightstreamer already does this with iOS and tvOS, so I don't think it would be much more than a recompile with the new Xcode toolchain from your side.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello dehesa,

    To provide support for arm64 architecture on macOS for our client library, we depend on the same support from J2ObjC. At the moment it is not yet available, but I'm sure they are working on it.

    As a temporary workaround, you can exclude the arm64 architecture from the build settings of your macOS target. Follow these steps:
    - Go to Build Settings.
    - Open Architectures (the first group).
    - Open the Excluded Architectures subgroup.
    - Add a line for Debug.
    - Select "Any SDK" and enter "arm64" as the setting value.
    - Add a line for Release.
    - Select "Any SDK" and enter "arm64" as the setting value.

    This should fix the build errors, but of course it will also exclude support for ARM processors from your target. It will still run on ARM Macs through Rosetta, though.

    As soon as J2ObjC provides support for the arm64 architecture, we will add it to our client library.

  3. #3
    Member
    Join Date
    Oct 2019
    Location
    Berlin
    Posts
    10
    Hi Gianluca,

    Thank you for the response and indications. I am aware of those project settings; however things get a bit more complicated when you are delivering frameworks through SPM (which is my case). I am currently solving the issue through compiler directives and telling/forcing my clients to not use arm64 binaries, but this is obviously not ideal. Hopefully J2ObjC provides support soon or you find other ways to compile for arm64.

    Regards.

 

 

Similar Threads

  1. MacOS 2.1.2 client creating too many threads?
    By hpang in forum Client SDKs
    Replies: 3
    Last Post: September 19th, 2017, 08:14 PM
  2. LightStreamer with AMF object support
    By sachinpatel2 in forum Client SDKs
    Replies: 1
    Last Post: September 10th, 2010, 11:01 AM
  3. Client side publish support
    By pacesie in forum General
    Replies: 1
    Last Post: March 26th, 2008, 10:01 AM
  4. JMX support for more detailed monitoring ?
    By rsouissi in forum General
    Replies: 1
    Last Post: May 30th, 2007, 05:15 PM
  5. Blackberry Support
    By ratsey in forum Client SDKs
    Replies: 3
    Last Post: April 20th, 2007, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 06:21 AM.