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

write build_go_mac.sh file to set up go package so it can be installed more seamlessly #79

Merged
merged 17 commits into from
Dec 1, 2023

Conversation

ramfox
Copy link
Contributor

@ramfox ramfox commented Nov 24, 2023

linux machines still don't want to recognize cgo LDFLAG, but this brings us one step closer and cleaner to getting a golang setting to be smoother.

Updates the README for how to build the golang bindings for each platform.

@ramfox ramfox changed the title adjust make_go.sh file to set up go package so it can be installed more seamlessly write build_go_mac.sh file to set up go package so it can be installed more seamlessly Dec 1, 2023
# to run you need to let the linker know where the linked library files are:
# LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:./iroh/ffi" \
# CGO_LDFLAGS="-liroh -L ./iroh/ffi" \
# go <actual go command to build or run>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this stay here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, unfortunately from my linux experimentation, it won't recognize the linked files, no matter where I put libiroh.so. Either the box I was using was ignoring it, or maybe something was wrong with how it was set up for dynamic linking, but I couldn't get it to recognize the cgo flag. I needed to still add the LD_LIBRARY_PATH manually. So until that's confirmed to work I want to leave these instructions in.

@ramfox ramfox merged commit 96191b3 into main Dec 1, 2023
12 checks passed
@ramfox ramfox deleted the go_build branch December 1, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants