Skip to content

glfw example does not work on arm mac #117406

@gaaclarke

Description

@gaaclarke

The example is trying to link the intel build of the engine, not the arm64 version.

error

aaclarke-macbookpro3:glfw aaclarke$ pwd
/Users/aaclarke/dev/engine/src/flutter/examples/glfw
aaclarke-macbookpro3:glfw aaclarke$ ./run.sh 
-- Including Cocoa support
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/aaclarke/dev/engine/src/flutter/examples/glfw/debug
[ 91%] Built target glfw
[ 95%] Linking CXX executable flutter_glfw
ld: warning: ignoring file /Users/aaclarke/dev/engine/src/out/host_debug_unopt/libflutter_engine.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_FlutterEngineRun", referenced from:
      RunFlutter(GLFWwindow*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in FlutterEmbedderGLFW.cc.o
  "_FlutterEngineSendPointerEvent", referenced from:
      GLFWcursorPositionCallbackAtPhase(GLFWwindow*, FlutterPointerPhase, double, double) in FlutterEmbedderGLFW.cc.o
  "_FlutterEngineSendWindowMetricsEvent", referenced from:
      GLFWwindowSizeCallback(GLFWwindow*, int, int) in FlutterEmbedderGLFW.cc.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [flutter_glfw] Error 1
make[1]: *** [CMakeFiles/flutter_glfw.dir/all] Error 2
make: *** [all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: examplesSample code and demosengineflutter/engine related. See also e: labels.waiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions