Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure complains about unary operator #12

Closed
jvhaarst opened this issue Mar 30, 2017 · 8 comments
Closed

Configure complains about unary operator #12

jvhaarst opened this issue Mar 30, 2017 · 8 comments
Assignees
Labels

Comments

@jvhaarst
Copy link
Contributor

jvhaarst commented Mar 30, 2017

If I run configure, I get this error:

./configure: line 4899: test: !=: unary operator expected

That line is this one :
configure:if test $ac_cv_header_boost_unordered_unordered_map_hpp != yes; then

I tried to fix it with :
configure:if test "$ac_cv_header_boost_unordered_unordered_map_hpp" != yes; then

But then the configure script kept complaining about missing boost libraries, even if I downloaded the latest version, and placed in the source directory.

Without the fix it compiles fine, by the way.

@benvvalk
Copy link
Contributor

benvvalk commented Mar 30, 2017

Hmm, I can't tell why it isn't working. Your fix to the if test makes sense. Can you post your config.log file? (That contains the log output of ./configure.)

An alternative approach is to download and unpack the boost tarball in some completely unrelated directory and then add --with-boost=<boost-dir> to your ./configure command. (You can run ./configure --help to see the full list of options.) <boost-dir> should be the root-level directory of the unpacked tarball, I think (e.g. --with-boost=/home/joe/Downloads/boost_1_58_0).

@JustinChu
Copy link
Collaborator

JustinChu commented Mar 30, 2017

The unary operator message is caused by a small bug in the configure.ac. I think I fixed it now (still need a new release for it though), but it shouldn't interfere with compiling the code. acd7106

However what Ben said is correct. Using --with-boost= is still needed if boost it is not in your default includes directory.

@jvhaarst
Copy link
Contributor Author

jvhaarst commented Apr 2, 2017

I just had a try on a newly installed Ubuntu 16.04 machine.
I did a git clone of the latest version.
Downloaded and unpacked the latest boost.

The unary operator message is still here, and after my "fix" from above, I do this:

./autogen.sh
./configure --prefix=$(pwd) —with-boost=/root/arcs/boost_1_63_0

And I get this weird result :

checking boost/graph/graph_traits.hpp usability... yes
checking boost/graph/graph_traits.hpp presence... yes
checking for boost/graph/graph_traits.hpp... yes
checking boost/graph/adjacency_list.hpp usability... yes
checking boost/graph/adjacency_list.hpp presence... yes
checking for boost/graph/adjacency_list.hpp... yes
checking boost/graph/undirected_graph.hpp usability... yes
checking boost/graph/undirected_graph.hpp presence... yes
checking for boost/graph/undirected_graph.hpp... yes
checking boost/graph/graphviz.hpp usability... yes
checking boost/graph/graphviz.hpp presence... yes
checking for boost/graph/graphviz.hpp... yes
configure: error: Requires the Boost C++ libraries, which may
	be downloaded from here: http://www.boost.org/users/download/
	The following commands will download and install Boost:
	cd /root/arcs
	wget http://downloads.sourceforge.net/project/boost/boost/1.58.0/1_58_0.tar.bz2
	tar jxf 1_58_0.tar.bz2
	cd -

The strange thing is that is seems to be able to find the boost libraries, yet still somehow complains about not being able to find them..

@conniecl
Copy link

conniecl commented Apr 2, 2017

I also faced the config error ./configure: line 4899: test: !=: unary operator expected, and the make install failed as

mv -f .deps/libdatalayer_a-FastaWriter.Tpo .deps/libdatalayer_a-FastaWriter.Po
rm -f libdatalayer.a
ar cru libdatalayer.a libdatalayer_a-FastaReader.o libdatalayer_a-FastaWriter.o 
ranlib libdatalayer.a
make[2]: Entering directory `/public/home/lchen/software/arcs-binomialx2/DataLayer'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/public/home/lchen/software/arcs-binomialx2/DataLayer'
make[1]: Leaving directory `/public/home/lchen/software/arcs-binomialx2/DataLayer'
Making install in Arcs
make[1]: Entering directory `/public/home/lchen/software/arcs-binomialx2/Arcs'
g++ -DHAVE_CONFIG_H -I. -I..  -I/public/home/lchen/software/arcs-binomialx2/Arcs -I/public/home/lchen/software/arcs-binomialx2/Common -I/public/home/lchen/software/arcs-binomialx2/DataLayer -I/public/home/lchen/software/arcs-binomialx2 -I/public/home/lchen/software/arcs-binomialx2   -isystem/public/home/lchen/software/arcs-binomialx2/1_58_0 -Wall -Wextra -Werror -std=c++0x -fopenmp -g -O2 -MT arcs-Arcs.o -MD -MP -MF .deps/arcs-Arcs.Tpo -c -o arcs-Arcs.o `test -f 'Arcs.cpp' || echo '/public/home/lchen/software/arcs-binomialx2/Arcs/'`Arcs.cpp
In file included from /home/software/opt/gcc-4.8.5/include/c++/4.8.5/backward/hash_set:60:0,
                 from /usr/include/boost/graph/adjacency_list.hpp:25,
                 from /usr/include/boost/graph/undirected_graph.hpp:11,
                 from Arcs.h:20,
                 from Arcs.cpp:1:
/home/software/opt/gcc-4.8.5/include/c++/4.8.5/backward/backward_warning.h:32:2: error: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Werror=cpp]
 #warning \
  ^
Arcs.cpp: In function ‘void writeGraph(const string&, ARCS::Graph&)’:
Arcs.cpp:491:5: error: ‘write_graphviz_dp’ is not a member of ‘boost’
     boost::write_graphviz_dp(out, g, dp);
     ^
cc1plus: all warnings being treated as errors
make[1]: *** [arcs-Arcs.o] Error 1
make[1]: Leaving directory `/public/home/lchen/software/arcs-binomialx2/Arcs'
make: *** [install-recursive] Error 1

Using --with-boost=/public/home/lchen/software/boost_1_61_0, but facing same error.

@JustinChu
Copy link
Collaborator

@jvhaarst I apologize, I didn't test the 'fix' I made previously. I just pushed a fix 90f7ea7 and tested it now and it seems to be okay on my end. Let me know if you still have issues.

@conniecl This doesn't have anything to do with the previous error relative to boost. I think it is a gcc version issue that we need to resolve/update, though I'm pretty sure we have tested it with newer versions of gcc recently. For now, try and older version (4.4.7 mentioned in the readme) of gcc and we will fix it asap.

@conniecl
Copy link

conniecl commented Apr 3, 2017

@JustinChu Thanks for your adivise, I have changed the gcc to 4.47, it seems work well. And thanks you again

@jvhaarst
Copy link
Contributor Author

jvhaarst commented Apr 3, 2017

@JustinChu I have just done a new test run, and your fixes work, I no longer see a unary operator warning and the boost libraries are used.
The compilation did fail as I hadn't installed zlib yet, but after that it went fine.

So all is well, but you might want to add zlib to the checks.

@jvhaarst jvhaarst closed this as completed Apr 3, 2017
@benvvalk
Copy link
Contributor

benvvalk commented Apr 3, 2017

Thank you, @JustinChu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants