# Building obs\_decam

**URL:** <https://www.rubin.community/t/building-obs-decam/854>\
**Category:** Support\
**Created:** [June 14, 2016, 6:51pm UTC](https://www.rubin.community/t/building-obs-decam/854 "2016-06-14T18:51:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 14, 2016, 6:51pm UTC](https://www.rubin.community/t/building-obs-decam/854/1 "2016-06-14T18:51:33Z")

</div>

Hello,

I am new in LSST. I have my LSST stack installed with miniconda. Currently I am trying to install the obs\_decam packages so that I can pass images from DECam through the stack. But when I was using scons to build the packages after I setup pipe\_tasks, I received the error which is shown below. I’d appreciate it if you can help.

Thank you

Leng

> Error:  
> scons: Reading SConscript files …  
> EUPS integration: enabled  
> Checking who built the CC compiler…error: no result  
> CC is gcc version 4.4.7  
> Checking for C++11 support  
> Checking whether the C++ compiler worksno  
> Checking whether the C++ compiler worksyes  
> C++11 supported with ‘-std=c++0x’  
> Checking for C++ header file tr1/unordered\_map… yes  
> TypeError: can only concatenate list (not “tuple”) to list:  
> File “home/mleng/miniconda2/opt/lsst/decam/obs\_decam/SConstruct”, line 3:  
> scripts.BasicSConstruct(“obs\_decam”, defaultTargets=scripts.DEFAULT\_TARGETS + (“decam”,))

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [June 14, 2016, 6:54pm UTC](https://www.rubin.community/t/building-obs-decam/854/2 "2016-06-14T18:54:26Z")

</div>

> [@mbl](#):
>
> CC is gcc version 4.4.7

See: [C++11/14 (gcc 4.8) now the baseline](http://www.rubin.community/t/c-11-14-gcc-4-8-now-the-baseline/235)

You need to be using at least GCC 4.8.

Try installing devtoolset-3.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [June 14, 2016, 7:09pm UTC](https://www.rubin.community/t/building-obs-decam/854/3 "2016-06-14T19:09:36Z")

</div>

I don’t think that’s the whole story, @timj (though it’s true!). The reported error is:

```
TypeError: can only concatenate list (not "tuple") to list

```

and appears to be due to concatenating `scripts.DEFAULT_TARGETS` (presumably a `list`) and the tuple `("decam",)`. This seems to be a change introduced by @rowen rather recently.

This probably needs a ticket and a fix.

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [June 14, 2016, 7:10pm UTC](https://www.rubin.community/t/building-obs-decam/854/4 "2016-06-14T19:10:49Z")

</div>

I thought the same, but: `scripts.DEFAULT_TARGETS` has been a tuple since it was introduced by @timj himself back in November of last year: [https://github.com/lsst/sconsUtils/commit/39bd372694b9a49ab4cb3e0b15c4378fecd5885a](https://github.com/lsst/sconsUtils/commit/39bd372694b9a49ab4cb3e0b15c4378fecd5885a)

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [June 14, 2016, 7:30pm UTC](https://www.rubin.community/t/building-obs-decam/854/5 "2016-06-14T19:30:09Z")

</div>

I am actually confused. I don’t think this stack is current. `sconsUtils` no longer even works with GCC 4.4 and should fail out immediately. The error above indicates the stack is a few months old.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [June 14, 2016, 7:32pm UTC](https://www.rubin.community/t/building-obs-decam/854/6 "2016-06-14T19:32:07Z")

</div>

So we probably need to ask @mbl for more detailed instructions on how-to-reproduce.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 14, 2016, 7:36pm UTC](https://www.rubin.community/t/building-obs-decam/854/7 "2016-06-14T19:36:07Z")

</div>

Hi, the channels I added in miniconda was [http://research.majuric.org/conda/stable](http://research.majuric.org/conda/stable), from which I installed the stack. This might be an older version of stack.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 14, 2016, 7:39pm UTC](https://www.rubin.community/t/building-obs-decam/854/8 "2016-06-14T19:39:53Z")

</div>

Hi,

Since I was unable to find a complete tutorial, I tried setting up obs\_decam by following the steps to build obs\_cfht, which I found here: [https://github.com/DarkEnergyScienceCollaboration/ReprocessingTaskForce/wiki/Installing-the-LSST-DM-stack-and-the-related-packages](https://github.com/DarkEnergyScienceCollaboration/ReprocessingTaskForce/wiki/Installing-the-LSST-DM-stack-and-the-related-packages).

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [June 14, 2016, 7:50pm UTC](https://www.rubin.community/t/building-obs-decam/854/9 "2016-06-14T19:50:05Z")

</div>

The dates of files in that conda channel are from 2015. You are not going to be able to run a modern obs\_decam (straight out of github) with that.

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [June 14, 2016, 7:52pm UTC](https://www.rubin.community/t/building-obs-decam/854/10 "2016-06-14T19:52:03Z")

</div>

Try building a more modern version of the stack by following the install guide at [https://confluence.lsstcorp.org/display/LSWUG/Building+the+LSST+Stack+from+Source](https://confluence.lsstcorp.org/display/LSWUG/Building+the+LSST+Stack+from+Source) .

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [June 14, 2016, 7:55pm UTC](https://www.rubin.community/t/building-obs-decam/854/11 "2016-06-14T19:55:40Z")

</div>

> Try building a more modern version of the stack by following the install guide at [https://confluence.lsstcorp.org/display/LSWUG/Building+the+LSST+Stack+from+Source](https://confluence.lsstcorp.org/display/LSWUG/Building+the+LSST+Stack+from+Source) .

Careful: that suggests you run

```auto
$ eups distrib install -t v11_0 lsst_apps

```

which will not get you anything substantially newer than the Conda packages. Using `-t v12_0_rc1` is probably a better bet.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 14, 2016, 8:14pm UTC](https://www.rubin.community/t/building-obs-decam/854/12 "2016-06-14T20:14:42Z")

</div>

Hi, thank you for you suggestion.

I did have tried building from the source at very beginning but encountered some issues. One of them was that why it was checking for CC instead of gcc complier? Was this only resulted from the fact that my gcc version was too old?

Thanks

> Error:

> scons: Reading SConscript files …  
> EUPS integration: enabled  
> Checking who built the CC compiler…error: no result  
> CC is unknown version unknown  
> Checking for C++11 support  
> Checking whether the C++ compiler works… no  
> C++11 extensions could not be enabled for compiler ‘unknown’
> 
> - exit -4  
> eups distrib: Failed to build sconsUtils-2016\_01.0-4-g49bc714.eupspkg: Command:  
> source /home/mleng/miniconda2/opt/eups/bin/setups.sh; export EUPS\_PATH=/home/mleng/LSST:/home/mleng/miniconda2/var/opt/eups; (/home/mleng/LSST/EupsBuildDir/Linux64/sconsUtils-2016\_01.0-4-g49bc714/build.sh) \>\> /home/mleng/LSST/EupsBuildDir/Linux64/sconsUtils-2016\_01.0-4-g49bc714/build.log 2\>&1 4\>/home/mleng/LSST/EupsBuildDir/Linux64/sconsUtils-2016\_01.0-4-g49bc714/build.msg  
> exited with code 252

---

<div class="post-metadata">

**Author:** ![rowen](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/rowen/32/52_2.png) [@rowen](https://www.rubin.community/u/rowen)\
**Post date:** [June 14, 2016, 8:28pm UTC](https://www.rubin.community/t/building-obs-decam/854/13 "2016-06-14T20:28:24Z")

</div>

> [@price](#):
>
> The reported error is:
> 
> TypeError: can only concatenate list (not “tuple”) to list
> 
> and appears to be due to concatenating scripts.DEFAULT\_TARGETS (presumably a list) and the tuple (“decam”,). This seems to be a change introduced by @rowen rather recently.
> 
> This probably needs a ticket and a fix.

I think this code is correct. `obs_decam` builds fine for Jenkins and on my machine and I emulated the following code in `obs_subaru`’s `SConsctruct` file:

```
from lsst.sconsUtils import scripts
scripts.BasicSConstruct("obs_subaru", defaultTargets=scripts.DEFAULT_TARGETS + ("hsc",))

```

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [June 14, 2016, 8:44pm UTC](https://www.rubin.community/t/building-obs-decam/854/14 "2016-06-14T20:44:26Z")

</div>

> [@mbl](#):
>
> Was this only resulted from the fact that my gcc version was too old?

Yes. See my original reply. You need to install GCC 4.8 or newer.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 15, 2016, 8:01pm UTC](https://www.rubin.community/t/building-obs-decam/854/15 "2016-06-15T20:01:34Z")

</div>

Thank you for your reply. I have installed the latest the version of the stack but while installing obs\_decam, the same error persists:

> scons: Reading SConscript files …  
> EUPS integration: enabled  
> Checking who built the CC compiler…error: no result  
> CC is gcc version 4.8.5  
> Checking for C++11 support  
> Checking whether the C++ compiler worksyes  
> C++11 supported with ‘-std=c++11’  
> Checking for C++ header file tr1/unordered\_map… yes  
> TypeError: can only concatenate list (not “tuple”) to list:  
> File “/home/mleng/lsst/Linux64/obs\_decam/SConstruct”, line 3:  
> scripts.BasicSConstruct(“obs\_decam”, defaultTargets=scripts.DEFAULT\_TARGETS + (“decam”,))

Any suggestions on ways to fix this is very much appreciated.

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [June 16, 2016, 11:34am UTC](https://www.rubin.community/t/building-obs-decam/854/16 "2016-06-16T11:34:30Z")

</div>

> I have installed the latest the version of the stack

Could you be more specific about exactly which version this means, and how you installed it (through Anaconda, using the guide @price suggested, or some other method)?

Please set up your system as if you were about to build obs\_decam, then try running both

```
eups list -s sconsUtils

```

and

```
grep DEFAULT_TARGETS $SCONSUTILS_DIR/python/lsst/sconsUtils/scripts.py

```

and post the output here.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 16, 2016, 5:23pm UTC](https://www.rubin.community/t/building-obs-decam/854/18 "2016-06-16T17:23:33Z")

</div>

Hello jdswinbank,

Thank you for your reply. I installed the version 12 as what you  
suggested. I have the stack installed this time from the source. I have  
run the test data and it proceeded successfully.

To build obs\_decam, after loading LSST environment I setup pipe\_tasks  
first. I tried the commands you suggested and the followings were the  
outputs:

> bash-4.1$ eups list -s sconsUtils  
> 11.0 current b1711 v11\_0 setup

> grep DEFAULT\_TARGETS scripts.py  
> DEFAULT\_TARGETS = (“lib”, “python”, “tests”, “examples”, “doc”, “shebang”)  
> defaultTargets=DEFAULT\_TARGETS,  
> def finish(defaultTargets=DEFAULT\_TARGETS,

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![swinbank](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/swinbank/32/24_2.png) [@swinbank](https://www.rubin.community/u/swinbank)\
**Post date:** [June 16, 2016, 5:42pm UTC](https://www.rubin.community/t/building-obs-decam/854/19 "2016-06-16T17:42:17Z")

</div>

> I installed the version 12

but

```
bash-4.1$ eups list -s sconsUtils
11.0 current b1711 v11_0 setup

```

This worries me: version 12 of the stack should not be using sconsUtils version 11.

I suggest starting from a clean environment – ie, remove anything relevant to LSST from your shell initialization files (`.profile`, `.bashrc`, etc) if you’ve added it, then open a fresh new terminal. Start by sourcing `loadLSST`, as described in the instructions @price linked you to earlier. Then check which versions of both `lsst_apps` and `sconsUtils` you have installed:

```
eups list lsst_apps
eups list sconsUtils

```

I’m confused by the rest of your reply: it looks like you edited it while I was typing this. At one point, it seemed like `$SCONSUTILS_DIR` wasn’t set to anything useful, which could be the source of your problems, but you’ve now removed the text that indicates that. Can you confirm what the contents of `$SCONSUTILS_DIR` is (ie, `echo $SCONSUTILS_DIR`) immediately before you try to build obs\_decam?

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 16, 2016, 5:49pm UTC](https://www.rubin.community/t/building-obs-decam/854/20 "2016-06-16T17:49:15Z")

</div>

Hi, here is the update:

> grep DEFAULT\_TARGETS scripts.py  
> DEFAULT\_TARGETS = (“lib”, “python”, “tests”, “examples”, “doc”, “shebang”)  
> defaultTargets=DEFAULT\_TARGETS,  
> def finish(defaultTargets=DEFAULT\_TARGETS,

I will try removing everything related to version 11 and update the outputs. Thank you.

---

<div class="post-metadata">

**Author:** ![mbl](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@mbl](https://www.rubin.community/u/mbl)\
**Post date:** [June 16, 2016, 6:18pm UTC](https://www.rubin.community/t/building-obs-decam/854/21 "2016-06-16T18:18:59Z")

</div>

Hello jdswinbank,

After cleaning everything related to version 11 and after loading lsst environment, I checked the versions of followings:

> bash-4.1$ eups list -s sconsUtils  
> 2016\_01.0-8-ge052bd8 b2060 v12\_0\_rc1 b2058 qserv-dev setup

> bash-4.1$ eups list lsst\_apps  
> 2016\_01.0-1-gd7afef2+24 current v12\_0\_rc1 b2060

> bash-4.1$ eups list sconsUtils  
> 2016\_01.0-4-g49bc714 sims\_2\_2\_4c dax\_2016\_03 b1990 current b1962 w\_2016\_15 w\_2016\_12 b1997 qserv\_2016\_03 b1969  
> 2016\_01.0-8-ge052bd8 b2060 v12\_0\_rc1 b2058 qserv-dev setup

> bash-4.1$ grep DEFAULT\_TARGETS scripts.py  
> DEFAULT\_TARGETS = (“lib”, “python”, “tests”, “examples”, “doc”, “shebang”)  
> defaultTargets=DEFAULT\_TARGETS,  
> def finish(defaultTargets=DEFAULT\_TARGETS,

When I tried building obs\_decam I received the following:

> bash-4.1$ setup pipe\_tasks  
> bash-4.1$ setup -k -r .  
> bash-4.1$ scons install declare  
> scons: Reading SConscript files …  
> EUPS integration: enabled  
> Checking who built the CC compiler…(cached) error: no result  
> CC is gcc version 4.8.5  
> Checking for C++11 support  
> Checking whether the C++ compiler works… (cached) yes  
> C++11 supported with ‘-std=c++11’  
> Setting up environment to build package ‘obs\_decam’.  
> scons: done reading SConscript files.  
> scons: Building targets …  
> python decam/makeLinearizer.py decam/linearity\_table\_v0.4.fits --force  
> Traceback (most recent call last):  
> File “decam/makeLinearizer.py”, line 13, in   
> from lsst.ip.isr import LinearizeLookupTable  
> ImportError: cannot import name LinearizeLookupTable  
> scons: \*\*\* [decam/linearizer] Error 1  
> scons: building terminated because of errors.

Thanks

[Next page](https://www.rubin.community/t/building-obs-decam/854.md?page=2)
