metaplex-foundation/sugar

[Bug]: Cannot compile from source

duckzland opened this issue · 3 comments

Issue description

Ubuntu 20

  1. apt install cargo libssl-dev

  2. git clone https://github.com/metaplex-foundation/sugar.git

  3. cd sugar

  4. cargo install --path ./

Relevant log output

Compiling solana-streamer v1.10.34
error[E0432]: unresolved import `mpl_token_metadata::utils::create_or_allocate_account_raw`
 --> /home/playmo/.cargo/registry/src/github.com-1ecc6299db9ec823/mpl-candy-machine-4.5.0/src/processor/collection/set_collection.rs:6:5
  |
6 |     utils::create_or_allocate_account_raw,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `create_or_allocate_account_raw` in `utils`

error[E0432]: unresolved import `mpl_token_metadata::utils::assert_derivation`
 --> /home/playmo/.cargo/registry/src/github.com-1ecc6299db9ec823/mpl-candy-machine-4.5.0/src/processor/collection/set_collection_during_mint.rs:5:5
  |
5 |     utils::assert_derivation,
  |     ^^^^^^^^^^^^^^^^^^^^^^^^ no `assert_derivation` in `utils`

Priority this issue should have

Medium (should be fixed soon)

Thanks for the bug report, this will be fixed once this PR is merged. In the meantime you can get the pre-built binary by using the install script:

bash <(curl -sSf https://sugar.metaplex.com/install.sh)

thanks, managed to use the prebuild binary, but at Ubuntu 20 , need to build custom libssl:

### Build the incompatible libssl
cd ~/
mkdir openssl
cd openssl
wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz
tar -zxvf openssl-1.1o.tar.gz
cd openssl-1.1.1o
./config
make
make install

// Link the incompatible ssl so it wont interferes with the ubuntu default ssl version
ln -s /usr/local/lib/libssl.so.1.1  /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib/libssl.so.1.1  /usr/lib/libssl.so.1.1
ln -s /usr/local/lib/libcrypto.so.1.1  /usr/lib64/libcrypto.so.1.1
ln -s /usr/local/lib/libcrypto.so.1.1  /usr/lib/libcrypto.so.1.1

Building from source should work again. Re-open the issue if it doesn't.