memgraph / rsmgclient

Memgraph database adapter for Rust programming language.
https://crates.io/crates/rsmgclient
Apache License 2.0
38 stars 6 forks source link

Fix build error on centos #52

Closed MartinBubel closed 5 months ago

MartinBubel commented 5 months ago

Hi,

this PR potentially fixes #46 and #51.

I added a ci job that builds rsmgclient on centos:8 image to demonstrate the fix. That job might deserve some polishing but should be good enough for demonstrating the fix.

The issue that caused the installation erros on centos-based linux distros was caused because of the following:

During build.rs, libmgclient was build and placed into /rsmgclient/target/debug/build/rsmgclient-49e4c1ea816704fe/out/lib64. However, line was linking to lib instead of lib64.

I added a check if lib64 exists or not to "auto"-detect the issue and fix it. However, I am not sure if this is the best fix to the underlying problem, that mgclient builds are exported to lib or lib64 depending on the architecture. It might be better to address this in the cmake config of mgclient directly.

Still, this PR offers a fix. Feel free to comment, discuss, propose or make changes.

Yours, Martin

gitbuda commented 5 months ago

Hi, @MartinBubel, thanks a lot for the contribution! We'll probably dive deep into both mgclient setup and rsmgclient setup on Rhel distros. If I recall correctly, there was already a similar issue under mgconsole 👀

Is it critical for you to have this released on crates.io soon?

Btw, what's your graph use-case, if you have any specific question, feel free to reach out on https://www.discord.gg/memgraph (if you haven't already) 😃

MartinBubel commented 5 months ago

Hi @gitbuda, the issue is not critical for me. I can simply use the branch as a dependency for now.

Thanks, I've joined the discord channel some time ago and the issue actually emerged out of a discussion there.

gitbuda commented 5 months ago

In addition to the merge, added a few upgrades under https://github.com/memgraph/rsmgclient/pull/53 💪

katarinasupe commented 5 months ago

Hi @MartinBubel, nice to see you here 😄 Thank you for the contribution! 👏