Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug build: epee-related build error on macOS M1 #9486

Open
philipmw opened this issue Sep 15, 2024 · 4 comments
Open

debug build: epee-related build error on macOS M1 #9486

philipmw opened this issue Sep 15, 2024 · 4 comments

Comments

@philipmw
Copy link

philipmw commented Sep 15, 2024

I am trying to build the source tagged v0.18.3.4 on a MacBook Air M1 running macOS 14.6.1 (23G93).

I installed dependencies using Homebrew as per the README. All dependencies are up-to-date as of today.

My command: make debug

The error:

[ 32%] Building CXX object contrib/epee/src/CMakeFiles/obj_epee_readline.dir/readline_buffer.cpp.o
[ 32%] Built target obj_epee_readline
[ 33%] Linking CXX shared library libepee_readline.dylib
ld: warning: -undefined error is deprecated
Undefined symbols for architecture arm64:
  "epee::string_tools::trim_right(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&)", referenced from:
      handle_line(char*) in readline_buffer.cpp.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [contrib/epee/src/libepee_readline.dylib] Error 1
make[2]: *** [contrib/epee/src/CMakeFiles/epee_readline.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [debug] Error 2

The same error also occurs when building using dependencies provided by Nix (unstable channel) instead of Homebrew.

I am attaching the full build log:
build.log

@selsta
Copy link
Collaborator

selsta commented Sep 15, 2024

Since this is a debug build, do the same issues happen with a release build? Also can you share which command you used to build?

@philipmw
Copy link
Author

philipmw commented Sep 15, 2024

For the attached log, I used make debug as my command. After making the log, I realized that it omits some of the build process because I am repeating it without cleaning the build directory. I can redo the log from a clean state, if needed.

When I try to build using just make (without debug), I do not run into this problem:

[ 23%] Linking CXX static library libepee.a
[ 23%] Built target epee
[ 23%] Building CXX object contrib/epee/src/CMakeFiles/obj_epee_readline.dir/readline_buffer.cpp.o
[ 23%] Built target obj_epee_readline
[ 23%] Linking CXX static library libepee_readline.a
[ 23%] Built target epee_readline

@selsta
Copy link
Collaborator

selsta commented Sep 15, 2024

The second build error you posted is expected without applying #9450 / #9462

@selsta
Copy link
Collaborator

selsta commented Sep 15, 2024

It seems the issue is specifically debug related, can you update the issue title to add debug build?

@philipmw philipmw changed the title epee-related build error on macOS M1 debug build: epee-related build error on macOS M1 Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants