# Boost Error code 1



## Mikael (Jun 17, 2011)

Hi,

I'm trying to install Boost but if fails everytime:


```
root@aerith /usr/ports/devel/boost-all
# make install
```

It compiles for a few minutes and then:


```
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/token_ids.o
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/wave_config_constant.o
common.mkdir bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/cpplexer
common.mkdir bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/cpplexer/re2clex
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/cpplexer/re2clex/aq.o
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/instantiate_cpp_exprgrammar.o
gcc.compile.c++ bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/cpplexer/re2clex/cpp_re.o
gcc.archive bin.v2/libs/wave/build/gcc-4.2.1/release/link-static/threading-multi/libboost_wave.a
common.copy stage/lib/libboost_wave.a
...failed updating 2 targets...
...skipped 5 targets...
...updated 620 targets...
*** Error code 1

Stop in /usr/ports/devel/boost-libs.
*** Error code 1

Stop in /usr/ports/devel/boost-libs.
*** Error code 1

Stop in /usr/ports/devel/boost-all.
*** Error code 1

Stop in /usr/ports/devel/boost-all.
```


```
root@aerith /root
# cat /etc/make.conf
WITHOUT_X11=yes

# added by use.perl 2011-01-12 11:17:34
PERL_VERSION=5.10.1
```


```
root@aerith /root
# uname -a
FreeBSD aerith.cloud 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
```

Any ideas? This is the second time I've tried to install Boost but failed


----------



## SirDice (Jun 17, 2011)

Is your ports tree up to date?


----------



## Mikael (Jun 18, 2011)

My ports tree was up to date, but now I've also updated all the installed packages and used freebsd-update to get the latest 8.2 updates. The error is a bit more detailed now (running *make install* without cleaning first):


```
...patience...
...patience...
...patience...
...found 6174 targets...
...updating 7 targets...
gcc.compile.c++ bin.v2/libs/graph/build/gcc-4.2.1/release/threading-multi/graphml.o
./boost/property_tree/detail/rapidxml.hpp: In function 'size_t boost::property_tree::detail::rapidxml::internal::get_index(Ch) [with Ch =
 char]':
./boost/property_tree/detail/rapidxml.hpp:1413:   instantiated from 'static unsigned char
 boost::property_tree::detail::rapidxml::xml_document<Ch>::whitespace_pred::test(Ch) [with Ch = char]'
./boost/property_tree/detail/rapidxml.hpp:1542:   instantiated from 'static void
 boost::property_tree::detail::rapidxml::xml_document<Ch>::skip(Ch*&) [with StopPred =
 boost::property_tree::detail::rapidxml::xml_document<char>::whitespace_pred, int Flags = 3072, Ch = char]'
./boost/property_tree/detail/rapidxml.hpp:1377:   instantiated from 'void boost::property_tree::detail::rapidxml::xml_document<Ch>::parse(Ch*)
 [with int Flags = 3072, Ch = char]'
./boost/property_tree/detail/xml_parser_read_rapidxml.hpp:116:   instantiated from 'void
 boost::property_tree::xml_parser::read_xml_internal(std::basic_istream<typename Ptree::key_type::value_type, std::char_traits<typename
 Ptree::key_type::value_type> >&, Ptree&, int, const std::string&) [with Ptree = boost::property_tree::basic_ptree<std::basic_string<char,
 std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >,
 std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >]'
./boost/property_tree/xml_parser.hpp:52:   instantiated from 'void boost::property_tree::xml_parser::read_xml(std::basic_istream<typename
 Ptree::key_type::value_type, std::char_traits<typename Ptree::key_type::value_type> >&, Ptree&, int) [with Ptree =
 boost::property_tree::ptree]'
libs/graph/src/graphml.cpp:49:   instantiated from here
./boost/property_tree/detail/rapidxml.hpp:317: warning: comparison is always false due to limited range of data type
gcc.compile.c++ bin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi/read_graphviz_new.o
c++: Internal error: Killed: 9 (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

    "c++"  -ftemplate-depth-128 -O2 -pipe -fno-strict-aliasing -Wno-long-long -O3 -finline-functions -Wno-inline -Wall -pthread 
 -DBOOST_ALL_NO_LIB=1 -DBOOST_HAS_ICU=1 -DNDEBUG  -I"." -I"/usr/local/include" -I"libs/graph/src" -c -o
 "bin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi/read_graphviz_new.o" "libs/graph/src/read_graphviz_new.cpp"

...failed gcc.compile.c++ bin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi/read_graphviz_new.o...
...removing bin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi/read_graphviz_new.o
...skipped <pbin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi>libboost_graph.a(clean) for lack of
 <pbin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi>read_graphviz_new.o...
...skipped <pbin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi>libboost_graph.a for lack of
 <pbin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi>read_graphviz_new.o...
...skipped <pstage/lib>libboost_graph.a for lack of <pbin.v2/libs/graph/build/gcc-4.2.1/release/link-static/threading-multi>libboost_graph.a...
gcc.link.dll bin.v2/libs/graph/build/gcc-4.2.1/release/threading-multi/libboost_graph.so
common.copy stage/lib/libboost_graph.so
...failed updating 1 target...
...skipped 3 targets...
...updated 3 targets...
*** Error code 1

Stop in /usr/ports/devel/boost-libs.
*** Error code 1

Stop in /usr/ports/devel/boost-libs.
*** Error code 1

Stop in /usr/ports/devel/boost-all.
*** Error code 1

Stop in /usr/ports/devel/boost-all.
```

I'm running FreeBSD under WMware Fusion if that makes a difference.


----------



## Oxyd (Jun 18, 2011)

Mikael said:
			
		

> ```
> c++: Internal error: Killed: 9 (program cc1plus)
> Please submit a full bug report.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> ...



That warning should be "harmless" -- it's just a warning, and there's no -Werror in the compile flags. It shouldn't be a reason to stop the build.

The internal compiler error is your problem. An ICE is usually due to memory/CPU/other hardware problems, as compilers are usually very thoroughly tested -- let alone on Boost, which is used by lots of people. 

If you run the compile multiple times, do you always get the same error? That is, does it always stop at the same place? Does it always end with error code 9? If it is reproducible, and it always ends up being exactly the same problem at exactly the same place, you've probably hit a bug in the compiler. Otherwise (which is more likely, I'm afraid), you have a worse problem at hand.

Have you had any other random problems recently? (Both in your VM and on your host as well as other VMs possibly.) That would indicate a problem in your hardware.


----------



## Mikael (Jun 19, 2011)

After a few tries it finally compiled and when I did get an error it was random, which didn't make any sense because everything else on this computer is stable. Shutting down the VM last night the error was right there in front of me:


```
swap_pager_getswapspace(2): failed
swap_pager_getswapspace(2): failed
pid 3408 (cc1plus), uid 0, was killed: out of swap space
swap_pager: out of swap space
swap_pager_getswapspace(11): failed
pid 4083 (cc1plus), uid 0, was killed: out of swap space
```

Looking at the gcc error again it does say it was killed, but the "internal error" through me off :r


----------

