Discussion:
[Boost-build] Installing boost 1.59 from .tgz on Linux Mint 17.3 failed with "command.c(63): error: identifier "__INT_MAX__" is undefined"
Andreas Delleske
2015-12-16 10:46:17 UTC
Permalink
Dear list,

I'm trying to install boost 1.59 with Intel C++ Compiler 2016 on a fresh
Linux Mint 17.2 / now 17.3.

I've done this (on other GNU/Linuxes) before, but now I get these errors:


--------- snip ---------
###
### Using 'intel-linux' toolset.
###
rm -rf bootstrap
mkdir bootstrap
icc -o bootstrap/jam0 command.c compile.c debug.c expand.c glob.c hash.c
hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c
newstr.c option.c output.c parse.c pathunix.c pathvms.c regexp.c rules.c
scan.c search.c subst.c timestamp.c variable.c modules.c strings.c
filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c
modules/set.c modules/path.c modules/regex.c modules/property-set.c
modules/sequence.c modules/order.c execunix.c fileunix.c
command.c(63): error: identifier "__INT_MAX__" is undefined
while ( ( allocated < 0 ) && ( max_line < INT_MAX / 2 ) );
^

compilation aborted for command.c (code 2)
expand.c(148): error: identifier "__INT_MAX__" is undefined
while ( ( at_len < 0 ) && ( at_size < INT_MAX / 2 ) );
^

compilation aborted for expand.c (code 2)
newstr.c(86): error: type name is not allowed
new_block = (strblock *)BJAM_MALLOC( offsetof( strblock,
data[0] ) + nalloc * sizeof( new_block->data[0] ) );
^

newstr.c(86): error: identifier "data" is undefined
new_block = (strblock *)BJAM_MALLOC( offsetof( strblock,
data[0] ) + nalloc * sizeof( new_block->data[0] ) );
^

compilation aborted for newstr.c (code 2)

--------- snip ---------

When trying to fulfill the dependencies, I was able to install python,
python-dev, bzip2 but I have no bzip2-devel, no bjam package. However,
bjam can be found when unpacking boost.

I was also hoping that bootstrap.sh already checks for dependencies but
apparently not in this enviroment (Linux Mint is closely based on Ubuntu
14.04)


By the way: In your documentation,

http://www.boost.org/doc/libs/1_59_0/more/getting_started/unix-variants.html

in chapter 5.2.2, the Intel compiler target is named "intel" while the
correct choice is and has been "intel-linux". Or am I missing something?

Do I need to submit a bug report and where?

I would greatly appreciate any help on the matter..

Thanks

Andreas
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Steven Watanabe
2015-12-16 17:26:47 UTC
Permalink
AMDG
Post by Andreas Delleske
I'm trying to install boost 1.59 with Intel C++ Compiler 2016 on a fresh
Linux Mint 17.2 / now 17.3.
<snip>
command.c(63): error: identifier "__INT_MAX__" is undefined
expand.c(148): error: identifier "__INT_MAX__" is undefined
newstr.c(86): error: type name is not allowed
newstr.c(86): error: identifier "data" is undefined
This isn't 1.59. newstr.c was renamed quite
a while ago. The other errors also correspond
to code that has been significantly changed.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Andreas Delleske
2015-12-17 16:59:41 UTC
Permalink
Dear Steven,

Thanks for answering!
Post by Steven Watanabe
This isn't 1.59. newstr.c was renamed quite
a while ago. The other errors also correspond
to code that has been significantly changed.
I beg to differ:

I've downloaded boost 1.59.0 (again) from the website

http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download

into /opt/boost/1.59.0/

After untarring:

