JohnnyCurran
Hi,
I am trying to build a new nerves / scenic project but I cannot get scenic_driver_local to compile.
It appears to be some sort of architecture mis-match and I can’t pin down a solution.
Terminal is not running rosetta:
johnny@omega:$ arch
arm64
Elixir / Erlang versions:
elixir 1.17.1-otp-27
erlang 27.0
scenic_driver_local version: 0.11.0 (from mix.lock)
Here’s the full debug output:
johnny@omega:$ mix deps.compile scenic_driver_local
==> scenic_driver_local
Compiling 8 files (.ex)
warning: single-quoted strings represent charlists. Use ~c"" if you indeed want a charlist or use "" instead
│
70 │ @port '/scenic_driver_local'
│ ~
│
└─ lib/driver.ex:70:9
warning: use Bitwise is deprecated. import Bitwise instead
│
9 │ use Bitwise
│ ~~~~~~~~~~~
│
└─ lib/to_port.ex:9: Scenic.Driver.Local.ToPort (module)
warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead
│
145 │ Logger.warn("scenic_driver_local: #{inspect(msg)}")
│ ~
│
└─ lib/from_port.ex:145:12: Scenic.Driver.Local.FromPort.handle_port_message/2
Generated scenic_driver_local app
SCENIC_LOCAL_TARGET: glfw
mkdir -p /Users/johnny/src/nerves/omega/_build/dev/lib/scenic_driver_local/priv
cc -O3 -std=c99 `pkg-config --static --cflags glfw3 glew` -fPIC -o /Users/johnny/src/nerves/omega/_build/dev/lib/scenic_driver_local/priv/scenic_driver_local c_src/device/glfw.c c_src/main.c c_src/nanovg/nanovg.c c_src/comms.c c_src/unix_comms.c c_src/utils.c c_src/script.c c_src/image.c c_src/font.c c_src/tommyds/src/tommyhashlin.c c_src/tommyds/src/tommyhash.c `pkg-config --static --libs glfw3 glew` -framework Cocoa -framework OpenGL -Wno-deprecated
c_src/utils.c:18:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
18 | while( p_err_str = device_gl_error() ) {
| ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
c_src/utils.c:18:20: note: place parentheses around the assignment to silence this warning
18 | while( p_err_str = device_gl_error() ) {
| ^
| ( )
c_src/utils.c:18:20: note: use '==' to turn this assignment into an equality comparison
18 | while( p_err_str = device_gl_error() ) {
| ^
| ==
1 warning generated.
c_src/script.c:178:14: warning: expression result unused [-Wunused-value]
178 | default: size;
| ^~~~
c_src/script.c:180:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
180 | }
| ^
2 warnings generated.
ld: warning: ignoring file '/opt/homebrew/Cellar/glew/2.2.0_1/lib/libGLEW.2.2.0.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: warning: ignoring file '/opt/homebrew/Cellar/glfw/3.4/lib/libglfw.3.4.dylib': found architecture 'arm64', required architecture 'x86_64'
Undefined symbols for architecture x86_64:
"___glewActiveTexture", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewAttachShader", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewBindAttribLocation", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewBindBuffer", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewBlendFuncSeparate", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewBufferData", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewCompileShader", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewCreateProgram", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewCreateShader", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewDeleteBuffers", referenced from:
_glnvg__renderDelete in glfw-dbdf0f.o
"___glewDeleteProgram", referenced from:
_glnvg__renderDelete in glfw-dbdf0f.o
"___glewDeleteShader", referenced from:
_glnvg__renderDelete in glfw-dbdf0f.o
_glnvg__renderDelete in glfw-dbdf0f.o
"___glewDisableVertexAttribArray", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewEnableVertexAttribArray", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewGenBuffers", referenced from:
_glnvg__renderCreate in glfw-dbdf0f.o
"___glewGetProgramInfoLog", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewGetProgramiv", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewGetShaderInfoLog", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
_glnvg__createShader in glfw-dbdf0f.o
"___glewGetShaderiv", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewGetUniformLocation", referenced from:
_glnvg__renderCreate in glfw-dbdf0f.o
"___glewLinkProgram", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewShaderSource", referenced from:
_glnvg__createShader in glfw-dbdf0f.o
"___glewStencilOpSeparate", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewUniform1i", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewUniform2fv", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewUniform4fv", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
_glnvg__setUniforms in glfw-dbdf0f.o
"___glewUseProgram", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
_glnvg__renderFlush in glfw-dbdf0f.o
"___glewVertexAttribPointer", referenced from:
_glnvg__renderFlush in glfw-dbdf0f.o
"_glewInit", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwCreateWindow", referenced from:
_device_init in glfw-dbdf0f.o
"_glfwGetCursorPos", referenced from:
_mouse_button_callback in glfw-dbdf0f.o
_scroll_callback in glfw-dbdf0f.o
_cursor_enter_callback in glfw-dbdf0f.o
"_glfwGetFramebufferSize", referenced from:
_reshape_window in glfw-dbdf0f.o
_setup_window in glfw-dbdf0f.o
"_glfwGetWindowSize", referenced from:
_setup_window in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
"_glfwInit", referenced from:
_device_init in glfw-dbdf0f.o
"_glfwMakeContextCurrent", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwPollEvents", referenced from:
_device_init in glfw-dbdf0f.o
_device_poll in glfw-dbdf0f.o
"_glfwSetCharModsCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetCursorEnterCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetCursorPosCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetErrorCallback", referenced from:
_device_init in glfw-dbdf0f.o
"_glfwSetFramebufferSizeCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetKeyCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetMouseButtonCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetScrollCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetWindowCloseCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSetWindowShouldClose", referenced from:
_window_close_callback in glfw-dbdf0f.o
"_glfwSetWindowSize", referenced from:
_device_init in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
"_glfwSetWindowSizeCallback", referenced from:
_setup_window in glfw-dbdf0f.o
"_glfwSwapBuffers", referenced from:
_device_end_render in glfw-dbdf0f.o
"_glfwTerminate", referenced from:
_device_init in glfw-dbdf0f.o
"_glfwWindowHint", referenced from:
_set_window_hints in glfw-dbdf0f.o
_set_window_hints in glfw-dbdf0f.o
_set_window_hints in glfw-dbdf0f.o
_set_window_hints in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
_device_init in glfw-dbdf0f.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/johnny/src/nerves/omega/_build/dev/lib/scenic_driver_local/priv/scenic_driver_local] Error 1
could not compile dependency :scenic_driver_local, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile scenic_driver_local --force", update it with "mix deps.update scenic_driver_local" or clean it with "mix deps.clean scenic_driver_local"
==> omega
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. Try running the
commands "gcc --version" and / or "make --version". If these programs
are not installed, you will be prompted to install them.
Yes, make and gcc are installed:
johnny@omega:$ gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
johnny@omega:$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Homebrew is not running under Rosetta 2:
johnny@omega:$ brew config
HOMEBREW_VERSION: 4.4.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 824efa8836dc226aa92dbbf7404c1b4a66707cca
Last commit: 6 days ago
Core tap JSON: 10 Nov 16:58 UTC
Core cask tap JSON: 10 Nov 16:58 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby
CPU: 10-core 64-bit dunno
Clang: 16.0.0 build 1600
Git: 2.39.5 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.1-arm64
CLT: 15.0.1.0.2.5
Xcode: 16.1
Rosetta 2: false
I uninstalled all of the dependencies and re-installed but I keep hitting this road block.
Any help is greatly appreciated, thank you
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Hello,
I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter).
The diffic...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
I think I’ve found a small improvement I could contribute to <%= web_namespace %>.CoreComponents (installer/templates/phx_web/compo...
New
Other Trending Topics
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
JohnnyCurran
The problem was with one or both of the
CFLAGSorLDFLAGSenv vars. I explicitly set them to:and now it runs!