Jump to content
  • 0

[ GUIDE ] Centos 6 gcc update to 4.9


Keitenai

Question


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

Hello!

Same with many rAthena users, I too have encountered the massive warnings upon compiling the latest git.

So i took my time to google around and finally was able to find something that could solve this issue without using Centos7.

Just follow the sequence below and you'll have your gcc updated to 4.9 in no time!

  • First you need to login as root.
    • yum install centos-release-scl
    • yum install devtoolset-4-toolchain
    • scl enable devtoolset-4 bash
  • Then login to your non-root "user".
    • scl enable devtoolset-4 bash
  • After the 1st and 2nd step, you may now check your gcc version
    • gcc --version
    • g++ --version
    • gfortran --version

 

Recompile your rathena and you will find that the shadow warnings are all gone =)

CHEERS!

 

UPDATE: from devtoolset-3  to  devtoolset-4

 

Edited by Keitenai
  • Upvote 5
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  1302
  • Reputation:   77
  • Joined:  12/04/12
  • Last Seen:  

Thanks @Keitenai I follow your instruction order and its works perfectly in centos 6.9!

YEahhhhhh ! +1 for you. /awsm

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  491
  • Reputation:   19
  • Joined:  11/19/11
  • Last Seen:  

Thanks for tutorial , work like a charm :wub:

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  257
  • Topics Per Day:  0.08
  • Content Count:  737
  • Reputation:   18
  • Joined:  11/21/15
  • Last Seen:  

what if i dont do the 2nd step???

amd i got this error compiling

make[1]: Leaving directory `/root/rathena.git/trunk/3rdparty/libconfig'
make[1]: Entering directory `/root/rathena.git/trunk/src/common'
        MKDIR   obj
        CXX     core.cpp
make[1]: CXX@: Command not found
make[1]: *** [obj/core.o] Error 127
make[1]: Leaving directory `/root/rathena.git/trunk/src/common'
make: *** [common] Error 2

well i works with this kind of errors??

src/node_data.cpp:64:47: warning: declaration of ‘tag’ shadows a member of 'this' [-Wshadow]
 void node_data::set_tag(const std::string& tag) { m_tag = tag; }
                                               ^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_style(YAML::EmitterStyle::value)’:
src/node_data.cpp:66:52: warning: declaration of ‘style’ shadows a member of 'this' [-Wshadow]
 void node_data::set_style(EmitterStyle::value style) { m_style = style; }
                                                    ^
src/node_data.cpp: In member function ‘void YAML::detail::node_data::set_scalar(const string&)’:
src/node_data.cpp:73:53: warning: declaration of ‘scalar’ shadows a member of 'this' [-Wshadow]
 void node_data::set_scalar(const std::string& scalar) {
                                                     ^
        CXX     src/parser.cpp
        CXX     src/exp.cpp
        CXX     src/exceptions.cpp
^Cmake[1]: *** [obj/src/exceptions.o] Interrupt
make: *** [yaml-cpp] Interrupt

 

Edited by whodhell
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...