You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional information about your host, target hardware or environment that
may help
macOS 11.7.7 using nix 2.13.3 for package management
Current behavior
CT_EXTRA_LDFLAGS_FOR_BUILD and CT_EXTRA_CFLAGS_FOR_BUILD are currently set to /usr/local/opt/... which might be incorrect, depending on user setup, e.g. on Nix. See
I am not a Nix user. If you know how to make a relocatable toolchain that will work with Nix on MacOS too, please submit a PR and I will include it in the next toolchain build. GCC 13 is out now, so publishing new toolchains is on the to do list.
Hi @fhunleth ,
I was able to reproduce my error even on @cloud8421's nix flake based setup - the difference lies in that I set MIX_TARGET=x86_64.
I also looked at Nix's description [1] on how CFLAGS and LDFLAGS variables are set. It appears, that clang (from macOS) and gcc (when added with Nix) will come as wrappers which have these variables configured with the locations where other nix-managed libraries, like gettext are installed. This suggests, the wrappers should work, regardless of variables like CT_EXTRA_LDFLAGS_FOR_BUILD.
I then proceeded to verify if the wrappers or the underlying compiler and linker are used, found that this bug could rather relate to https://github.com/nerves-project/nerves_system_br/tree/main and got stuck for now.
Do you have any places in mind, which could be worth looking into?
Thank you!
Environment
elixir -v
):mix nerves.env --info
)may help
macOS 11.7.7 using nix 2.13.3 for package management
Current behavior
CT_EXTRA_LDFLAGS_FOR_BUILD and CT_EXTRA_CFLAGS_FOR_BUILD are currently set to /usr/local/opt/... which might be incorrect, depending on user setup, e.g. on Nix. See
toolchains/nerves_toolchain_ctng/defaults/darwin_x86_64_defconfig
Line 6 in c5039b7
Of course it could be hardcoded in other places as well.
This results in
mix firmware
being unable to compile dependencies, due to libraries being searched in an incorrect locationExpected behaviour
Buildscripts detect the correct location and firmware is built correctly.
The text was updated successfully, but these errors were encountered: