I had the same problem.
The problem was this: CPATH :
<gcc-install-path>/include/c++/<gcc-version>
After grep ing for _GLIBCXX_VISIBILITY in the same directory, it seems that the macro is defined in a subdirectory specific to the host machine. In my case, this is x86_64-unknown-linux-gnu . Adding this parameter to CPATH solved the problem. My new CPATH :
<gcc-install-path>/include/c++/<gcc-version>:<gcc-install-path>/include/c++/<gcc-version>/<machine-specific-headers>
For my example, a machine means:
export CPATH=~/f/i/gcc-4.8.4/include/c++/4.8.4:~/f/i/gcc-4.8.4/include/c++/4.8.4/x86_64-unknown-linux-gnu
I hope this helps someone.
stanm
source share