Updates and ROOT compatibility

I decided to update my computer over the weekend to protect against the Meltdown security flaw, but this morning at work I was surprised to see that none of my code worked, luckily I make constant backups, and as soon as I restarted my computer with my Friday backup everything worked fine again.

Now, this may be because of the way I have installed ROOT and Pythia in my computer which I compare to keeping a car together with ducktape and clips.

For this reason I’ll share with you my bash and the command I use to compile my code.

I would like to know if anyone else has had problems with the Meltdown updates and if they have managed to fix them without going back to previous versions.

Thanks

My bash

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
export PATH="./bin:$PATH"

### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"

#Root
export ROOTSYS=/Users/Fer/root/build
source $ROOTSYS/bin/thisroot.sh
export PATH=$PATH:/Users/Fer/root/build/bin


export PATH=$ROOTSYS/bin:$PATH
export PYTHONPATH=$PYTHONPATH:$HOME/Documents/traajo/mido/mido


#cmake
export PATH="/Applications/CMake.app/Contents/bin":"$PATH"


#Pythia8
export PYTHIA8=/Users/Fer/Documents/Pythia/pythia8230
export PYTHIA8DATA=$PYTHIA8/share/Pythia8/xmldoc

How I compile my code

g++ -I $PYTHIA8/include -o myFile ./myFile.cpp `root-config --cflags --glibs` -l Pythia8 -L $PYTHIA8/lib

The errors I got from the terminal

In file included from ./myhists.cpp:10:
In file included from /Users/Fer/root/build/include/TROOT.h:29:
In file included from /Users/Fer/root/build/include/TDirectory.h:25:
In file included from /Users/Fer/root/build/include/TNamed.h:29:
In file included from /Users/Fer/root/build/include/TString.h:41:
/Users/Fer/root/build/include/RStringView.h:35:12: error: unknown type name
      'basic_string_view'
   typedef basic_string_view<char> string_view;
           ^
/Users/Fer/root/build/include/RStringView.h:35:29: error: expected
      unqualified-id
   typedef basic_string_view<char> string_view;
                            ^
/Users/Fer/root/build/include/RStringView.h:36:12: error: unknown type name
      'basic_string_view'
   typedef basic_string_view<char16_t> u16string_view;
           ^
/Users/Fer/root/build/include/RStringView.h:36:29: error: expected
      unqualified-id
   typedef basic_string_view<char16_t> u16string_view;
                            ^
/Users/Fer/root/build/include/RStringView.h:37:12: error: unknown type name
      'basic_string_view'
   typedef basic_string_view<char32_t> u32string_view;
           ^
/Users/Fer/root/build/include/RStringView.h:37:29: error: expected
      unqualified-id
   typedef basic_string_view<char32_t> u32string_view;
                            ^
/Users/Fer/root/build/include/RStringView.h:38:12: error: unknown type name
      'basic_string_view'
   typedef basic_string_view<wchar_t> wstring_view;
           ^
/Users/Fer/root/build/include/RStringView.h:38:29: error: expected
      unqualified-id
   typedef basic_string_view<wchar_t> wstring_view;
                            ^
/Users/Fer/root/build/include/RStringView.h:50:28: error: no member named
      'to_string' in 'std::__1::basic_string_view<char,
      std::__1::char_traits<char> >'
      return std::stod(str.to_string(),pos);
                       ~~~ ^
In file included from ./myhists.cpp:10:
In file included from /Users/Fer/root/build/include/TROOT.h:29:
In file included from /Users/Fer/root/build/include/TDirectory.h:25:
In file included from /Users/Fer/root/build/include/TNamed.h:29:
/Users/Fer/root/build/include/TString.h:117:75: error: no member named
      'to_string' in 'std::__1::basic_string_view<char,
      std::__1::char_traits<char> >'
  ...std::string() const { return std::string_view(Data(),fExtent).to_string(...                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
10 errors generated.

Blind guess: have you updated your compiler without recompiling ROOT?

If not: what exactly have you updated that could break an existing, working ROOT installation?

Cheers,
Enrico

P.S. I updated kernel and gcc on my Arch and Debian machines in the last week without issues

I just opened the App Store, went to updates, saw the security update and clicked “Update”, the computer then restarted to finish instalation

Ah you are on mac!
You probably updated XCode to version 9, which is only supported by the most recent ROOT versions – the only solution is to update/re-build ROOT.
6.12/04 certainly works with XCode9; if using that version is not an option I can let you know if we have patched older versions to be compatible with XCode9 tomorrow.

Cheers,
Enrico

P.S. could you maybe edit this thread title as to not create confusion for other users? :slight_smile:
P.P.S. you can find more information about the XCode9 error searching the forum

1 Like

Thanks, I changed the title, I checked the details of the update and it says that it updates Xcode as well, so that’s probably it

Great!
Please remember to mark my reply as the solution if it actually solves the problem – it might help other users in the future!

Cheers,
Enrico

1 Like

After updating XCode, you need to make sure to reconfigure ROOT from ‘scratch’ (by deleting CMakeCache.txt) or more safetly by restarting a build from a fresh (empty) build directory.

Cheers,
Philippe.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.