[...]
boss boost_1_59_0 # ./bootstrap.sh --with-toolset=intel-linux
--prefix=/root/intel-linux
Building Boost.Build engine with toolset intel-linux...
Failed to build Boost.Build build engine
Consult 'bootstrap.log' for more details
boss boost_1_59_0 # cat bootstrap.log
Found in environment
###
### Using 'intel-linux' toolset.
###
rm -rf bootstrap
mkdir bootstrap
icc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c
frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c
jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c
pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c
variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c
native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c
modules/property-set.c modules/sequence.c modules/order.c execunix.c
fileunix.c pathunix.c
object.c(114): error: type name is not allowed
new_block = (strblock *)BJAM_MALLOC( offsetof( strblock, data[
0 ] ) +
^

object.c(114): error: identifier "data" is undefined
new_block = (strblock *)BJAM_MALLOC( offsetof( strblock, data[
0 ] ) +
^

object.c(235): error: expected an expression
return (struct hash_item *)( (char *)obj - offsetof( struct
hash_item, data
^

object.c(235): error: identifier "data" is undefined
return (struct hash_item *)( (char *)obj - offsetof( struct
hash_item, data
^

compilation aborted for object.c (code 2)


------ snip ------

All the best -
Andreas
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
John Maddock
2015-12-17 18:18:33 UTC
Permalink
Post by Andreas Delleske
Dear Steven,
Thanks for answering!
Post by Steven Watanabe
This isn't 1.59. newstr.c was renamed quite
a while ago. The other errors also correspond
to code that has been significantly changed.
I've downloaded boost 1.59.0 (again) from the website
http://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz/download
into /opt/boost/1.59.0/
[...]
boss boost_1_59_0 # ./bootstrap.sh --with-toolset=intel-linux
--prefix=/root/intel-linux
Works for me with Intel-15.0.2 on Ubuntu.

As a quick workaround can you not build bjam with gcc? The compiler you
use to build bjam has no relation to what's used to actually build Boost
BTW, so you can still build Boost with the Intel toolset.

HTH, John.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Andreas Delleske
2015-12-18 14:52:05 UTC
Permalink
Dear John,

Many thanks for your answer..
Post by John Maddock
Works for me with Intel-15.0.2 on Ubuntu.
OK..
Post by John Maddock
As a quick workaround can you not build bjam with gcc?
Sure -
Post by John Maddock
The compiler you
use to build bjam has no relation to what's used to actually build Boost
BTW, so you can still build Boost with the Intel toolset.
Ah OK - so bootstrap.sh uses gcc to build bjam / b2? And then b2 puts
all the files in place? And those files are compiler-agnostic?

I started bootstrap.sh with --prefix=/opt/boost/1.59.0/intel-linux -
seemed to work, although nothing has been put into the folder.

Then I started b2 with

./b2 --prefix=/opt/boost/1.59.0/intel-linux --toolset=linux stage

(I also tried with --toolset=intel-linux, same problem)

... and now I get all kinds of funny errors like:

"icpc" -c -xc++ -w1 -inline-level=2 -O3 -ip -pthread -fPIC -m64
-DBOOST_ALL_NO_LIB=1 -DBOOST_FILESYSTEM_DYN_LINK=1
-DBOOST_SYSTEM_DYN_LINK=1 -DNDEBUG -I"." -c -o
"/opt/boost/1.59.0/intel-linux/boost/bin.v2/libs/filesystem/build/intel-linux/release/threading-multi/path.o"
"libs/filesystem/src/path.cpp"

...failed intel-linux.compile.c++
/opt/boost/1.59.0/intel-linux/boost/bin.v2/libs/filesystem/build/intel-linux/release/threading-multi/path.o...
intel-linux.compile.c++
/opt/boost/1.59.0/intel-linux/boost/bin.v2/libs/filesystem/build/intel-linux/release/threading-multi/path_traits.o
In file included from ./boost/config/compiler/intel.hpp(37),
from ./boost/config.hpp(39),
from ./boost/filesystem/config.hpp(28),
from libs/filesystem/src/path_traits.cpp(20):
./boost/config/compiler/gcc.hpp(283): error: #error directive: "Compiler
not configured - please reconfigure"
# error "Compiler not configured - please reconfigure"

I don't get it.

What do I need to do?

Does boost not just check all its dependencies?

Why do I have to produce a "bjam" program first? I feel dumb and dumber.

Why are there no .deb or .rpm installers?

I am able to build a helloworld program with Intel and icpc -v shows:

icpc version 16.0.0 (gcc version 3.2.0 compatibility)

Unfortunately, i am not using boost myself but I'm trying to install it
for our developer..

Thanks -
Andreas


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Andreas Delleske
2015-12-19 14:24:04 UTC
Permalink
Dear John,
Post by Andreas Delleske
icpc version 16.0.0 (gcc version 3.2.0 compatibility)
There's your problem right there - the gcc-3.2 emulation - we don't
currently support gcc versions that far back. Is that what you really
genuinely want from your Intel installation - gcc-3.2 emulation?
Nono - I don't know how that happened - Linux Mint has gcc 4-8 - no idea
how Intel assumes otherwise..

gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
actual GCC version installed - which makes me wonder if your Intel
install is correct?
Might not be, but the Intel installer does not recognize Linux Mint at
all - not even that it has an Ubuntu core below. I had to tweak the
environment variables similarly to an Intel 2013 we're using elsewhere..

I only can go step by step.
However, I would anticipate other issues issue cropping up with such an
antiquated compiler release (albeit an emulated one).
We have Intel 2016 but it seems to have gone off road..
Please don't take this the wrong way...
No problem at all..
but your developer would
probably be the best person to build Boost - not least because setting
the correct compiler options when building would be critical for him
having a working install (gcc version emulation, C++11 vs C++03 etc).
Well.. it's my boss, too and he expects me to offload work for him.. he
also feels like he's a user and not the developer of the tools he uses..
he trys to enjoy boost without fully understanding the process in the
kitchen..

Andreas

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Loading...