Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

64 bit OS X support?

Avatar
RankRank

Total Posts: 40

Joined 2009-03-20

PM

The library in the ANT_Library_MacOSX_Package appears to only be compiled for 386 and PPC:

file BIN/libant.dylib 
BIN
/libant.dylibMach-O universal binary with 2 architectures
BIN
/libant.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc
BIN
/libant.dylib (for architecture i386): Mach-O dynamically linked shared library i386 


Are there any plans to release a 64-bit version?

     
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

The Mac OS X Library does support and compile in PPC64 and x86-64 (on our end at least), we will look into if that isn't being reported by the library properly.

Cheers      
Avatar
RankRank

Total Posts: 40

Joined 2009-03-20

PM

I'm just using the library from Python, so I would appreciate if you could ship a 64-bit compiled version of the library so I don't have to install compilers and head down that rabbit hole.

Regards,
Mark
markrages@gmail
.(JavaScript must be enabled to view this email address)      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

I need to check in with a colleague when they return to see when a new release could be cut, but it should be no longer than a couple weeks.

Best regards      
Rank

Total Posts: 5

Joined 2013-11-05

PM

Hi

I'm using Xcode 5 and can compile with "32-bit Intel" setting. But when I select "64-bit Intel" it fails with:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPlugInCOM.h:19:16: Typedef redefinition with different types ('UInt32' (aka 'unsigned int') vs 'unsigned long')      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Hi,

This indicates that a typedef "collision" has occurred in that the ANT Libraries and this Mac Library are defining different primitive types for "UInt32". You will have to modify the source code of either the external library or the ANT library to use the same primitive type, or re-name the typedef, etc.

Cheers      
Rank

Total Posts: 5

Joined 2013-11-05

PM

Thx!

Now the other error:

/.../ANT_Library_MacOSX_Package/ANT_LIB/software/USB/iokit_driver/iokit_device.cpp:472:22: No matching function for call to 'IOCreatePlugInInterfaceForService'      
Avatar
RankRankRankRank

Total Posts: 745

Joined 2012-09-14

PM

Have you been able to resolve this issue?

I can only offer a few suggestions:
Ensure the IOkit.framework libraries have been added to the build.
Check that the types passed in which may have been modified still match the function call signature.      
Rank

Total Posts: 5

Joined 2013-11-05

PM

Thx to all the kind helps! Really appreciate it.

What I did is changing on the ANT side instead of the Apple side:

in types.h, change
typedef signed long SLONG; // Signed 4-byte int.
typedef unsigned long ULONG; // Unsigned 4-byte int.
to
typedef signed int SLONG; // Signed 4-byte int.
typedef unsigned int ULONG; // Unsigned 4-byte int.

in 2 places of function IOCreatePlugInInterfaceForService call, change
long score;
to
SInt32 score;

Now it compiles with 64-bit Intel setting grin

The following may help others:
after downloading the ant lib package, another 4 places need to be changed inside Xcode (I'm using 5):
- Architectures (32-bit, or 64-bit)
- Base SDK (OS X 10.8 or others)
- Compiler (Default apple LLVM 5.0 or others)
- set network key to all 0s, or a specific value      
Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

Hi Donald and harrison,

Thanks a lot for sharing Donald, I'm trying to port my software from Windows to MacOS and I used your fix, they both worked well for me. I couldn't have done it without your help!

I have now have encountered some error(or warning?) trying to compile Ant_lib, if you have seen it and could give a hand would be appreciated! I am a mac newbie still trying to learn wink
Basically I'm building the lib as a static lib in QtCreator, and after the creation of the lib "libANT_LIB.a" I get those message, I guess I can ignore them?


build log
...
rm -f libANT_LIB.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar cq libANT_LIB.a checksum.o crc.o antfs_client_channel.o antfs_directory.o antfs_host.o antfs_host_channel.o dsi_framer.o dsi_framer_ant.o dsi_framer_integrated_antfs_client.o dsi_serial.o dsi_serial_generic.o dsi_serial_iokit.o dsi_vcp_si.o dsi_ant_device.o dsi_convert.o dsi_debug.o dsi_thread_posix.o dsi_thread_win32.o dsi_timer.o macros.o usb_device_handle_iokit.o usb_device_handle_mac.o usb_device_handle_si_iokit.o usb_device_handle_vcp.o usb_device.o usb_device_iokit.o usb_device_vcp.o iokit_device.o iokit_device_handle.o iokit_device_list.o iokit_interface.o iokit_transfer.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(dsi_debug.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(dsi_thread_win32.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(usb_device.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib -s libANT_LIB.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(dsi_debug.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(dsi_thread_win32.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libANT_LIB.a(usb_device.o) has no symbols
20:39:44: The process "/usr/bin/make" exited normally.
20:39:44: Elapsed time: 00:07.

Thanks in advance,

Max@MaximumTrainer
https://www.facebook.com/maximumtrainer
https://www.youtube.com/watch?v=NSCTaG57ze4
     

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com

Avatar
RankRankRankRank

Total Posts: 123

Joined 2013-10-07

PM

Finally I was able to compile ant_lib has a static library with the small change you posted, thanks

I am now facing new errors when trying to use the static lib in my main project:
For Windows I didn't have this issue, it compiled fine -_-

Here are the compile error using the static lib "libANT_LIB.a":
Undefined symbols for architecture x86_64:
"_CFDictionarySetValue", referenced from:
USBDeviceHandleSI::GetAllDevices() in libANT_LIB.a(usb_device_handle_vcp.o)
USBDeviceHandleSI::FindModems(unsigned int*) in libANT_LIB.a(usb_device_handle_vcp.o)
"_CFNumberGetValue", referenced from:
USBDeviceSI::USBDeviceSI(unsigned int const&) in libANT_LIB.a(usb_device_vcp.o)
USBDeviceSI::GetDeviceNumber(unsigned int const&, __CFString const*) in libANT_LIB.a(usb_device_vcp.o)
_IOObjectConformsTo", referenced from:
USBDeviceSI::USBDeviceSI(unsigned int const&) in libANT_LIB.a(usb_device_vcp.o)
(anonymous namespace)::GetRegistryEntry(unsigned int, char const*) in libANT_LIB.a(usb_device_handle_vcp.o)
IOKitDevice::IOKitDevice(unsigned int const&) in libANT_LIB.a(iokit_device.o)
"_IOObjectGetClass", referenced from:
IOKitDeviceList::GetNextDevice(unsigned int) in libANT_LIB.a(iokit_device_list.o)
"_IOObjectRelease", referenced from:
USBDeviceHandleSI::GetAllDevices() in libANT_LIB.a(usb_device_handle_vcp.o)
"std::_List_node_base::hook(std::_List_node_base*)", referenced from:
IOKitDeviceHandle::SendSyncControlTransfer(unsigned char, unsigned char, unsigned short, unsigned short, unsigned char*, unsigned short, unsigned int, int&) in libANT_LIB.a(iokit_device_handle.o)
IOKitDeviceHandle::SendSyncInterruptTransfer(unsigned char, unsigned char*, int, unsigned int, int&) in libANT_LIB.a(iokit_device_handle.o)
IOKitDeviceHandle::SendSyncBulkTransfer(unsigned char, unsigned char*, int, unsigned int, int&) in libANT_LIB.a(iokit_device_handle.o)


[Edit : fixed! got to love forums searching smile 
need to add this in the .pro file :
LIBS += -framework IOKit
LIBS += -framework CoreFoundation      

Signature

——————————————————
Free Indoor Cycling Software - https://maximumtrainer.com