FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.55k stars 78 forks source link

Added missing step #6

Closed isapir closed 3 years ago

isapir commented 3 years ago

My build directory is empty - do we even need to create the build dir?

❯ ll build
/workspace/src/UxPlay
total 8.0K
drwxrwxr-x 2 igal 4.0K Sep 10 11:05 .
drwxrwxr-x 7 igal 4.0K Sep 10 11:07 ..
fduncanh commented 3 years ago

[added] I cant understand what your "ll build" is showing in the above

The build should be done in a separate build directory, which can be cleanly removed with rm -rf build if you want to get back to a clean state.

assuming UxPlay is found in /workspace/src/

cd /workspace/src/Uxplay

mkdir build cd build cmake .. (or cmake -DZOOMFIX=ON .. ) make sudo make install

to clean up you could then do

cd .. rm -rf build

isapir commented 3 years ago

@fduncanh When I tried your steps I got an error. make only worked if I changed directories back to the UxPlay directory.

isapir commented 3 years ago
❯ cd /workspace/src/UxPlay
❯ rm -rf build
❯ mkdir build && cd build
❯ cmake -DZOOMFIX=ON ..
-- Configuring done
-- Generating done
-- Build files have been written to: /workspace/src/UxPlay
❯ make
make: *** No targets specified and no makefile found.  Stop.
fduncanh commented 3 years ago

@isapir cmake should not behave this way, but if you can confirm that this is not some special configuration of cmake you have created (e.g. that defaults the build directory to be the source directory), I'll add a note to README.md suggesting adding -B . at the end of the cmake invocation if the Build files are not created in build.

isapir commented 3 years ago

I can confirm that I have not made any configuration changes to cmake. For reference, this is the version information in my system:

❯ cmake --version
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).
❯ uname -a
Linux u20 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
fduncanh commented 3 years ago

@isapir

After writing all this stuff below I just had an AHA! moment is it possible you are new to linux? (or that something is wrong with your keyboard)

If so, I suspect you were in /workspace/source/UxPlay not /workspace/source/UxPlay/build and mistyped the cmake command as

cmake -DZOOMFIX=ON . .

with a space between the two dots DOT SPACE DOT, which would say the the source directory AND the build directory are both "." which means the directory you are in. This would fully account for the behavior you reported..

the correct procedure is to be in UxPlay/build and type

cmake -DZOOMFIX=ON  .. 

with DOTDOT (no space) which means the source directory is the directory above you, and by default, the build directory is the one you are in.

====================================================================

I tested on exactly the same Ubuntu release as you., (which I happen to have as a multiboot alternative ). with exactly the same cmake, and exactly the same commands you said you used. cmake worked exactly as I expected, it placed the Build files in UxPlay/build, NOT the source directory UxPlay.

Of course I saw all the output from cmake that you didn't show. Did you edit it out, or are you running some kind of script that sends it to /dev/null? I don't understand what is wrong with your system, but something clearly is.... Do you get things to behave properly with cmake -DZOOMFIX=ON .. -B .

Where did the informational output from cmake go?


$ cmake --version cmake version 3.16.3 CMake suite maintained and supported by Kitware (kitware.com/cmake). $ uname -a Linux xxx 5.11.0-27-generic #29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$cd UxPlay $ rm -rf build $ mkdir build && cd build $ cmake -DZOOMFIX=ON .. -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") LIBPLIST/usr/lib/x86_64-linux-gnu/libplist.so -- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found suitable version "1.1.1f", minimum required is "1.1.1")
-- Checking for modules 'gstreamer-1.0>=1.4;gstreamer-sdp-1.0>=1.4;gstreamer-video-1.0>=1.4;gstreamer-app-1.0>=1.4' -- Found gstreamer-1.0, version 1.16.2 -- Found gstreamer-sdp-1.0, version 1.16.2 -- Found gstreamer-video-1.0, version 1.16.2 -- Found gstreamer-app-1.0, version 1.16.2 GST_LIBRARIESgstsdp-1.0gstvideo-1.0gstapp-1.0gstbase-1.0gstreamer-1.0gobject-2.0glib-2.0 GST_LIBRARY_DIRS GST_CFLAGS -pthread-I/usr/include/gstreamer-1.0-I/usr/include/libmount-I/usr/include/blkid-I/usr/include/gstreamer-1.0-I/usr/include/orc-0.4-I/usr/include/gstreamer-1.0-I/usr/include/glib-2.0-I/usr/lib/x86_64-linux-gnu/glib-2.0/include GST_LDFLAGS -lgstsdp-1.0-lgstvideo-1.0-lgstapp-1.0-lgstbase-1.0-lgstreamer-1.0-lgobject-2.0-lglib-2.0 GST_INCLUDE_DIRS /usr/include/gstreamer-1.0/usr/include/libmount/usr/include/blkid/usr/include/gstreamer-1.0/usr/include/orc-0.4/usr/include/gstreamer-1.0/usr/include/glib-2.0/usr/lib/x86_64-linux-gnu/glib-2.0/include -- Configuring done -- Generating done -- Build files have been written to: /home/duncan/UxPlay/build $

fduncanh commented 3 years ago

by the way, you posted this which I guess you had edited in a very confusing way, because "/workspace/src/build" is not part of the output of ll build, but the directory in which you ran ll build, I suppose. It took me a while to understand this.

❯ ll build /workspace/src/UxPlay total 8.0K drwxrwxr-x 2 igal 4.0K Sep 10 11:05 . drwxrwxr-x 7 igal 4.0K Sep 10 11:07 ..

isapir commented 3 years ago

@fduncanh I actually have many years of experience with Linux. I do pass .. to denote parent directory. As you can see from my pasted snippets above there is no space between the dots.

Anyway, I am able to use the software so not a big deal. I don't understand how it works for everyone else from the build directory when for me that directory is empty after the call to cmake. I also don't understand why your cmake output shows so much more information than mine.

by the way, you posted this which I guess you had edited in a very confusing way, because "/workspace/src/build" is not part of the output of ll build, but the directory in which you ran ll build, I suppose. It took me a while to understand this.

You are right. My ll command has an alias that calls pwd first and that's not standard so sorry for the confusion.

fduncanh commented 3 years ago

@isapir

Final result.

the separate build directory is not needed for user installation. final instructions cd UxPlay[--master] cmake [-DZOOMFIX=ON] . make sudo make install

the final DOT " ." (current directory) is needed in recent cmake, but not older cmake