c-smile / sciter-sdk

Sciter is an embeddable HTML/CSS/scripting engine
http://sciter.com
Other
2.12k stars 223 forks source link

centos7.5 version `GLIBCXX_3.4.21' not found #171

Open xlango opened 4 years ago

xlango commented 4 years ago

[sciter-x-api.c] Unable to load library: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/sciter/bin.lnx/x64/libsciter-gtk.so) [sciter-x-api.c] Unable to load library: /tmp/libsciter-gtk.so: cannot open shared object file: No such file or directory

SonnyX commented 4 years ago

It seems you are either missing gcc or are missing the library paths to where gcc is located. Try running the following command (sudo may be required)

yum -y install gcc

Try running it at this point, or try using:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64

and try again

c-smile commented 4 years ago

Hmm, it seems that I need to link C++ runtime statically on Linux too. I do this on Windows to support everything from XP to W10.

Will do

pravic commented 4 years ago

@SonnyX No, it's not about GCC or a missing library. It's about the Dual ABI.

@c-smile I am not sure that this is a good idea to link libc++ statically in a shared library: https://stackoverflow.com/a/44809374

The Dual ABI document also says this:

This commonly happens when linking to a third-party library that was compiled with an older version of GCC. If the third-party library cannot be rebuilt with the new ABI then you will need to recompile your code with the old ABI.

The source issue is from here: https://github.com/sciter-sdk/go-sciter/issues/237

pravic commented 4 years ago

I can try to recompile Sciter under different conditions and test on various OS. Will do.