Closed AjayShanker-geek closed 1 year ago
Hi @AjayShanker-geek - is this from a clean/fresh clone of nchat
? If not, please try clone a fresh one and build.
If it's a clean build failing - can you share the version of nchat
(see lib/common/src/version.h
)? Also what is the output from go version
and which go
?
I build/run nchat on M2 / Ventura without any issues. I don't anticipate M1 being much different, but I'll see if I can try it.
Hi @d99kris,
I have reclone and still facing the same issue.
NCHAT_VERSION "3.62"
go version go1.20.5 darwin/arm64
/opt/homebrew/bin/go
Thanks. I'm not sure what the problem is yet, but just in case you're only looking to use nchat
for Telegram
you can disable WhatsApp
(which uses golang) to maybe work around the problem. Something like this:
rm -rf build
mkdir -p build && cd build && cmake -DHAS_WHATSAPP=OFF .. && make -s
Alright, telegram part works. I can help to figure it on my free time.
Thanks for the update 👍
Btw, I did some googling and it seemed having an additional build toolchain could cause that build error. Do you have the brew package binutils installed? I believe one can check with brew list binutils
. Or check if you have more than one ar
or ranlib
with which ar
and which ranlib
respectively.
I'm planning to try installing binutils
myself to try reproduce, but I haven't had the chance yet.
Yes, I got binutils
installed via brew. I managed to compiled after uninstalling binutils
. Hope it helps others too, cheers!
Great, thanks! 👍
I'll probably still try to see if I can get nchat build to detect and use the appropriate buildchain, but thanks for confirming having binutils
is showing the issue. 👍
I'll probably still try to see if I can get nchat build to detect and use the appropriate buildchain
For my own future reference, I tried modifying lib/wmchat/go/CMakeLists.txt
to pass env vars like
AR="${CMAKE_AR}"
CC="${CMAKE_C_COMPILER}"
CXX="${CMAKE_CXX_COMPILER}"
to the go build
command, but apparently it is not sufficient. Will leave this as-is in nchat
for now.
Description: Unable to build Error ->
ld: warning: ignoring file go/libcgowm.dylib, building for macOS-arm64 but attempting to link with file built for macOS-arm64
How to reproduce it:
Running Build
Environment: