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

OS X build error: invalid operands to binary expression #17

Closed
jason-tilley opened this issue Mar 3, 2018 · 2 comments
Closed

OS X build error: invalid operands to binary expression #17

jason-tilley opened this issue Mar 3, 2018 · 2 comments

Comments

@jason-tilley
Copy link

I am having trouble compiling with clang on MacOS High Sierra. I get multiple errors about binary operands. For example:

info:build /opt/local/var/macports/build/_Users_fortozs_ports_devel_libff/libff/work/libff-master/libff/algebra/curves/alt_bn128/alt_bn128_pairing.cpp:49:9: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const alt_bn128_Fq2' (aka 'const Fp2_model<alt_bn128_q_limbs, alt_bn128_modulus_q>'))
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:1086:1: note: candidate function [with _CharT = char, _Traits = std::__1::char_traits<char>] not viable: no known conversion from 'const alt_bn128_Fq2' (aka 'const Fp2_model<alt_bn128_q_limbs, alt_bn128_modulus_q>') to 'const std::__1::error_code' for 2nd argument
:info:build operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
:info:build /opt/local/var/macports/build/_Users_fortozs_ports_devel_libff/libff/work/libff-master/libff/algebra/curves/alt_bn128/alt_bn128_pairing.cpp:55:8: error: invalid operands to binary expression ('std::istream' (aka 'basic_istream<char>') and 'alt_bn128_Fq2' (aka 'Fp2_model<alt_bn128_q_limbs, alt_bn128_modulus_q>'))

Right now I am compiling with -DWITH_PROCPS=OFF and -DIS_LIBFF_PARENT=OFF (I have preinstalled ate-pairing and xbyak detected successfully in the configure phase). I also had to append -std=c++11 to my cxxflags. Any ideas on what these errors are about?

@jason-tilley
Copy link
Author

jason-tilley commented Mar 3, 2018

Here is the failing compile command I believe...

/usr/bin/clang++ -DBINARY_OUTPUT -DBN_SUPPORT_SNARK=1 -DCURVE_BN128 -DMONTGOMERY_OUTPUT -DNO_PROCPS -DUSE_ASM -I/opt/local/var/macports/build/_Users_fortozs_ports_devel_libff/libff/work/libff-master/libff/.. -isystem /opt/local/include -pipe -std=c++11 -DNDEBUG -stdlib=libc++ -arch x86_64 -mmacosx-version-min=10.13 -o CMakeFiles/ff.dir/algebra/curves/alt_bn128/alt_bn128_g1.cpp.o -c /opt/local/var/macports/build/_Users_fortozs_ports_devel_libff/libff/work/libff-master/libff/algebra/curves/alt_bn128/alt_bn128_g1.cpp

mobileink added a commit to minatools/libff that referenced this issue Jul 20, 2020
# This is the 1st commit message:

bazel support, initial commit

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#2:

gitignore .bazelrc, bazel-*

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#3:

remove sha256 from rule_foreign_cc rule

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#4:

rename target ff to libff

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#5:

put curves/mnt/mnt4, 6 in separate packages

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#6:

bn128: drop "depends" from include prefix, for bazel compatibility

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#7:

fix refs to targets mnt4, mnt6, libff

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#8:

fix refs to @ate_pairing//:libgmp

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#9:

change @// to //

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#10:

delete obsolete mnt4, mnt6 targets from curves/mnt/BUILD.bazel

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#11:

add target scalar_multiplication:multiexp_profile

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#12:

list headers explicitly

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#13:

dead code elim

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#14:

dead code elim

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#15:

BUILD files: explicitate srcs/hdrs, DCE, buildifier reformat

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#16:

change @ate_pairing//:zm to @ate_pairing//ate-pairing

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#17:

switch obazl repos from local to git

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#18:

pin xbyak, ate-pairing repos to versions, to match upstream

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#19:

delete git submodules, not needed with Bazel

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#20:

add sha256 for xbyak, ate-pairing external repos

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#21:

remove xbyak dep - it's included in ate-pairing

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>

# This is the commit message scipr-lab#22:

restore depends dirs

Signed-off-by: Gregg Reynolds <601396+mobileink@users.noreply.github.com>
@ValarDragon
Copy link
Member

Closing in favor of #4 for now

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

No branches or pull requests

2 participants