cloudhead / rx

👾 Modern and minimalist pixel editor
https://discord.gg/xHggPjfsS9
GNU General Public License v3.0
3.09k stars 109 forks source link

Fails to build on 18.04 #44

Closed popey closed 4 years ago

popey commented 4 years ago

I'm trying to build a snap of rx, on an Ubuntu 18.04 system. Using rust nightly, it fails to build as below. Any ideas what I can do here?

   Compiling rgx v0.1.8                                                                                                             
   Compiling rx v0.2.0 (/root/parts/rx/build)                                                                                                             
error[E0308]: mismatched types                                                                                                                                                                                                                                                                                                                                                    
   --> src/renderer.rs:242:37                                     
    |                                                                                                                                                                                                                                                                                                                                                                             
242 |             Op::Fill(&font.texture, font_img.as_slice()),                                                                                                                          
    |                                     ^^^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Rgba8`, found `u8`                                                                                                                                                                                                                                                                      
    |                                                                                                                                                     
    = note: expected reference `&[rgx::core::Rgba8]`                                                                                                                                                                                                                                                                
               found reference `&[u8]`                                                                                                                                                                                                                                  

error[E0308]: mismatched types                                               
   --> src/renderer.rs:243:40                                                                                                                                                            
    |                                                                                                                                                                                    
243 |             Op::Fill(&cursors.texture, cursors_img.as_slice()),                                                                                                                                                                                                                                                                                                             
    |                                        ^^^^^^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Rgba8`, found `u8`                                                                                                                                                                                                                                                                
    |                                                                                                                                                     
    = note: expected reference `&[rgx::core::Rgba8]`                                                                                                      
               found reference `&[u8]`                                       

error[E0308]: mismatched types                                                                                                                                                                                                                                                                                                                                                    
   --> src/renderer.rs:244:40                                                                                                                                                            
    |                                                                                                                                                                                                                                                                                                                                                                             
244 |             Op::Fill(&checker.texture, &checker_img),                                                                                                                              
    |                                        ^^^^^^^^^^^^ expected slice, found array `[u8; 16]`                                                                                         
    |                                                                                                                                                     
    = note: expected reference `&[rgx::core::Rgba8]`                                                                                                                                                                                                                                                                
               found reference `&[u8; 16]`                                                  

error[E0308]: mismatched types                                                                                                                                                           
   --> src/renderer.rs:603:42                                                               
    |                                                                                       
603 |                 Op::Clear(&view_data.fb, Rgba::TRANSPARENT),                                                                                                                       
    |                                          ^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Bgra8`, found struct `rgx::core::Rgba`                    

error[E0308]: mismatched types                                                                        
   --> src/renderer.rs:604:50                                                                                                                                                                                
    |                          
604 |                 Op::Clear(&view_data.staging_fb, Rgba::TRANSPARENT),                                                                                                                                   
    |                                                  ^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Bgra8`, found struct `rgx::core::Rgba`                                                                  

error[E0061]: this function takes 5 parameters but 6 parameters were supplied                         
   --> src/renderer.rs:605:17                                                                                                                                                                                
    |                        
605 | /                 Op::Transfer(    
606 | |                     &view_data.fb,
607 | |                     pixels.as_slice(),                                                        
608 | |                     sw, // Source width                                                       
...   |                                                                                                                                                                                                      
611 | |                     th, // Transfer height
612 | |                 ),    
    | |_________________^ expected 5 parameters

error[E0308]: mismatched types                                                                        
   --> src/renderer.rs:616:38                                                                                                                                                                                
    |                                                                                                 
616 |             r.prepare(&[Op::Fill(fb, snapshot.pixels().as_slice())]);                                                                                                                                  
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Bgra8`, found `u8`                                                                                       
    |                                                                                                 
    = note: expected reference `&[rgx::core::Bgra8]`                                                  
               found reference `&[u8]`

error[E0308]: mismatched types                                                                        
   --> src/renderer.rs:663:42                                                                         
    |                          
663 |                 Op::Clear(&view_data.fb, Rgba::TRANSPARENT),                                    
    |                                          ^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Bgra8`, found struct `rgx::core::Rgba`                                                                          

error[E0308]: mismatched types                                                                        
   --> src/renderer.rs:664:50                                                                                                       
    |                                              
664 |                 Op::Clear(&view_data.staging_fb, Rgba::TRANSPARENT),                            
    |                                                  ^^^^^^^^^^^^^^^^^ expected struct `rgx::core::Bgra8`, found struct `rgx::core::Rgba`                                                                  

error[E0308]: mismatched types                                                                        
   --> src/renderer.rs:665:41                                                                         
    |                                                                                                                                                                                                                                                                   
665 |                 Op::Fill(&view_data.fb, &pixels),                                               
    |                                         ^^^^^^^ expected slice, found struct `std::vec::Vec`    
    |                                                                                                 
    = note: expected reference `&[rgx::core::Bgra8]`                                                  
               found reference `&std::vec::Vec<u8>`                                                   

error[E0599]: no function or associated item named `empty` found for type `rgx::core::Rect<_>` in the current scope                                                                                          
   --> src/session.rs:922:40                                                                                                                                                                                 
    |                                                                                                                               
922 |                 self.selection = Rect::empty();                                                                                                     
    |                                        ^^^^^ function or associated item not found in `rgx::core::Rect<_>`                                                                                                                                                                                                                                                                  

error[E0599]: no function or associated item named `empty` found for type `rgx::core::Rect<_>` in the current scope                                                                                                                                                                                                                                                               
    --> src/session.rs:1494:48                                                                                                                                                           
     |                                                                                                                                                                                                                                                                                                                                                                            
1494 |                         self.selection = Rect::empty();                                                                                            
     |                                                ^^^^^ function or associated item not found in `rgx::core::Rect<_>`                                                                                                                                                                                           

error: aborting due to 12 previous errors                                                                                                                 
cloudhead commented 4 years ago

Hmm this looks like somehow there's a mismatch between the rx code you have checked out, and the rgx version it's depending on. Not sure why this is happening.. maybe you need to use --locked to use the Cargo.lock versions. I can perhaps help more if you show me what command you are running, and what version of the code you have checked out.

cloudhead commented 4 years ago

Ping on this.

cloudhead commented 4 years ago

Closing due to inactivity.