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

library name collision when upgrade to slang-v2.0 #646

Closed
vowstar opened this issue Nov 2, 2022 · 5 comments
Closed

library name collision when upgrade to slang-v2.0 #646

vowstar opened this issue Nov 2, 2022 · 5 comments

Comments

@vowstar
Copy link
Contributor

vowstar commented Nov 2, 2022

Describe the bug

Before I used the source code of v1.0 to compile and install without problems.

Later, when v2.0 was released, I tried to compile and install it with the source code of v2.0, and found that two paths were generated that conflicted with the existing libslang.so of the system:

 * Detected file collision(s):
 *
 * /usr/lib64/libslang.so
 * /usr/lib64/libslang.so.2

To Reproduce

This problem is easy to reproduce on CentOS 7. For example, you can install any package that depends on slang(not this repo), such as newt, libcaca, nettop, util-linux, etc.

Fastest way to reproduce:

yum install slang

Then CentOS 7 will have:

/usr/lib64/libslang.so.2
/usr/lib64/libslang.so.2.2.4

And then download https://github.com/MikePopoloski/slang/releases/tag/v2.0 source code, compile and install:

git clone -b v2.0 https://github.com/MikePopoloski/slang.git
mkdir build && cd build && cmake .. && make -j && make install

Then the two files will conflict, resulting in corruption.

Additional context

Except on CentOS, on other operating systems, library name conflicts will still cause program running errors.

For example debian/ubuntu based OS:

https://packages.debian.org/search?arch=any&mode=filename&searchon=contents&keywords=libslang.so.2

For example:
AlmaLinux 9
AlmaLinux 8
ALT Linux P10
ALT Linux P9
ALT Linux Sisyphus
Amazon Linux 2
Amazon Linux 1
CentOS 9 Stream
CentOS 8 Stream
CentOS 8
CentOS 7
Fedora 36
Fedora 35
Fedora Rawhide
Mageia 8
Mageia Cauldron
OpenMandriva Lx 4.3
OpenMandriva Lx 4.2
OpenMandriva Rolling
OpenMandriva Cooker
openSUSE Leap 15.4
openSUSE Leap 15.3
openSUSE Tumbleweed
PCLinuxOS
Rocky Linux 9
Rocky Linux 8

https://pkgs.org/download/libslang.so.2()(64bit)

Since this name has been taken and is well known, it is de facto unavailable in version v2.0.
v1.0 does not have this name collision problem.

I am trying to make this package for the gentoo distribution, and the test passed in v1.0, and have issue in v2.0.

@MikePopoloski
Copy link
Owner

Hmm, that's unfortunate. I did not know about this "s-lang" library. Not sure what to do about this... a rename would be pretty painful at this point.

@vowstar
Copy link
Contributor Author

vowstar commented Nov 2, 2022

I temporarily replaced libslang.so with libsvlang.so in my local environment. If the final solution is given in upstream, I will follow the upstream way.

vowstar added a commit to vowstar/vowstar-overlay that referenced this issue Nov 2, 2022
Issue: MikePopoloski/slang#646
Signed-off-by: Huang Rui <vowstar@gmail.com>
@vowstar
Copy link
Contributor Author

vowstar commented Nov 3, 2022

I work around this issue with static build, but still difficult to package it for linux distribution as a dynamic link library.

vowstar added a commit to vowstar/vowstar-overlay that referenced this issue Nov 7, 2022
Bug: MikePopoloski/slang#646
Signed-off-by: Huang Rui <vowstar@gmail.com>
gentoo-bot pushed a commit to gentoo/guru that referenced this issue Nov 7, 2022
Issue: MikePopoloski/slang#646
Signed-off-by: Huang Rui <vowstar@gmail.com>
@vowstar
Copy link
Contributor Author

vowstar commented Nov 7, 2022

Thanks for #650, I'll be using libsvlang.so for Gentoo Linux packaging.

@MikePopoloski
Copy link
Owner

This should be fixed now. The default lib name is set to libsvlang

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

2 participants