Skip to content

warning: visibility attribute not supported in this configuration #967

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

Closed
ler762 opened this issue Jul 11, 2021 · 2 comments
Closed

warning: visibility attribute not supported in this configuration #967

ler762 opened this issue Jul 11, 2021 · 2 comments

Comments

@ler762
Copy link
Contributor

ler762 commented Jul 11, 2021

I'm getting lots of
warning: visibility attribute not supported in this configuration; ignored [-Wattributes]
messages when building tidy with gcc on cygwin (windows 10)

All those warnings go away if I change src/forward.h to

#if defined(_WIN32) || defined(__CYGWIN__)           <============ this line
#define TY_PRIVATE
#else
#define TY_PRIVATE __attribute__((__visibility__("hidden")))
#endif

Cygwin isn't windows, so gcc doesn't have _WIN32 defined:

$ echo | gcc -dM -E -xc - | grep -i win32

$ echo | gcc -dM -E -xc - | grep -i cygwin
#define __CYGWIN__ 1

But apparently cygwin inherits windows limitations, so related to issue #743?

@balthisar
Copy link
Member

Yup, it's exactly related to #743. I'll push a fix within the next 24 hours, or sooner if you want to do a quick PR, because the review is pretty much already complete; I just don't have a Cygwin environment.

I'd love to start testing Cygwin, but I'm not really interested in learning about how to do it in depth in Windows, because although you say it's not Windows, it's still Windows ;-) Can you give me a quick and dirty primer to compiling this on Windows, assuming no existing development environment?

Then I'll try to replicate it in Github Actions like I did for the mingw-w64 builds, and these types of screwups won't happen again!

Thanks.

@balthisar
Copy link
Member

So this was a perfect use of Windows 10 sandbox; getting this to compile under Cygwin was trivially easy with the provided fix, which I'll happily push, but by removing the attribute in Cygwin, are we exposing Cygwin uses to the same concerns as #743? Will soname become meaningless on Cygwin once again?

@balthisar balthisar unpinned this issue Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants