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

[Bug] "error while loading shared libraries: libspdlog.so.1" #173

Closed
KaKi87 opened this issue Jun 3, 2023 · 8 comments
Closed

[Bug] "error while loading shared libraries: libspdlog.so.1" #173

KaKi87 opened this issue Jun 3, 2023 · 8 comments

Comments

@KaKi87
Copy link

KaKi87 commented Jun 3, 2023

Hello,

As mentioned in #134 (comment), I installed libspdlog-dev :

libspdlog-dev:
  Installed: 1:1.10.0+ds-0.4
  Candidate: 1:1.10.0+ds-0.4
  Version table:
 *** 1:1.10.0+ds-0.4 500
        500 http://fr.archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
        100 /var/lib/dpkg/status

Yet I'm still experiencing the issue :

./abaddon: error while loading shared libraries: libspdlog.so.1: cannot open shared object file: No such file or directory

Thanks

@ouwou
Copy link
Member

ouwou commented Jun 3, 2023

i still think the issue is entirely on your end in this case, but try doing a clean re-build. if that somehow still doesnt work, i guess try finding where libspdlog.so is and symlink it to /usr/lib/libspdlog.so.1

@KaKi87
Copy link
Author

KaKi87 commented Jun 4, 2023

Here's the output of locate libspdlog.so :

/usr/lib/x86_64-linux-gnu/libspdlog.so
/usr/lib/x86_64-linux-gnu/libspdlog.so.1.10
/usr/lib/x86_64-linux-gnu/libspdlog.so.1.10.0

When you say "on your end", do you mean me personally, or the Ubuntu devs ?

@ouwou
Copy link
Member

ouwou commented Jun 4, 2023

i mean its most likely not something i can fix, its just a quirk of your system. i think your build is getting the library wrong? if i do ldd abaddon i get libspdlog.so.1.10 => /lib/x86_64-linux-gnu/libspdlog.so.1.10 which is different interestingly. i would expect a clean build to make that work but i guess you can try something like sudo ln -s /usr/lib/x86_64-linux-gnu/libspdlog.so.1.10 /usr/lib/x86_64-linux-gnu/libspdlog.so.1

@KaKi87
Copy link
Author

KaKi87 commented Jun 4, 2023

i mean its most likely not something i can fix

DEB or flatpak or snap packaging would fix the issue.

its just a quirk of your system

Which is the most popular Linux distro.

sudo ln -s /usr/lib/x86_64-linux-gnu/libspdlog.so.1.10 /usr/lib/x86_64-linux-gnu/libspdlog.so.1

That works, except I'm getting a new error now :

./abaddon: error while loading shared libraries: libfmt.so.8: cannot open shared object file: No such file or directory

Here's the output of apt policy libfmt-dev :

libfmt-dev:
  Installed: 9.1.0+ds1-2
  Candidate: 9.1.0+ds1-2
  Version table:
 *** 9.1.0+ds1-2 500
        500 http://fr.archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
        100 /var/lib/dpkg/status

And the output of locate libfmt.so :

/usr/lib/x86_64-linux-gnu/libfmt.so
/usr/lib/x86_64-linux-gnu/libfmt.so.9
/usr/lib/x86_64-linux-gnu/libfmt.so.9.1.0

So I also ran sudo ln -s /usr/lib/x86_64-linux-gnu/libfmt.so.9.1.0 /usr/lib/x86_64-linux-gnu/libfmt.so.8, but then I got the following when trying to run the app again :

./abaddon: symbol lookup error: ./abaddon: undefined symbol: _ZN3fmt2v86detail14snprintf_floatIeEEiT_iNS1_11float_specsERNS1_6bufferIcEE

Thanks

@ouwou
Copy link
Member

ouwou commented Jun 4, 2023

DEB or flatpak or snap packaging would fix the issue.

maybe but i unfortunately have zero experience with that side of things (i use windows 💀). there is an issue open for that though

anyways that last error has me stumped. only thing i can suggest is uninstalling libfmt (unless you need it for something else, since spdlog has it bundled), reinstalling spdlog, getting rid of the symlinks because they shouldnt be unnecessary, and doing a clean cmake build i.e. completely remove the contents of the build folder incl. CMakeCache.txt and CMakeFiles/. maybe you can show the output of cmake and the fresh CMakeCache.txt to see if we can figure out why its linking to something that doesnt exist

@KaKi87
Copy link
Author

KaKi87 commented Jun 7, 2023

uninstalling libfmt (unless you need it for something else, since spdlog has it bundled)

Well, that one was already installed when I checked for it so I guess I need it even though I don't know precisely what for.

doing a clean cmake build

I'm going to give up then, because I won't have the courage to build Abaddon myself everytime I'd want to upgrade.

Thanks anyway !

@KaKi87 KaKi87 closed this as completed Jun 7, 2023
@ouwou
Copy link
Member

ouwou commented Jun 7, 2023

well you shouldnt have to do clean builds every time, hopefully just once to get CMake to pick up the right library paths

@xnhunter
Copy link

xnhunter commented Jun 7, 2024

i still think the issue is entirely on your end in this case.

The error happens on both Fedora 40 and Ubuntu 24.04.

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

No branches or pull requests

3 participants