albfan / miraclecast

Connect external monitors to your system via Wifi-Display specification also known as Miracast
Other
3.87k stars 415 forks source link

~~Building~~ `make install` breaks when cannot acces files that it's trying to create. Edit: wrong path in generated `build/res/Makefile`? #512

Closed DDzwiedziu closed 4 months ago

DDzwiedziu commented 4 months ago

Edit 2: with autotools:

(…)
 /usr/bin/mkdir -p '/usr/bin'
 /usr/bin/install -c ../../res/miracle-gst ../../res/gstplayer ../../res/uibc-viewer ../../res/miracle-omxplayer '/usr/bin'
 /usr/bin/mkdir -p '/usr/share/bash-completion/completions'
 /usr/bin/install -c -m 644 ../../res/miracle-wifid ../../res/miracle-sinkctl ../../res/miracle-wifictl '/usr/share/bash-completion/completions'
/usr/bin/install: cannot create regular file '/usr/share/bash-completion/completions/miracle-wifid': No such file or directory
/usr/bin/install: cannot create regular file '/usr/share/bash-completion/completions/miracle-sinkctl': No such file or directory
/usr/bin/install: cannot create regular file '/usr/share/bash-completion/completions/miracle-wifictl': No such file or directory
make[2]: *** [Makefile:373: install-bashcompletionDATA] Error 1
make[2]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/res'
make[1]: *** [Makefile:465: install-am] Error 2
make[1]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/res'
make: *** [Makefile:423: install-recursive] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

❯ file /usr/share/bash-completion/completions/miracle-wifid
/usr/share/bash-completion/completions/miracle-wifid: cannot open `/usr/share/bash-completion/completions/miracle-wifid' (No such file or directory)
❯ file /usr/share/bash-completion/completions/
/usr/share/bash-completion/completions/: directory

If I understand correctly the res files are in ../res not ../../res

❯ file ../res/miracle-wifid
../res/miracle-wifid: ASCII text
❯ file ../../res/miracle-wifid
../../res/miracle-wifid: cannot open `../../res/miracle-wifid' (No such file or directory)

Edit: if I go to build/ % ./res/Makefile and change $VPATH by removing one ../ then the make goes further, but borks on another step:

 /usr/bin/mkdir -p '/usr/bin'
  /bin/bash ../libtool   --mode=install /usr/bin/install -c miracled '/usr/bin'
libtool: install: /usr/bin/install -c miracled /usr/bin/miracled
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/src'
make[2]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/src'
make[1]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/src'
Making install in res
make[1]: Entering directory '/home/dzwiedziu/Software/gitted/miraclecast/build/res'
make[1]: *** No rule to make target 'miracle-gst', needed by 'all-am'.  Stop.
make[1]: Leaving directory '/home/dzwiedziu/Software/gitted/miraclecast/build/res'
make: *** [Makefile:423: install-recursive] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Edit 2: am I sane? I've tried the cmake way, and:

Installing with make install...

========================= Installation results ===========================
[ 17%] Built target miracle-shared
[ 23%] Built target miracled
[ 38%] Built target miracle-wifid
[ 53%] Built target miracle-dhcp
[ 64%] Built target miracle-wifictl
[ 79%] Built target miracle-sinkctl
[ 84%] Built target miracle-uibcctl
[ 89%] Built target test_rtsp
[ 94%] Built target test_wpas
[100%] Built target test_valgrind
Install the project...
-- Install configuration: ""
-- Installing: /usr/bin/miracled
CMake Error at src/cmake_install.cmake:52 (file):
  file INSTALL cannot copy file
  "/home/dzwiedziu/Software/gitted/miraclecast/build/src/miracled" to
  "/usr/bin/miracled": No such file or directory.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)

make: *** [Makefile:100: install] Error 1

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Edit 3: maybe I'm not ¯_(ツ)_/¯

========================= Installation results ===========================
[0/1] Installing files.
Installing src/wifi/miracle-wifid to /usr/bin
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 194, in run
    return options.run_func(options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 873, in run
    installer.do_install(datafilename)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 553, in do_install
    self.install_targets(d, dm, destdir, fullprefix)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 750, in install_targets
    file_copied = self.do_copyfile(fname, outname, makedirs=(dm, outdir))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 430, in do_copyfile
    self.copy2(from_file, to_file)
  File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 327, in copy2
    shutil.copy2(*args, **kwargs)
  File "/usr/lib/python3.12/shutil.py", line 476, in copy2
    copystat(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.12/shutil.py", line 384, in copystat
    lookup("utime")(dst, ns=(st.st_atime_ns, st.st_mtime_ns),
FileNotFoundError: [Errno 2] No such file or directory

ERROR: Unhandled python OSError. This is probably not a Meson bug, but an issue with your build environment.
FAILED: meson-internal__install 
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.

Edit 4: this is probably a problem with checkinstall, infortunately.

albfan commented 4 months ago

Better include commands executed. Looks like you try to build directly on source directory.

You should configure out source builds.

This is for cmake but should be valid for any buildsystem: https://cmake.org/cmake/help/book/mastering-cmake/chapter/Getting%20Started.html

DDzwiedziu commented 4 months ago

Please see the last edit, it was most probably checkinstall's fault, which I was using (which was surprise for me). Besides that I've took the commands straight from https://github.com/albfan/miraclecast/wiki/Building

Sorry for bothering you for no good reason.