EOSIO / eosio.cdt

EOSIO.CDT (Contract Development Toolkit) is a suite of tools used to build EOSIO contracts
http://eosio.github.io/eosio.cdt
MIT License
512 stars 288 forks source link

eosiocpp vs eosio-cpp #266

Closed rubenabix closed 5 years ago

rubenabix commented 5 years ago

I am using https://hub.docker.com/r/eosio/eos-dev/ 1.4.2 but it has eosiocpp but not eosio-cpp. Any idea about that?

conr2d commented 5 years ago

You can get eosio-cpp from eosio/cdt in place of eosio/eos-dev.

NewETown commented 5 years ago

@conr2d the CDT package seems to be out of date if you try to compile 1.4.x contracts, any idea what the fix is for that? I'm pretty new to the toolsets (and docker) so I'm a bit out of my element, would appreciate any pointers so I can keep up with the latest stable version of the core code

conr2d commented 5 years ago

@NewETown I use eosio.cdt from source in place of prebuilt docker image. In my case, the installed path of eosio.cdt is "/usr/opt/eosio.cdt", so it fails to run find_package(eosio.cdt) in CMakeLists.txt of eosio.contracts. I can build after creating symbolic link:

$ sudo ln -s /usr/opt/eosio.cdt/1.3.2/lib/cmake/eosio.cdt /usr/local/lib/cmake/eosio.cdt`

EDITED: I'm sorry, but this is wrong information. I take another package for eosio.contracts. If I find a solution, I will leave a comment again.

conr2d commented 5 years ago

Hmm, basically this failure of compiling 1.4.x contracts is caused by the mismatch of eosio verison check in unit tests. You can comment out unit tests to bypass version check, but contracts will be compiled successfully. Add # symbol in the first of the line in given link. https://github.com/EOSIO/eosio.contracts/blob/master/CMakeLists.txt#L46

NewETown commented 5 years ago

@conr2d It's an issue with the Brew version of the CDT, uninstalling the Homebrew CDT and installing from source fixed the problem for me. It's indeed a failure with compiling anything 1.4.x+, hopefully they update their tutorial or the Brew installation soon! Going to cause problems for newer people

gleehokie commented 5 years ago

The eosio/cdt package is up to date with the latest CDT release.

If you prefer you can also use the package files available here or you can build from source (it takes a long time).