-
Notifications
You must be signed in to change notification settings - Fork 118
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
Header variable bug src/as-validator-issue-tag.h #673
Comments
The problem is in the tests. The library and the test itself will both define the same symbol.
|
How are you compiling AppStream? This conflict does not seem to happen with any compiler we test with, and shouldn't since the symbol is hidden in the library, so the linker shouldn't see it. I have also been unable to reproduce the issue. |
You will likely only be able to trigger this if you attempt to compile with --prefer-static or --default-library=static (or =both). |
I do not know about fancy link level magic like symbol hiding, but from a C code perspective the original post is still valid: We cannot have non-local variables with the same name in two compilation units. In the test we need to refer to the variable as Proposed workaround: Can we use a simple |
/~https://github.com/ximion/appstream/blame/221ed8e10b59061d07f6ac01a624ed1e86b3686f/src/as-validator-issue-tag.h#L39
This is a variable defined in a header file. It needs to go into a compilation unit and only one.
The text was updated successfully, but these errors were encountered: