GLIBC 2.18 dependency
This was copied from the reviews on the extension page. Not sure if it is a language service issue, or a debugger issue.
anyone got the workaround script to work with 0.12.2? the language server is launching but VS code doesn't seem to be able to use it
@alanbirtles I'm not sure what script you're using, but we added a Microsoft.VSCode.CPP.IntelliSense.Msvc.[exe|darwin|linux] executable so maybe that needs to be added to your script too.
I'm using the instructions posted above https://github.com/Microsoft/vscode-cpptools/issues/19#issuecomment-266168029

the language server is there but intellisense doesn't work, I had no issues using the same workaround in 0.12.1
actually it does now seem to be mostly working
@alanbirtles Did you do something to make it work again ? I was also using the workaround without any problem until the last update :/
no I'm not sure what if anything I did, the problem may have been that the script wasn't marked as executable? I think previous versions worked without an executable script but the new version doesn't?
Thanks for the answer. I works kind of randomly on my computer ... sometimes it works fine, and some other time, doesn't.
Issue moved to #989
@dcourtois, that looks like a bug. If you don't mind, I'm going to move the discussion for that to a new issue. #989
@bobbrow I don't mind at all. Next monday I'll try to get more informations and will try to post that on the issue. Thanks
Red Hat Enterprise Linux, CentOS, Scientific Linux, Ubuntu 12.04 (still installed on computer lab terminals in many places)... these are big names. All remain unsupported, so the many folks at school/work who want this nice lightweight editor for C/C++ are SOL.
This is not a reasonable requirement nor a reasonable workaround (it's neither "lightweight" nor future-proof). This should properly be addressed as a bug.
Solution without effort on your part? There exists the notion of "static compilation" of libraries that prove to be troublesome dependencies. Have you tried just linking it statically? Might work! :)
Additionally, the workaround posted above fails because the compilation of glibc fails on my system (gcc-6). Hoping for an official fix!
@GabeAl We haven't figured out how to remove our dependency on the dynamic libraries -- simply using -static is insufficient (e.g. warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking). Our telemetry indicated only 3-4% of users were impacted by this, so investigating a fix has not been a priority for us.
@sean-mcmanus is the telemetry looking at active users or first launches? There are a lot of pretty big distros that are currently affected (seems like percentage-wise would be more than 3-4%), and I'd guess a lot of people try it once, find it doesn't work, and give up on Code and try something else.
I haven't dug into the vscode codebase, and I suspect that the CPP extension library is a closed binary anyway, but can you elaborate on the linking issue? I'd assume the easiest solution would be to link the CPP extension to a lower glibc version, or just make it link to glibc statically. If that library itself calls dlopen(), then I guess that would trigger the warning, but as long as the libraries that it also loads are either statically linked themselves or against a lower glibc version, it shouldn't be an issue and you should be able to safely suppress it.
@ericgrossNI Installs by users. Most users use Ubuntu 14+ or something similar. If more people upvote this issue and/or take the survey (https://www.research.net/r/VBVV6C6 ) and say they want support for OS's with glibc < 2.18 then maybe we could investigate this more sooner.
We use cmake and when we supply the static linker flag, it still brings in "-export-dynamic -dynamic-linker -Bdynamic -lsupc++ -lgcc_s" even though none of those flags are explicitly specified, and our attempts to get rid of those give various errors (multiple definition errors, "dynamic STT_GNU_IFUNC symbol 'strcmp' with pointer equality in ".../libc.a" can not be used when making an executable", etc.).
We build on Ubuntu 14, so maybe building on Ubuntu 12 would be another fix, but our build machine would need to be changed.
@sean-mcmanus I suppose you should stop using TLS variables declared with the C++ thread_local keyword in Microsoft.VSCode.CPP.Extension.linux. This should remove dependency from __cxa_thread_atexit_impl introduced in glibc 2.18. This C++ dependency is the only from glibc 2.18. More info about it you can read here Destructor support for thread_local variables
@sergio-nsk Thanks for the info. I seem to recall some error involving __cxa_thread_atexit_impl. It looks like replacing thread_local with __thread on Linux would be sufficient in our case.
@sean-mcmanus The new update of IntelliSense is released two days ago. There are a lot of useful changes but unfortunately it still not working on CentOS 7. objdump -T informs about IntelliSense requiring GLIBC_2.18 __cxa_thread_atexit_impl, i.e. thread_local is not replaced with __thread yet.
Could you please inform us about your team further plans, when we can expect extra wanted updates?
@sergio-nsk Our database client code doesn't compile with __thread because we use thread local variables with non-trivial destructors. I don't know when we'll be able to implement a workaround.
@sean-mcmanus It is not a hard task, although __thread is useless with non-trivial destructors. You may use pthread_key_create in each thread to create, initialize a thread specific objects and register required their destrutors. If the main thread uses a thread specific objects too, do not forget to call pthread_exit(exitCode) before main exits (direct call or register it in atexit).
Is there any information available on a possible implementation date of this fix? It seems there may be enough users which are affected by this issue, when there was the release 14.2 to shut down the noise #1227 of these clients.