# TRAVIS\_COMPILER wrong value?

**URL:** <https://travis-ci.community/t/travis-compiler-wrong-value/492>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [October 25, 2018, 9:41am UTC](https://travis-ci.community/t/travis-compiler-wrong-value/492 "2018-10-25T09:41:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mizux](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mizux/32/274_2.png) [@Mizux](https://travis-ci.community/u/Mizux)\
**Post date:** [October 25, 2018, 9:41am UTC](https://travis-ci.community/t/travis-compiler-wrong-value/492/1 "2018-10-25T09:41:31Z")

</div>

# Description

It seems the export of compiler variable name is ill-formed i.e. it uses `["gcc"]` instead of `gcc`

# Protocol

Just create a simple `.travis.yml`

```auto
sudo: false
language: cpp
matrix:
  include:
   - os: linux
      dist: trusty
      compiler:
        - gcc
...

```

# Observed

```auto
$ export TRAVIS_COMPILER=["gcc"]
$ export CXX=g++
$ export CC=gcc
$ ["gcc"] --version
[gcc]: command not found

```

Source log: [https://travis-ci.org/Mizux/abseil-cpp/jobs/446079817#L423-L428](https://travis-ci.org/Mizux/abseil-cpp/jobs/446079817#L423-L428)

---

<div class="post-metadata">

**Author:** ![Mizux](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/mizux/32/274_2.png) [@Mizux](https://travis-ci.community/u/Mizux)\
**Post date:** [October 25, 2018, 10:50am UTC](https://travis-ci.community/t/travis-compiler-wrong-value/492/2 "2018-10-25T10:50:37Z")

</div>

My bad, when using Matrix include you must use

```auto
  include:
   - os: linux
      dist: trusty
      compiler: gcc

```

note: for `env` the interpreter simply call `export X` for each row  
e.g.

```auto
 include:
   - os: linux
      dist: trusty
      env:
        - FOO=ON
        - BAR=OFF

```

you’ll get

```auto
...
export FOO=ON
export BAR=OFF

```
