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

Handle Rust (sc-meta) dependencies: pkg-config, libssl-dev #338

Open
andreibancioiu opened this issue Sep 23, 2023 · 2 comments
Open

Handle Rust (sc-meta) dependencies: pkg-config, libssl-dev #338

andreibancioiu opened this issue Sep 23, 2023 · 2 comments
Labels
task Task

Comments

@andreibancioiu
Copy link
Contributor

andreibancioiu commented Sep 23, 2023

mxpy is not aware of some dependencies of sc-meta:

Reported here: https://t.me/MultiversXDevelopers/118542.

Summary of the error message:

error: failed to run custom build command for openssl-sys
@andreibancioiu
Copy link
Contributor Author

Workaround: run sudo apt-get install pkg-config libssl-dev (on Ubuntu).

@andreibancioiu
Copy link
Contributor Author

More detailed error message (for future reference):

error: failed to run custom build command for `openssl-sys             
 v0.9.93`                                                               
                                                                        
 Caused by:                                                             
   process didn't exit successfully:                                    
   (...)
           
 "--cflags" "openssl"`                                                  
   The pkg-config command could not be found.                           
                                                                        
   Most likely, you need to install a pkg-config package for            
 your OS.                                                               
   Try `apt install pkg-config`, or `yum install pkg-config`,           
   or `pkg install pkg-config`, or `apk add pkgconfig`                  
 depending on your distribution.                                        
                                                                        
   If you've already installed it, ensure the pkg-config                
 command is one of the                                                  
   directories in the PATH environment variable.                        
                                                                        
   If you did not expect this build to link to a pre-installed          
 system library,                                                        
   then check documentation of the openssl-sys crate for an             
 option to                                                              
   build the library from source, or disable features or                
 dependencies                                                           
   that require pkg-config.                                             
                                                                        
   --- stderr                                                           
   thread 'main' panicked at '                                          
                                                                        
   Could not find directory of OpenSSL installation, and this           
 `-sys` crate cannot                                                    
   proceed without this knowledge. If OpenSSL is installed and          
 this crate had                                                         
   trouble finding it,  you can set the `OPENSSL_DIR`                   
 environment variable for the                                           
   compilation process.                                                 
                                                                        
   Make sure you also have the development packages of openssl          
 installed.                                                             
   For example, `libssl-dev` on Ubuntu or `openssl-devel` on            
 Fedora.                                                                
                                                                        
   If you're in a situation where you think the directory               
 *should* be found                                                      
   automatically, please open a bug at                                  
 https://github.com/sfackler/rust-openssl                               
   and include information about your system as well as this            
 message.                                                               
                                                                        
   $HOST = x86_64-unknown-linux-gnu                                     
   $TARGET = x86_64-unknown-linux-gnu                                   
   openssl-sys = 0.9.93                                                 
                                                                        
                                                                        
   It looks like you're compiling on Linux and also targeting           
 Linux. Currently this                                                  
   requires the `pkg-config` utility to find OpenSSL but                
 unfortunately `pkg-config`                                             
   could not be found. If you have OpenSSL installed you can            
 likely fix this by                                                     
   installing `pkg-config`.                                             
                                       
 error: failed to compile `multiversx-sc-meta ...`                               

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

No branches or pull requests

1 participant