-
Notifications
You must be signed in to change notification settings - Fork 660
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
not support macOS arm64? #591
Comments
Are you building your go application with |
|
+1 |
on M1 with go 1.16, but go1.16rc works |
Same problem for me too. I'm on a Macbook Pro 13 M1 with go 1.16.2. I've installed librdkafka with
|
You need to build your application with |
I guess we talking about librdkafka_vendor linking without any additional moves as it was before |
@StephenWuyun could you go through it somehow? |
|
@edenhill i've already did that, but brew installs only x86 version + i was trying install librdkafa on M1 and i was stacked (half of libs exists in x86 platform) |
Try installing librdkafka from source: |
@edenhill but as i said brew provides libraries for x86... and opens issue to compile all dependencies... Please take look https://gist.github.com/d7561985/b020e37814cd8b5d90a0068767a2a148 |
Heres is what is did on my M1 Mac (macOS 11.2.2) to get it working: git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
./configure --install-deps # this did not work. i did not investigate.
brew install openssl zstd pkg-config
./configure
make
sudo make install Then tried running tests in my own Go project: # cd /your/project
go test ./... # this failed
go test ./... -tags dynamic # this worked! |
i try this for my m1 mac , but it's still not work.when i run ./configure i found this
when i install librdkafka , i found thisinstall librdkafka++.1.dylib $DESTDIR/usr/local/lib
[ -f "rdkafka++.pc" ] && ( \
install -d $DESTDIR/usr/local/lib/pkgconfig && \
install -m 0644 rdkafka++.pc $DESTDIR/usr/local/lib/pkgconfig \
)
[ -f "rdkafka++-static.pc" ] && ( \
install -d $DESTDIR/usr/local/lib/pkgconfig && \
install -m 0644 rdkafka++-static.pc $DESTDIR/usr/local/lib/pkgconfig \
)
(cd $DESTDIR/usr/local/lib && ln -sf librdkafka++.1.dylib librdkafka++.dylib)
WARNING: librdkafka-static.a: Not creating self-contained static library librdkafka-static.a: no static libraries available/enabled
Generating pkg-config file rdkafka-static.pc
Checking librdkafka integrity
librdkafka.1.dylib OK
librdkafka.a OK
Symbol visibility OK
Generating pkg-config file rdkafka++-static.pc
Checking librdkafka++ integrity
librdkafka++.1.dylib OK
librdkafka++.a OK
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C examples
make[1]: Nothing to be done for `all'.
Installing documentation to /usr/local
install -d $DESTDIR/usr/local/share/doc/librdkafka
install LICENSE LICENSES.txt INTRODUCTION.md README.md CONFIGURATION.md STATISTICS.md CHANGELOG.md $DESTDIR/usr/local/share/doc/librdkafka build error
is there any problem for my operate? |
all ready resolved , make sure your remove all of the x86_64 librdkafka , and use arm64 brew install
and just need setting a few env, make sure go build use -tags dynamic , and a little pkg like 'pkg-config', then it's works!!! |
Hey guys. |
Hello, I have tried building from source as mentioned below.
Then, I tried installing the library using brew by specifying arch, setting env and running with -tags dynamic flag as suggested below.
I still get the same error.
I deleted the previously installed libraries from /usr/local/lib directory before each method. I also get the same error when run go get github.com/confluentinc/confluent-kafka-go/kafka. MacBook Pro M1 MacOS 11.4 Do you have any suggestions? |
So there's no way we can link librdkafka statically for a arm64 environment? |
Works on MacBook Pro M1 v11.2
|
@edenhill. |
Hi, I was able to debug go code with dlv-dap along with librdkafka library, so I though I should share with all. Need to make few change in launch.json Following are the changes in launch.json |
These steps solved the issue for me.
|
I am using go1.17rc2 darwin/arm64, packages installed by homebrew (openssl, librdkafka, pkg-config) and export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig" but it doesn't work Openssl info
librdkafka info
pkg-config info
PKG_CONFIG_PATH
But the following error Does anyone have any suggestions for solving the problem? |
@luisaugustomelo what is your build command? are you running with |
It worked for me |
How I overcame this solution with my M1 Pro. I uninstalled go that is associated with brew so It had to do with |
For this to be seamlessly supported on macos-arm64, the static library would need to be built on librdkafka. It appears to be planned for some time in the future: confluentinc/librdkafka#3546 (comment) |
Just to be clear, this is the amd64 version, so it will be running using rosetta. |
Got
|
git clone --depth=1 https://github.com/google/wire.git
cd wire
go build -tags dynamic -o wire cmd/wire/main.go
# replace gopath bin wire
mv wire $GOPATH/bin |
Hi everyone, brew install pkg-config Dont forget your downloaded custom openssl version here. PKG_CONFIG_PATH=/opt/homebrew/opt/[email protected]/lib/pkgconfig |
Spent half a day on this and then realized that "buildTags" in |
I upgrade librdkafka from 1.9.1 to 1.9.2, but when i compile, the ld still use 1.9.1:
|
@guotie I had the same issue. Ditching go installation and installing latest version helped eventually, no idea why though. Maybe some strange cgo linker caching |
If not reinstall golang, just
|
Are there plans to properly support this without the special tagging? Seems possible given the doc. |
Since the release of 1.9.1 (https://github.com/confluentinc/confluent-kafka-go/releases/tag/v1.9.1) it is supported without the dynamic tags. Update your go.mod file, if that doesn't work you may need to do some fresh installs. I think the ticket should be closed. |
mark |
Hi, me too facing the same issue but after adding -tags dynamic to go build -v main.go command (I added -tags dynamic to go build command because i was facing the issue while building the arm image), it perfectly works fine. But now i catch up with one more known issue (#344), this new issue was seen by lot of people and there is no permanent solution as of now, could any one help us how can we fix both the issues together. |
I was having this issue, but upgrading to 1.9.2 and removing the dynamic tag now works for me on M1. |
supported since v1.9.1 |
Description
I run "go vet ./..." in my project and got the following errror.
How to reproduce
Checklist
Please provide the following information:
The text was updated successfully, but these errors were encountered: