digifuzzy Posted November 5, 2014 Report Share Posted November 5, 2014 With a shiney new install, I wanted to get back to coding "stuff". For reasons related to a non-funtoo project, I wanted to use the regex feature from c++11. I dug into my folders to find a sample I had where regex was used. Little did I know the headache I was heading into... The sample I used was taken from cppreference. Nothing complicated about it. Previous Linux had gcc 4.9.1 and the sample compiled just fine. I realized my Funtoo only had gcc 4.8.x so was not capable of dealing with c+11 features. But I did have the latest clang/llvm installed. Short story, it did not work. A fail of truly epic proportions. First I got errors about missing references to <iostream> (WTF?). I threw in the -stdlib=libc++. Fixed that problem - moving on. I then got issues with undefined references to "std::xxxxx" stuff. Okay, -lc++. Wrong. -lc++abi? Nope. I was getting errors that these libraries could not be found. (Again, WTF?). I threw the general problem out on IRC last night. Another user was kind enough to try to compile the same program. Alas, to no avail. Same issues. For kicks and giggles (or add insult to injury - take your pick), I tried to compile the same code with g++ using dragonegg (-fplugin=dragonegg.so). The error I got back was rather unusual: "undefined reference to `__atomic_fetch_add_4'". This is different. Googling did not help the matter. The llvm.org pages suggests that clang/llvm is "feature complete" with c++11, yet I am unable to compile/link even a simple c++ program using a clang. And the tight coupling between clang/gcc seems a touch disturbing to me. And just to put things over the top - I found the install-clang project on github. It is a script that compiles and installs clang/llvm (either stable or from git master branch) to another directory. Hope?!?! Not... Build would fail at stage 2. Its rather upsetting that trying to do a simple thing as compile a program with c++11 features would cause so much confusion had havoc. This isn't suppose to be this hard! Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now