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

Recent FC changes prevent building on mac and Windows #1816

Closed
3 tasks
jmjatlanta opened this issue Jun 21, 2019 · 6 comments · Fixed by bitshares/bitshares-fc#140
Closed
3 tasks

Recent FC changes prevent building on mac and Windows #1816

jmjatlanta opened this issue Jun 21, 2019 · 6 comments · Fixed by bitshares/bitshares-fc#140

Comments

@jmjatlanta
Copy link
Contributor

Changes made to simplify FC are causing builds on mac and Windows to fail.

The mac issues seem to center around fc::promise as well as __int128. Windows seems to have problems with casting the array_iterator to char* for a memcopy

Build Environment
Details about the build environment, including the relevant required libraries. Much of this information can be found in the CMakeFiles/CMakeOutput.log.

  • Host OS: macOS Mojave 10.14.5
  • Host Physical RAM 8GB
  • Source Branch/Tag: develop branch with pmconrad:xxxx_simplifications
  • OpenSSL Version: 1.1.0
  • Boost Version: 1.69
  • C++ Compiler: clang

mac:
A promise::ptr was left in at asio.hpp line 105. After fixing that, you will get a linker error

[ 27%] Linking CXX executable ecc_test
Undefined symbols for architecture x86_64:
  "typeinfo for unsigned __int128", referenced from:
      fc::from_variant(fc::variant const&, unsigned __int128&, unsigned int) in libfc.a(variant.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libraries/fc/tests/ecc_test] Error 1
make[1]: *** [libraries/fc/tests/CMakeFiles/ecc_test.dir/all] Error 2
make: *** [all] Error 2

I will update this ticket for Windows errors soon.

CORE TEAM TASK LIST

  • Evaluate Build Error
  • Provide build guidance
  • Create Bug Report
@jmjatlanta
Copy link
Contributor Author

Windows errors: Several of these:

  C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(147): note: No user-defined-conversion operator available that can perform this conversion, or th
  e operator cannot be called
C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(166): error C2440: 'type cast': cannot convert from 'std::_Array_iterator<_Ty,33>' to 'char *' [C:\
development\cpp\bitshares-core-1789\libraries\fc\fc.vcxproj]
          with
          [
              _Ty=unsigned char
          ]
  C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(166): note: No user-defined-conversion operator available that can perform this conversion, or th
  e operator cannot be called
C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(236): error C2664: 'void *memcpy(void *,const void *,size_t)': cannot convert argument 2 from 'std:
:_Array_const_iterator<_Ty,78>' to 'const void *' [C:\development\cpp\bitshares-core-1789\libraries\fc\fc.vcxproj]
          with
          [
              _Ty=unsigned char
          ]
  C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(236): note: No user-defined-conversion operator available that can perform this conversion, or th
  e operator cannot be called
C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(237): error C2440: 'type cast': cannot convert from 'std::_Array_const_iterator<_Ty,78>' to 'char *
' [C:\development\cpp\bitshares-core-1789\libraries\fc\fc.vcxproj]
          with
          [
              _Ty=unsigned char
          ]
  C:\development\cpp\bitshares-core-1789\libraries\fc\src\crypto\elliptic_common.cpp(237): note: No user-defined-conversion operator available that can perform this conversion, or th
  e operator cannot be called

along with this one, which seems to need adjusting often ( I seem to remember needing to adjust it on the last release )

C:\development\cpp\bitshares-core-1789\libraries\fc\include\fc/fwd_impl.hpp(60): error C2338: Failed to reserve enough space in fc::fwd<T,S> [C:\development\cpp\bitshares-core-1789\l
ibraries\fc\fc.vcxproj]
  C:\development\cpp\bitshares-core-1789\libraries\fc\include\fc/fwd_impl.hpp(85): note: see reference to function template instantiation 'void fc::check_size<152,136>(void)' being c
  ompiled
  C:\development\cpp\bitshares-core-1789\libraries\fc\include\fc/fwd_impl.hpp(84): note: while compiling class template member function 'fc::fwd<fc::tcp_socket::impl,136,double>::fwd
  (void)'
  C:\development\cpp\bitshares-core-1789\libraries\fc\src\network\tcp_socket.cpp(91): note: see reference to function template instantiation 'fc::fwd<fc::tcp_socket::impl,136,double>
  ::fwd(void)' being compiled
  C:\development\cpp\bitshares-core-1789\libraries\fc\include\fc/network/tcp_socket.hpp(54): note: see reference to class template instantiation 'fc::fwd<fc::tcp_socket::impl,136,dou
  ble>' being compiled

@abitmore abitmore added this to the 3.3.0 - Feature Release milestone Jun 22, 2019
@abitmore abitmore added this to To do in Feature Release (3.3.0) via automation Jun 22, 2019
@pmconrad pmconrad moved this from To do to In testing in Feature Release (3.3.0) Jun 24, 2019
@pmconrad pmconrad self-assigned this Jun 24, 2019
@pmconrad
Copy link
Contributor

A promise::ptr was left in at asio.hpp line 105.

Please post the error message. I'm curious why this template gets instantiated on mac but not on linux.

@pmconrad
Copy link
Contributor

Undefined symbols for architecture x86_64:
"typeinfo for unsigned __int128", referenced from:

Possible clang bug? https://bugs.llvm.org/show_bug.cgi?id=23156

C++ Compiler: clang

Which version?

Ah, we may have to enable language extensions for clang too...

@pmconrad
Copy link
Contributor

Please try building with this fc version: bitshares/bitshares-fc#140

@abitmore
Copy link
Member

Need to bump FC to actually close this.

@abitmore abitmore reopened this Aug 13, 2019
Feature Release (3.3.0) automation moved this from Done to In development Aug 13, 2019
@abitmore
Copy link
Member

FC bumped in #1789.

Feature Release (3.3.0) automation moved this from In development to Done Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants