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

Debian Testing - Install Fail #404

Closed
eberna opened this issue Jan 21, 2019 · 18 comments
Closed

Debian Testing - Install Fail #404

eberna opened this issue Jan 21, 2019 · 18 comments
Labels

Comments

@eberna
Copy link

eberna commented Jan 21, 2019

Following the build instruction i'm encountering this error in the install phase. i compiled as user and this is the error launching the installation whit sudo:

lele@host:~/xxx/scrcpy/x$ sudo ninja install
[0/1] Installing files.
Installing app/scrcpy to /usr/local/bin
Stripping target 'app/scrcpy'
Installing server/scrcpy-server.jar to /usr/local/share/scrcpy
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 111, in run
    return options.run_func(options)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 504, in run
    installer.do_install(datafilename)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 341, in do_install
    self.install_targets(d)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 482, in install_targets
    install_name_mappings, verbose=False)
  File "/usr/lib/python3/dist-packages/mesonbuild/scripts/depfixer.py", line 440, in fix_rpath
    fix_jar(fname)
  File "/usr/lib/python3/dist-packages/mesonbuild/scripts/depfixer.py", line 421, in fix_jar
    subprocess.check_call(['jar', 'xfv', fname, 'META-INF/MANIFEST.MF'])
  File "/usr/lib/python3.7/subprocess.py", line 342, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python3.7/subprocess.py", line 323, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'jar': 'jar'
FAILED: meson-install 
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

ninja # sans root
sudo ninja install

@eberna
Copy link
Author

eberna commented Jan 21, 2019

yes, "sudo ninja install" as a regular user is it wrong?

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

Did you first execute ninja without sudo before calling sudo ninja install?
(see #335 (comment))

@rom1v rom1v added the build label Jan 21, 2019
@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

No such file or directory: 'jar': 'jar'

Hmmm… the problem seems different…
What happens if you just execute jar? (does it exist?)

@eberna
Copy link
Author

eberna commented Jan 21, 2019

yes sure, all the build commands as regular user

@eberna
Copy link
Author

eberna commented Jan 21, 2019

No such file or directory: 'jar': 'jar'

Hmmm… the problem seems different…
What happens if you just execute jar? (does it exist?)

command not found

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

How did you configure meson (the meson command-line you executed before ninja)?

command not found

You should probably apt install openjdk-8-jdk then.

@eberna
Copy link
Author

eberna commented Jan 21, 2019

command not found

You should probably apt install openjdk-8-jdk then.

yes, problem solved. I thought it was not to be installed if you use the prebuil server (as i did).

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

I thought it was not to be installed if you use the prebuil server (as i did).

It should not, in theory. That's why I'm surprised.

Could you paste the result of meson configure x?

@rom1v
Copy link
Collaborator

rom1v commented Jan 21, 2019

Oh, it's because of meson, which (may) modify the jar! mesonbuild/meson@c70a051 😱

@eberna
Copy link
Author

eberna commented Jan 21, 2019

Core properties:
  Source dir /home/xxx/Downloads/tmp/scrcpy
  Build dir  /home/xxx/Downloads/tmp/scrcpy/x

Core options:
  Option          Current Value Possible Values                                          Description                                             
  ------          ------------- ---------------                                          -----------                                             
  auto_features   auto          [enabled, disabled, auto]                                Override value of all 'auto' features                   
  backend         ninja         [ninja, vs, vs2010, vs2015, vs2017, xcode]               Backend to use                                          
  buildtype       release       [plain, debug, debugoptimized, release, minsize, custom] Build type to use                                       
  debug           false         [true, false]                                            Debug                                                   
  default_library shared        [shared, static, both]                                   Default library type                                    
  install_umask   0022          [preserve, 0000-0777]                                    Default umask to apply on permissions of installed files
  layout          mirror        [mirror, flat]                                           Build directory layout                                  
  optimization    3             [0, g, 1, 2, 3, s]                                       Optimization level                                      
  strip           true          [true, false]                                            Strip targets on install                                
  unity           off           [on, off, subprojects]                                   Unity build                                             
  warning_level   1             [1, 2, 3]                                                Compiler warning level to use                           
  werror          false         [true, false]                                            Treat warnings as errors                                
  wrap_mode       default       [default, nofallback, nodownload, forcefallback]         Wrap mode                                               

Backend options:
  Option            Current Value Possible Values Description                                                
  ------            ------------- --------------- -----------                                                
  backend_max_links 0             >=0             Maximum number of linker processes to run or 0 for no limit

Base options:
  Option      Current Value Possible Values                                               Description                                   
  ------      ------------- ---------------                                               -----------                                   
  b_asneeded  true          [true, false]                                                 Use -Wl,--as-needed when linking              
  b_colorout  always        [auto, always, never]                                         Use colored output                            
  b_coverage  false         [true, false]                                                 Enable coverage tracking.                     
  b_lto       true          [true, false]                                                 Use link time optimization                    
  b_lundef    true          [true, false]                                                 Use -Wl,--no-undefined when linking           
  b_ndebug    false         [true, false, if-release]                                     Disable asserts                               
  b_pch       true          [true, false]                                                 Use precompiled headers                       
  b_pgo       off           [off, generate, use]                                          Use profile guided optimization               
  b_pie       false         [true, false]                                                 Build executables as position independent     
  b_sanitize  none          [none, address, thread, undefined, memory, address,undefined] Code sanitizer to use                         
  b_staticpic true          [true, false]                                                 Build static libraries as position independent

Compiler options:
  Option      Current Value Possible Values                            Description                             
  ------      ------------- ---------------                            -----------                             
  c_args      []                                                       Extra arguments passed to the C compiler
  c_link_args []                                                       Extra arguments passed to the C linker  
  c_std       c11           [none, c89, c99, c11, gnu89, gnu99, gnu11] C language standard to use              

Directories:
  Option         Current Value        Description                            
  ------         -------------        -----------                            
  bindir         bin                  Executable directory                   
  datadir        share                Data file directory                    
  includedir     include              Header file directory                  
  infodir        share/info           Info page directory                    
  libdir         lib/x86_64-linux-gnu Library directory                      
  libexecdir     libexec              Library executable directory           
  localedir      share/locale         Locale data directory                  
  localstatedir  /var/local           Localstate data directory              
  mandir         share/man            Manual page directory                  
  prefix         /usr/local           Installation prefix                    
  sbindir        sbin                 System executable directory            
  sharedstatedir /var/local/lib       Architecture-independent data directory
  sysconfdir     etc                  Sysconf data directory                 

Project options:
  Option               Current Value                               Possible Values Description                                     
  ------               -------------                               --------------- -----------                                     
  build_app            true                                        [true, false]   Build the client                                
  build_server         true                                        [true, false]   Build the server                                
  crossbuild_windows   false                                       [true, false]   Build for Windows from Linux                    
  hidpi_support        true                                        [true, false]   Enable High DPI support                         
  override_server_path                                                             Hardcoded path to find the server at runtime    
  prebuilt_server      /home/lele/Downloads/scrcpy-server-v1.6.jar                 Path of the prebuilt server                     
  skip_frames          true                                        [true, false]   Always display the most recent frame            
  windows_noconsole    false                                       [true, false]   Disable console on Windows (pass -mwindows flag)

Testing options:
  Option    Current Value Possible Values Description                                 
  ------    ------------- --------------- -----------                                 
  errorlogs true          [true, false]   Whether to print the logs from failing tests
  stdsplit  true          [true, false]   Split stdout and stderr in test logs        

@HarrissonPereira
Copy link

I'm having the same problem using Fedora 29 (using prebuilt server too).
I've already built scrcpy once on it, but unfortunately, I had to make a wipe on my disk and install everything again, now the same steps on 1.6 gives me this error
Is there some workaround that I can do?

@rom1v
Copy link
Collaborator

rom1v commented Jan 29, 2019

@HarrissonPereira Just apt install openjdk-8-jdk, it should work.

@HarrissonPereira
Copy link

HarrissonPereira commented Jan 29, 2019

@rom1v I thought so, I've installed as soon as eberna said it solved, but the error still happens.

These are the steps I followed: (skipping cd commands)

1 - sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm

2 - sudo dnf install SDL2-devel ffms2-devel meson gcc make

3 - sudo dnf install java

(These first three were before open-jdk)

4 - git clone https://github.com/Genymobile/scrcpy

5 - meson x --buildtype release --strip -Db_lto=true
-Dprebuilt_server=/home/HarrissonCruz/scrcpy-server.jar

6 - ninja

7 - sudo ninja install

EDIT: Forgot to include "sudo dnf install java-1.8.0-openjdk" before step 4

@rom1v
Copy link
Collaborator

rom1v commented Jan 29, 2019

@HarrissonPereira

Do you have the jar executable?

jar
which jar
ls /usr/bin/jar

?

@HarrissonPereira
Copy link

@rom1v it doesn't exists, just java.
notjar

@rom1v
Copy link
Collaborator

rom1v commented Jan 29, 2019

Then, you should install a package which provides the jar binary. I don't know which one on Fedora.

Otherwise, you don't really need jar here, you just need a valid jar executable, so (as root):

touch /usr/bin/jar
chmod +x /usr/bin/jar

@HarrissonPereira
Copy link

@rom1v sorry for my late response.

I've managed to make it work by just using ./run x instead of installing
It's working now

@rom1v rom1v closed this as completed Feb 10, 2019
rom1v added a commit that referenced this issue Oct 30, 2019
The server name ending with .jar has several drawbacks:
 - meson requires the jar executable to attempt to modify it:
     <#404 (comment)>
     <mesonbuild/meson#4844>
 - meson warns during "ninja install"
     <#458>
 - some users try to execute it on the computer as a java executable

Removing the extension solves all these problems.
rom1v added a commit that referenced this issue Oct 31, 2019
The server name ending with .jar has several drawbacks:
 - meson requires the jar executable to attempt to modify it:
     <#404 (comment)>
     <mesonbuild/meson#4844>
 - meson warns during "ninja install"
     <#458>
 - some users try to execute it on the computer as a java executable

Removing the extension solves all these problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants