Skip to content

dantin/daylight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daylight

Solutions of online judgement

C Environment

Default gcc in CentOS 7 is 4.8.x, to use development tools like AddressSanitizer, we need to upgrade gcc.

Two way to do this task:

  1. use source code
  2. use SCLo
# install base package
$ sudo yum install centos-release-scl
# install gcc7
$ sudo yum install devtoolset-7-gcc
# install libasan for gcc7
$ sudo yum install devtoolset-7-libasan-devel
# activate
$ source /opt/rh/devtoolset-7/enable

Query

# see the path of package installation
$ rpm -ql devtoolset-7libasan-devel
# see runtime info
$ rpm -qf /opt/rh/devtoolset-7/enable