1

I am trying to generate a usable binary for GCBM, a C++ carbon accounting tool. The binary has been generated from a GitHub Action workflow which is available as an artifact here: https://nightly.link/HarshCasper/moja.canada/actions/runs/1999997115/GCBM.zip

I downloaded the ZIP, unzipped it inside a gcbm directory, cd inside it, and tried launching the binary through:

./moja.cli

I got the following error:

./moja.cli: error while loading shared libraries: libmoja.flint.so.1: cannot open shared object file: No such file or directory

I have tried various ways to fix it by following other StackOverflow threads but nothing really has worked out. Can anyone please help me solve it?

2 Answers 2

3

From the error, it's clear library path that the executable looking for is not present. It happens sometimes if the executable compiled on another system takes a hardcoded library path that is not present on your system. The solution is you have to compile source on your system. Better compile it with a STATIC library. Make changes to Cmake(https://github.com/HarshCasper/moja.canada/blob/bffb196222e118e6797afa2bedab02dbe29dd330/Source/CMakeLists.txt#L47). or copy shared library to proper path.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, Thanks for your answer! How can I copy the shared library to a proper path? I wish to make it possible to distribute the package to other users without having them to compile via source.
1

Example, how to run GCBM/moja.cli with the ~40 internal shared libraries

mkdir GCBM && cd GCBM/
unzip GCBM.zip
chmod +x moja.cli

         ## create a script moja.sh to run moja.cli :

#!/bin/sh
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH
exec ./moja.cli

     ## make the script executable and run ./moja.sh

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.