-
Notifications
You must be signed in to change notification settings - Fork 88
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
Do not export internal symbols in shared object files #1307
Do not export internal symbols in shared object files #1307
Conversation
include/libdnf5/defs.h
Outdated
#ifndef LIBDNF5_DEFS_H | ||
#define LIBDNF5_DEFS_H | ||
|
||
#define PUBLIC_API __attribute__((visibility("default"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
attribute((visibility())) is a compiler-specific extension. E.g. GCC and Clang have them. Other compilers might not have. Consider guarding the definition with GNUC preprocessor condition.
8749722
to
f89223e
Compare
f89223e
to
94f3049
Compare
0cb8168
to
a46b6d1
Compare
a46b6d1
to
bd98ccb
Compare
bd98ccb
to
b77ef6a
Compare
I did a rebase to resolve the conflicts. |
There is some issue with loading builddep plugin: |
b77ef6a
to
a57932c
Compare
Thanks, looks good. Just a rebase is probably needed to fix tests. |
a57932c
to
35030a2
Compare
The Locker class has been moved to the public API in upstream. |
The current tests issues are connected with the new rpm |
Sorry about that, but could you rebase again please? From the other PRs, it seems that the CI is finally working again... |
35030a2
to
b9be10d
Compare
Symbols for private methods will be hidden (not exported).
The goal is to explicitly set the visibility of symbols using these macros. And switch the default visibility of symbols to "hidden".
Temporarily disabled. They need private symbols.
Libraries and applications (libdnf5.so, dnf5, dnf5daemon-client...) use (and statically link) private utilities from "/common/utils". And they also publicly export the symbols of these private utilities. This modification hides the symbols of utilities linked from "/common/utils".
b9be10d
to
7a86447
Compare
9b8f32d
PR that adds the API (rpm-software-management#1452) was merged right before rpm-software-management#1307 so its missing there.
Closes #1304
PR disables C++ unit tests for libdnf5, libdnf5-cli, dnf5 cpr_plugin C++. These unit tests use private symbols that are no longer accesible. It is a temporarily solution until the unit tests are modified.