Problems with installation in Ubuntu 16.04
My system manager upgrade the computer from Ubuntu 14.04 to 16.04.
In Ubuntu 14.04, I was running esys-particle without problems, but after the upgrade I could not install essays-particle again.
I am trying to install the esys trunk version 2.3.4
When I run the ./configure I get the following error:
checking for Boost headers version >= 1.34.1... yes
checking for Boost's header version...
./configure: line 19542: let: major_version=
./configure: line 19543: let: minor_version=
./configure: line 19544: let: patch_level=%100: syntax error: operand expected (error token is "%100")
./configure: line 19549: test: : integer expression expected
./configure: line 19554: test: : integer expression expected
Boost Version is .
configure: error: invalid value: boost_major_
It seems that the variable ${boost_
I am using lib boost version 1.58
I found it with:
dpkg -S /usr/include/
>> libboost1.
Any help?
I could also fire my system manager, but it is very difficult to get a new one.
Regards
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Gonzalo Tancredi
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Hello Gonzalo:
I am unsure if Ubuntu has changed standard locations for system files or if the Config/boost.m4 script is broken. Simple things first:
1) It appears that you have not used the --with-boost option to supply a path for the Boost directory (not typically a problem if Boost files have been installed in a system location). Add:
--with-boost=/usr
to your configure line, and then post the same output as above. This will not likely fix your problem, but I wish to see what the configure script outputs. Ordinarily the above line:
checking for Boost headers version >= 1.34.1... yes
indicates that the system Boost files have been found, and then the rest of the Boost configuration proceeds smoothly. So probably there is a deeper issue.
2) Search for a line in /usr/include/
#define BOOST_VERSION 105800
3) In config.log look for a line containing:
checking for Boost headers version
and post the next several lines when you reply.
Regards,
Vince
Revision history for this message
|
#2 |
Hi Vince
I follow your requests:
1) Using
/configure CC=mpicc CXX=mpic++ --prefix=
I get
checking for Boost headers version >= 1.34.1... /usr/include
checking for Boost's header version...
./configure: line 19542: let: major_version=
./configure: line 19543: let: minor_version=
./configure: line 19544: let: patch_level=%100: syntax error: operand expected (error token is "%100")
./configure: line 19549: test: : integer expression expected
./configure: line 19554: test: : integer expression expected
Boost Version is .
configure: error: invalid value: boost_major_
2)
I do have the line
#define BOOST_VERSION 105800
3) The config.log of the previous run have
configure:19389: checking for Boost headers version >= 1.34.1
configure:19460: mpic++ -c -g -O2 -I/usr/include conftest.cpp >&5
configure:19460: $? = 0
configure:19481: result: /usr/include
configure:19512: checking for Boost's header version
configure:19540: result:
configure:19558: error: invalid value: boost_major_
But if I do not include in the .configure command the --with-boost=/usr
I get in the output:
checking for Boost headers version >= 1.34.1... yes
checking for Boost's header version...
./configure: line 19542: let: major_version=
./configure: line 19543: let: minor_version=
./configure: line 19544: let: patch_level=%100: syntax error: operand expected (error token is "%100")
./configure: line 19549: test: : integer expression expected
./configure: line 19554: test: : integer expression expected
Boost Version is .
configure: error: invalid value: boost_major_
And in the config.log file
configure:19389: checking for Boost headers version >= 1.34.1
configure:19460: mpic++ -c -g -O2 conftest.cpp >&5
configure:19460: $? = 0
configure:19481: result: yes
configure:19512: checking for Boost's header version
configure:19540: result:
configure:19558: error: invalid value: boost_major_
Regards
Gonzalo
Revision history for this message
|
#3 |
Hi Vince
I follow your requests:
1) Using
/configure CC=mpicc CXX=mpic++ --prefix=
I get
checking for Boost headers version >= 1.34.1... /usr/include
checking for Boost's header version...
./configure: line 19542: let: major_version=
./configure: line 19543: let: minor_version=
./configure: line 19544: let: patch_level=%100: syntax error: operand expected (error token is "%100")
./configure: line 19549: test: : integer expression expected
./configure: line 19554: test: : integer expression expected
Boost Version is .
configure: error: invalid value: boost_major_
2)
I do have the line
#define BOOST_VERSION 105800
3) The config.log of the previous run have
configure:19389: checking for Boost headers version >= 1.34.1
configure:19460: mpic++ -c -g -O2 -I/usr/include conftest.cpp >&5
configure:19460: $? = 0
configure:19481: result: /usr/include
configure:19512: checking for Boost's header version
configure:19540: result:
configure:19558: error: invalid value: boost_major_
But if I do not include in the .configure command the --with-boost=/usr
I get in the output:
checking for Boost headers version >= 1.34.1... yes
checking for Boost's header version...
./configure: line 19542: let: major_version=
./configure: line 19543: let: minor_version=
./configure: line 19544: let: patch_level=%100: syntax error: operand expected (error token is "%100")
./configure: line 19549: test: : integer expression expected
./configure: line 19554: test: : integer expression expected
Boost Version is .
configure: error: invalid value: boost_major_
And in the config.log file
configure:19389: checking for Boost headers version >= 1.34.1
configure:19460: mpic++ -c -g -O2 conftest.cpp >&5
configure:19460: $? = 0
configure:19481: result: yes
configure:19512: checking for Boost's header version
configure:19540: result:
configure:19558: error: invalid value: boost_major_
Regards
Gonzalo
Revision history for this message
|
#4 |
Hi,
if you need just a working ESyS particle and do not need to modify the
source code, you can install it from package manager (apt-get install esys-particle).
Otherwise there is a d\rules file [1] which builds the package, you can get
configuration flags from there.
[1] https:/
Best regards
Anton
Revision history for this message
|
#5 |
Hi Anton
I need to install essys from the source code because I have some students working in some new implementations of the code.
I will have a look to the the rules file. Thanks.
Regards
Gonzalo
Revision history for this message
|
#6 |
Hi Anton
I tried to extract the configuration flags from the rules file, but I did not succeed.
Any further help would be useful.
Regards
Gonzalo
Revision history for this message
|
#7 |
Hi Gonzalo:
The problem seems to start from about line 237 in Config/boost.m4:
[
After this command ${boost_
$cp -p boost.m4 boost.m4.original
Open boost.m4 and go to about line 91. This line should be "rm -rf conftest*", inside the m4_define for _BOOST_SED_CPP. Above this line add the following:
for name in conftest*; do cp -p ${name} copy.${name}; done
Save boost.m4, go back to your source directory, run autogen.sh followed by your usual configure command. Then look for copy.conftest.i and see if it contains "105800" as it should. If it does, then try on the command line:
$boost_
$echo ${boost_
In the meantime, I will need to install the latest Ubuntu and try to duplicate the errors that you have encountered.
Regards,
Vince
Revision history for this message
|
#8 |
Hi Vince
I follow your steps.
The output of
cat copy.conftest.i
is an empty line.
The output of
cat copy.conftest.cpp
is:
/* confdefs.h */
#define PACKAGE_NAME "ESyS-Particle"
#define PACKAGE_TARNAME "esys-particle"
#define PACKAGE_VERSION "2.3.2"
#define PACKAGE_STRING "ESyS-Particle 2.3.2"
#define PACKAGE_BUGREPORT "<email address hidden>"
#define PACKAGE_URL ""
#define PACKAGE "esys-particle"
#define VERSION "2.3.2"
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define HAVE_LIBPYTHON2_7 1
#define HAVE_BOOST 1
/* end confdefs.h. */
#include <boost/version.hpp>
boost-full-
If I do in the command line
$boost_
$echo ${boost_
(note that I change conftest.i to copy.conftest.i in your set of commands, because there is no conftest.i file.
Therefore copy.conftest.i does not contains "105800"
Regards
Gonzalo
Revision history for this message
|
#9 |
Well, we know that conftest.cpp can be created by configure. Looking in boost.m4, lines 86-90 and 234-236, I think that M4 runs the C++ preprocessor on conftest.cpp to replace "BOOST_VERSION" in the line "boost-
$echo ${script} # to check that the variable does not already hold a value
$script=
$echo ${script} # to check the new value
$gcc -E copy.conftest.cpp | sed -n -e "${script}" > copy.conftest.i
This should create copy.conftest.i which has only 105800. The goal of this test is to verify that the basic syntax still works on the upgraded ubuntu.
You might also try reverting to the original boost.m4 (copy the contents of https:/
Let me know how you go. I will delve some more into this problem shortly, but at the moment I have fallen behind in my current job. My thanks for your testing so far.
Regards,
Vince
Revision history for this message
|
#10 |
In my last few messages suggesting a command to run at the prompt ($), I should have had a space between the prompt symbol and the command for the sake of readability; for example:
$ echo ${script}
instead of
$echo ${script}
I've only now picked up on these mistakes.
Revision history for this message
|
#11 |
Hi Vince
Bad news.
I tried the first test. The output of
$ gcc -E copy.conftest.cpp | sed -n -e "${script}" > copy.conftest.i
is an empty line in copy.conftest.i
I also run
$ gcc -E copy.conftest.cpp
and I get
# 1 "copy.conftest.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/
# 1 "<command-line>" 2
# 1 "copy.conftest.cpp"
# 25 "copy.conftest.cpp"
# 1 "/usr/include/
# 26 "copy.conftest.cpp" 2
boost-full-
# 26 "copy.conftest.cpp" 3 4
(I try the same in another linux machine with 14.04 and I get for the last lines
# 26 "copy.conftest.cpp" 2
boost-full-
)
Therefore I guess there is something wrong with the output structure.
I also copy the boost.m4 of the link, run autopen.sh and config and I get up to
checking for Py_Main in -lpython2.7... yes
./configure: line 18917: syntax error near unexpected token `else'
./configure: line 18917: ` else'
and error just before the
checking for Boost headers version
of the previous runs.
Thanks and Regards
Gonzalo
Revision history for this message
|
#12 |
Hello Gonzalo:
I think you have narrowed the problem down to the version of GCC that ships with Ubuntu 16.04 (rather than a syntax error which I earlier suspected). The C++ preprocessor in your version is treating the number 105800 as coming from a system header file (https:/
# 1 "/usr/include/
Running "gcc -E copy.conftest.cpp" on my current machine (using GCC 4.9.2) yields:
# 1 "copy.conftest.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/
# 1 "<command-line>" 2
# 1 "copy.conftest.cpp"
# 25 "copy.conftest.cpp"
# 1 "/usr/include/
# 26 "copy.conftest.cpp" 2
boost-full-
What version of GCC have you on Ubuntu 16.04, and on the 14.04 machine? It seems that the new preprocessor distinguishes between "boost-
Add "-P" to the gcc command:
$ gcc -E -P copy.conftest.cpp
On my computer this gives me one line of output:
boost-full-
I am curious to know if you get:
boost-full-
from your upgraded ubuntu as an unbroken line.
Regards,
Vince
Revision history for this message
|
#13 |
Hi Vince
The output of
$ gcc -E -P copy.conftest.cpp
is
boost-full-
Regarding the version of gcc, if I run
$ gcc -v
I get
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~
Regards
Gonzalo
Revision history for this message
|
#14 |
Okay, you have GCC 5.4.0.
Repeat the earlier test with the -P option:
$ echo ${script} # to check that the variable does not already hold a value
$ script=
$ echo ${script} # to check the new value
$ gcc -E -P copy.conftest.cpp | sed -n -e "${script}" > copy.conftest.i
If you get 105800 in copy.conftest.i as a result, then try adding -P to boost.m4. (Unfortunately I am away from the machine that has Boost and ESyS-Particle installed, otherwise I would try this now myself.) Change line 86 from:
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_
to:
(eval "$ac_cpp -P conftest.$ac_ext") 2>&AS_MESSAGE_
As before, run autogen.sh and then configure. I have limited knowledge of shell scripting (and very limited understanding of the M4 language), so I hope this works.
Regards,
Vince
Revision history for this message
|
#15 |
SOLVED !!!
Hi Vince
The problem is it solved with your last suggestion:
In the original file Config/boost.m4 change line 86 from:
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_
to:
(eval "$ac_cpp -P conftest.$ac_ext") 2>&AS_MESSAGE_
run autogen.sh and then configure
It also solve the same problem with the installation of Gengeo.
In that case, you must change config/boost.m4.
Thank you very much !!!
Best regards
Gonzalo
Revision history for this message
|
#16 |
Hello Gonzalo:
That is very good. As you may have guessed, "-P Inhibit[s] generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers." (From https:/
I will update the ESyS-Particle and GenGeo repositories with the patch in the next few days. Thank you very much for your patience and your testing. It got us to the solution much quicker than otherwise.
Regards,
Vince