Unable to load manually created library

I’m unable to load a library even though I can see it in the snap directory.

“/snap/lindacoin-wallet/x3/Linda-qt: error while loading shared libraries: libsecp256k1.so.0: cannot open shared object file: No such file or directory”

snap/lindacoin-wallet/x3/usr/lib$ ls -lh libsecp256k1.so*
lrwxrwxrwx 1 root root   21 Aug  5 13:22 libsecp256k1.so -> libsecp256k1.so.0.0.0
-rwxrwxr-x 1 root root 498K Aug  5 13:22 libsecp256k1.so.0.0.0

I checked the wrapper and it has the path.

#!/bin/sh
export PATH="$SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu"
export LD_LIBRARY_PATH="$SNAP/usr/lib/x86_64-linux-gnu/mesa:$SNAP/usr/lib/x86_64-linux-gnu/mesa-egl:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$SNAP/usr/lib:$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu/mesa:$SNAP/usr/lib/x86_64-linux-gnu/mesa-egl:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH=$SNAP_LIBRARY_PATH:$LD_LIBRARY_PATH
exec "$SNAP/Linda-qt" "$@"

Not sure where to go next. I’m sure its somehow my fault though …

name: lindacoin-wallet
version: '0.1'
summary: Cryptocurrency Wallet for LindaCoin
description: |
    Linda Cryptocoin is a hybrid coin with more than 70% pure PoS Block reward phase and 99% APR. This coin comes with a masternode which ensures lightening fast secured transaction, multi-wallets, encrypted messaging and stealth address for complete anonymity.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

apps:
  Linda-qt:
    command: desktop-launcher $SNAP/Linda-qt
    plugs:
      - network
      - network-bind
      - x11
      - home


parts:
  lindacoin-wallet:
    plugin: qmake
    source: https://github.com/Lindacoin/Linda.git
    options: ["USE_UPNP=-"]
    qt-version: "qt5"
    install:
      mv ../build/Linda-qt $SNAPCRAFT_PART_INSTALL
    build-packages:
      - libssl-dev
      - libgmp3-dev
      - libevent-dev
      - bsdmainutils
      - libboost-all-dev
    stage-packages:
      - libboost-all-dev
    after:
      - db
      - secp256k1
      - desktop-qt5

  db:
    plugin: autotools
    source: db-4.8.30.NC.tar.gz
    build: |
      cd ./build_unix
      ../dist/configure --enable-cxx
      make
      sudo make install
    artifacts:
      - libdb_cxx-4.8.so
      - libdb-4.8.so

  secp256k1:
    plugin: autotools
    source: https://github.com/Lindacoin/Linda.git
    source-subdir: src/secp256k1
    artifacts:
      - .libs/libsecp256k1.so
      - .libs/libsecp256k1.so.0.0.0
    organize:
      .libs/libsecp256k1.so: usr/lib/libsecp256k1.so
      .libs/libsecp256k1.so.0.0.0: usr/lib/libsecp256k1.so.0.0.0

You have

  • libsecp256k1.so
  • libsecp256k1.so.0.0.0

But not libsecp256k1.so.0, you should add it to artifacts or organize the artifacts you have.