Skip to content

Does this project support m1? #1183

Open
@spotandjake

Description

@spotandjake

When trying to build on my m1 mac I get the error:

Undefined symbols for architecture x86_64:
  "_glfwCreateWindow", referenced from:
      libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor(void*, bool) in opengl_depth_packet_processor.cpp.o
  "_glfwDefaultWindowHints", referenced from:
      libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor(void*, bool) in opengl_depth_packet_processor.cpp.o
  "_glfwDestroyWindow", referenced from:
      libfreenect2::OpenGLDepthPacketProcessorImpl::~OpenGLDepthPacketProcessorImpl() in opengl_depth_packet_processor.cpp.o
  "_glfwGetCurrentContext", referenced from:
      libfreenect2::ChangeCurrentOpenGLContext::ChangeCurrentOpenGLContext(GLFWwindow*) in opengl_depth_packet_processor.cpp.o
      libfreenect2::ChangeCurrentOpenGLContext::ChangeCurrentOpenGLContext(GLFWwindow*) in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessorImpl::initialize() in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::loadXZTables(float const*, float const*) in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::loadLookupTable(short const*) in opengl_depth_packet_processor.cpp.o
  "_glfwGetProcAddress", referenced from:
      _flextInit in flextGL.cpp.o
  "_glfwGetTime", referenced from:
      libfreenect2::WithPerfLogging::startTiming() in logging.cpp.o
      libfreenect2::WithPerfLoggingImpl::stop(std::__1::basic_ostream<char, std::__1::char_traits<char>>&) in logging.cpp.o
  "_glfwGetWindowAttrib", referenced from:
      libfreenect2::OpenGLDepthPacketProcessorImpl::initialize() in opengl_depth_packet_processor.cpp.o
  "_glfwInit", referenced from:
      libfreenect2::WithPerfLogging::WithPerfLogging() in logging.cpp.o
      libfreenect2::WithPerfLogging::WithPerfLogging() in logging.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor(void*, bool) in opengl_depth_packet_processor.cpp.o
  "_glfwMakeContextCurrent", referenced from:
      libfreenect2::ChangeCurrentOpenGLContext::ChangeCurrentOpenGLContext(GLFWwindow*) in opengl_depth_packet_processor.cpp.o
      libfreenect2::ChangeCurrentOpenGLContext::ChangeCurrentOpenGLContext(GLFWwindow*) in opengl_depth_packet_processor.cpp.o
      libfreenect2::ChangeCurrentOpenGLContext::~ChangeCurrentOpenGLContext() in opengl_depth_packet_processor.cpp.o
      libfreenect2::ChangeCurrentOpenGLContext::~ChangeCurrentOpenGLContext() in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessorImpl::initialize() in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::loadP0TablesFromCommandResponse(unsigned char*, unsigned long) in opengl_depth_packet_processor.cpp.o
      libfreenect2::OpenGLDepthPacketProcessor::loadXZTables(float const*, float const*) in opengl_depth_packet_processor.cpp.o
      ...
  "_glfwSetErrorCallback", referenced from:
      libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor(void*, bool) in opengl_depth_packet_processor.cpp.o
  "_glfwSwapBuffers", referenced from:
      libfreenect2::OpenGLDepthPacketProcessor::process(libfreenect2::DepthPacket const&) in opengl_depth_packet_processor.cpp.o
  "_glfwWindowHint", referenced from:
      libfreenect2::OpenGLDepthPacketProcessor::OpenGLDepthPacketProcessor(void*, bool) in opengl_depth_packet_processor.cpp.o
  "_libusb_alloc_transfer", referenced from:
      libfreenect2::usb::BulkTransferPool::allocateTransfer() in transfer_pool.cpp.o
      libfreenect2::usb::IsoTransferPool::allocateTransfer() in transfer_pool.cpp.o
  "_libusb_bulk_transfer", referenced from:
      libfreenect2::protocol::CommandTransaction::send(libfreenect2::protocol::CommandBase const&) in command_transaction.cpp.o
      libfreenect2::protocol::CommandTransaction::receive(std::__1::vector<unsigned char, std::__1::allocator<unsigned char>>&, unsigned int) in command_transaction.cpp.o
  "_libusb_cancel_transfer", referenced from:
      libfreenect2::usb::TransferPool::cancel() in transfer_pool.cpp.o
  "_libusb_claim_interface", referenced from:
      libfreenect2::protocol::UsbControl::claimInterfaces() in usb_control.cpp.o
  "_libusb_close", referenced from:
      libfreenect2::Freenect2DeviceImpl::close() in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::openDevice(int, libfreenect2::PacketPipeline const*, bool) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_control_transfer", referenced from:
      libfreenect2::protocol::libusb_ext::set_isochronous_delay(libusb_device_handle*, int) in usb_control.cpp.o
      libfreenect2::protocol::libusb_ext::set_sel(libusb_device_handle*, int, unsigned char, unsigned char, unsigned char, unsigned char) in usb_control.cpp.o
      libfreenect2::protocol::libusb_ext::set_feature_function_suspend(libusb_device_handle*, int, bool, bool) in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::setIsochronousDelay() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::setPowerStateLatencies() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::enablePowerStates() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::setVideoTransferFunctionState(libfreenect2::protocol::UsbControl::State) in usb_control.cpp.o
      ...
  "_libusb_error_name", referenced from:
      libfreenect2::usb::TransferPool::submit() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::cancel() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::onTransferComplete(libfreenect2::usb::TransferPool::Transfer*) in transfer_pool.cpp.o
      libfreenect2::protocol::UsbControl::setConfiguration() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::claimInterfaces() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::releaseInterfaces() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::setIsochronousDelay() in usb_control.cpp.o
      ...
  "_libusb_exit", referenced from:
      libfreenect2::Freenect2Impl::~Freenect2Impl() in libfreenect2.cpp.o
  "_libusb_free_config_descriptor", referenced from:
      libfreenect2::protocol::libusb_ext::get_max_iso_packet_size(libusb_device*, int, int, int) in usb_control.cpp.o
  "_libusb_free_device_list", referenced from:
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_free_ss_endpoint_companion_descriptor", referenced from:
      libfreenect2::protocol::libusb_ext::get_max_iso_packet_size(libusb_device*, int, int, int) in usb_control.cpp.o
  "_libusb_free_transfer", referenced from:
      libfreenect2::usb::TransferPool::~TransferPool() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::deallocate() in transfer_pool.cpp.o
  "_libusb_get_bus_number", referenced from:
      libfreenect2::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, libfreenect2::PrintBusAndDevice const&) in libfreenect2.cpp.o
      libfreenect2::Freenect2DeviceImpl::isSameUsbDevice(libusb_device*) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::openDevice(int, libfreenect2::PacketPipeline const*, bool) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_get_config_descriptor_by_value", referenced from:
      libfreenect2::protocol::libusb_ext::get_max_iso_packet_size(libusb_device*, int, int, int) in usb_control.cpp.o
  "_libusb_get_configuration", referenced from:
      libfreenect2::protocol::UsbControl::setConfiguration() in usb_control.cpp.o
  "_libusb_get_device", referenced from:
      libfreenect2::protocol::UsbControl::getIrMaxIsoPacketSize(int&) in usb_control.cpp.o
  "_libusb_get_device_address", referenced from:
      libfreenect2::operator<<(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, libfreenect2::PrintBusAndDevice const&) in libfreenect2.cpp.o
      libfreenect2::Freenect2DeviceImpl::isSameUsbDevice(libusb_device*) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::openDevice(int, libfreenect2::PacketPipeline const*, bool) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_get_device_descriptor", referenced from:
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_get_device_list", referenced from:
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_get_ss_endpoint_companion_descriptor", referenced from:
      libfreenect2::protocol::libusb_ext::get_max_iso_packet_size(libusb_device*, int, int, int) in usb_control.cpp.o
  "_libusb_get_string_descriptor_ascii", referenced from:
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_handle_events_timeout_completed", referenced from:
      libfreenect2::usb::EventLoop::static_execute(void*) in event_loop.cpp.o
      libfreenect2::usb::EventLoop::execute() in event_loop.cpp.o
  "_libusb_init", referenced from:
      libfreenect2::Freenect2Impl::Freenect2Impl(void*) in libfreenect2.cpp.o
  "_libusb_open", referenced from:
      libfreenect2::Freenect2Impl::openDevice(int, libfreenect2::PacketPipeline const*, bool) in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_ref_device", referenced from:
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
  "_libusb_release_interface", referenced from:
      libfreenect2::protocol::UsbControl::releaseInterfaces() in usb_control.cpp.o
  "_libusb_reset_device", referenced from:
      libfreenect2::Freenect2Impl::openDevice(int, libfreenect2::PacketPipeline const*, bool) in libfreenect2.cpp.o
  "_libusb_set_configuration", referenced from:
      libfreenect2::protocol::UsbControl::setConfiguration() in usb_control.cpp.o
  "_libusb_set_interface_alt_setting", referenced from:
      libfreenect2::protocol::UsbControl::setIrInterfaceState(libfreenect2::protocol::UsbControl::State) in usb_control.cpp.o
  "_libusb_strerror", referenced from:
      libfreenect2::usb::TransferPool::submit() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::cancel() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::onTransferComplete(libfreenect2::usb::TransferPool::Transfer*) in transfer_pool.cpp.o
      libfreenect2::protocol::UsbControl::setConfiguration() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::claimInterfaces() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::releaseInterfaces() in usb_control.cpp.o
      libfreenect2::protocol::UsbControl::setIsochronousDelay() in usb_control.cpp.o
      ...
  "_libusb_submit_transfer", referenced from:
      libfreenect2::usb::TransferPool::submit() in transfer_pool.cpp.o
      libfreenect2::usb::TransferPool::onTransferComplete(libfreenect2::usb::TransferPool::Transfer*) in transfer_pool.cpp.o
  "_libusb_unref_device", referenced from:
      libfreenect2::Freenect2::enumerateDevices() in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::clearDeviceEnumeration() in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::enumerateDevices() in libfreenect2.cpp.o
      libfreenect2::Freenect2Impl::~Freenect2Impl() in libfreenect2.cpp.o
ld: symbol(s) not found for architecture x86_64

when i run make

I think my problem might actually be when it says

ld: warning: ignoring file /opt/homebrew/Cellar/libusb/1.0.26/lib/libusb-1.0.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions