Struggling to build reader on MAC
MrMxyzptlk opened this issue · 16 comments
I have the latest Intel mini with the latest MAC OS and have all the prereqs / configs setup.
This is during the build step...
a docker of the client would make all of this complexity for non-devs such as myself; go away.
Thank you...
Exception: Command failed: . venv-mupdfwrap-3.11-x64/bin/activate && python -m pip install --upgrade pip && python -m pip install --upgrade libclang swig && python ./scripts/mupdfwrap.py -d build/shared-release -b -j 0 m01 && deactivate
make[2]: *** [src/application/CMakeFiles/mupdf] Error 1
make[1]: *** [src/application/CMakeFiles/mupdf.dir/all] Error 2
make: *** [all] Error 2
Can you send me all of the build output? This is not enough to spot the error.
anthony@Mini-Driver Librum % cmake --build . -j $(nproc)
[ 0%] Built target domain_autogen_timestamp_deps
[ 3%] Building mupdf (This takes a while) ...
[ 3%] Built target librum_qmlimportscan
[ 11%] Built target presentation_lrelease
[ 12%] Built target domain_autogen
(+0.0s): --venv: main.py:2839:main2: running: "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3" -m venv venv-mupdfwrap-3.11-x64
[ 22%] Built target domain
(+1.6s): --venv: main.py:2839:main2: [returned e=0]
(+1.6s): --venv: main.py:2857:main2: running: . venv-mupdfwrap-3.11-x64/bin/activate && python -m pip install --upgrade pip && python -m pip install --upgrade libclang swig && python ./scripts/mupdfwrap.py -d build/shared-release -b -j 0 m01 && deactivate
(+1.9s): --venv: main.py:2857:main2: Requirement already satisfied: pip in ./venv-mupdfwrap-3.11-x64/lib/python3.11/site-packages (24.0)
(+2.5s): --venv: main.py:2857:main2: Requirement already satisfied: libclang in ./venv-mupdfwrap-3.11-x64/lib/python3.11/site-packages (16.0.6)
(+2.6s): --venv: main.py:2857:main2: Requirement already satisfied: swig in ./venv-mupdfwrap-3.11-x64/lib/python3.11/site-packages (4.2.0)
(+2.8s): --venv: main.py:2857:main2: (+0.0s): -b: m: main.py:1535:build: Building libmupdf.so ...
(+2.8s): --venv: main.py:2857:main2: (+0.0s): -b: m: main.py:1185:_get_m_command: Setting -j to multiprocessing.cpu_count()=12
(+2.8s): --venv: main.py:2857:main2: (+0.0s): -b: m: main.py:1537:build: running: cd /Applications/Librum/libs/mupdf && make -j 12 HAVE_GLUT=no HAVE_PTHREAD=yes verbose=yes shared=yes build=release build_prefix=shared-
(+2.8s): --venv: main.py:2857:main2: (+0.0s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build: Makerules:171: "No pkg-config found, install it for proper integration of libcrypto"
(+2.9s): --venv: main.py:2857:main2: (+0.1s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build: make[3]: warning: -jN forced in submake: disabling jobserver mode.
(+3.1s): --venv: main.py:2857:main2: (+0.3s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build: make[3]: *** read jobs pipe: No such file or directory. Stop.
(+3.1s): --venv: main.py:2857:main2: (+0.3s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build: make[3]: *** Waiting for unfinished jobs....
(+3.2s): --venv: main.py:2857:main2: (+0.4s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build: make[3]: *** write jobserver: Bad file descriptor. Stop.
(+3.4s): --venv: main.py:2857:main2: (+0.6s): -b: m: main.py:1537:build: (+0.0s): -b: m: main.py:1537:build:
(+3.4s): --venv: main.py:2857:main2: (+0.6s): -b: m: main.py:1537:build: [returned e=2]
(+3.4s): --venv: main.py:2857:main2: Traceback (most recent call last):
(+3.4s): --venv: main.py:2857:main2: scripts/mupdfwrap.py:6:(): wrap.main.main()
(+3.4s): --venv: main.py:2857:main2: scripts/wrap/main.py:2907:main(): jlib.exception_info()
(+3.4s): --venv: main.py:2857:main2: ^except raise:
(+3.4s): --venv: main.py:2857:main2: scripts/wrap/main.py:2905:main(): main2()
(+3.4s): --venv: main.py:2857:main2: scripts/wrap/main.py:2295:main2(): build( build_dirs, swig_command, args, vs_upgrade)
(+3.4s): --venv: main.py:2857:main2: scripts/wrap/main.py:1537:build(): jlib.system( command, prefix=jlib.log_text(), out='log', verbose=1)
(+3.4s): --venv: main.py:2857:main2: scripts/jlib.py:1682:system(): raise Exception( message)
(+3.4s): --venv: main.py:2857:main2: Exception: Command failed: cd /Applications/Librum/libs/mupdf && make -j 12 HAVE_GLUT=no HAVE_PTHREAD=yes verbose=yes shared=yes build=release build_prefix=shared-
(+3.5s): --venv: main.py:2857:main2: [returned e=1]
Traceback (most recent call last):
scripts/mupdfwrap.py:6:(): wrap.main.main()
scripts/wrap/main.py:2907:main(): jlib.exception_info()
^except raise:
scripts/wrap/main.py:2905:main(): main2()
scripts/wrap/main.py:2857:main2(): jlib.system(command, out='log', verbose=1)
scripts/jlib.py:1682:system(): raise Exception( message)
Exception: Command failed: . venv-mupdfwrap-3.11-x64/bin/activate && python -m pip install --upgrade pip && python -m pip install --upgrade libclang swig && python ./scripts/mupdfwrap.py -d build/shared-release -b -j 0 m01 && deactivate
make[2]: *** [src/application/CMakeFiles/mupdf] Error 1
make[1]: *** [src/application/CMakeFiles/mupdf.dir/all] Error 2
make: *** [all] Error 2
That's all of the build output...
I have just successfully built Librum on my MacBook after encountering similar issues. The issue was which components of Qt I was installing. My problem was solved by installing the QT Creator app and the main framework. I used QT 6.6.2. I'm not a developer myself, but this may be the issue. Let me know.
Thanks for the tip; I added ALL components of QT and am now getting these errors when I run cmake.
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error at CMakeLists.txt:72 (add_subdirectory):
add_subdirectory given source "libs/rapidfuzz-cpp" which is not an existing
directory.
CMake Error at CMakeLists.txt:76 (add_subdirectory):
add_subdirectory given source "src/" which is not an existing directory.
-- Configuring incomplete, errors occurred!
Hi you might need to rerun the setup script again. cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off -DCMAKE_PREFIX_PATH=/Users/(your username)/Qt/6.6.2/macos .. only thing I can think of. I deleted everything in my build-Release directory and started over.
OK, started over I'm on the cmake --install step and here is the output.
anthony@Mini-Driver Librum % cmake --install
Usage: cmake --install
Options: = Project binary directory to install. --config = For multi-configuration tools, choose . --component = Component-based install. Only install . --default-directory-permissions Default install permission. Use default permission . --prefix = The installation prefix CMAKE_INSTALL_PREFIX. --strip = Performing install/strip. -v --verbose = Enable verbose output.
Thanks for the tip; I added ALL components of QT and am now getting these errors when I run cmake.
CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
CMake Error at CMakeLists.txt:72 (add_subdirectory): add_subdirectory given source "libs/rapidfuzz-cpp" which is not an existing directory.
CMake Error at CMakeLists.txt:76 (add_subdirectory): add_subdirectory given source "src/" which is not an existing directory.
-- Configuring incomplete, errors occurred!
This means that you haven't cloned the repo correctly. Make sure to use --recursive
in the git clone command
OK, started over I'm on the cmake --install step and here is the output.
anthony@Mini-Driver Librum % cmake --install Usage: cmake --install
[options]
Options:
= Project binary directory to install. --config = For multi-configuration tools, choose . --component = Component-based install. Only install . --default-directory-permissions Default install permission. Use default permission . --prefix = The installation prefix CMAKE_INSTALL_PREFIX. --strip = Performing install/strip. -v --verbose = Enable verbose output.
I think this might be an issue from in the docs. Try cmake --install .
(with the . at the end)
I also get this when I run step 4. The only way I've gotten past 4. is to not cd into build-Release. This is after deleting the Librum directory and cloning recursively; which I've done each time.
anthony@Mini-Driver build-Release % cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off -DCMAKE_PREFIX_PATH=/Users/anthony/Qt/6.6.2/macos
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error: The source directory "/Users/anthony/Documents/Librum/build-Release" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
I also get this when I run step 4. The only way I've gotten past 4. is to not cd into build-Release. This is after deleting the Librum directory and cloning recursively; which I've done each time.
anthony@Mini-Driver build-Release % cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off -DCMAKE_PREFIX_PATH=/Users/anthony/Qt/6.6.2/macos CMake Warning: No source or binary directory provided. Both will be assumed to be the same as the current working directory, but note that this warning will become a fatal error in future CMake releases.
CMake Error: The source directory "/Users/anthony/Documents/Librum/build-Release" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
You forgot the ..
in step 4. Try to copy the exact command: cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off -DCMAKE_PREFIX_PATH=<path/to/Qt> ..
and it should work.
Rookie error! I've been removing the 2 dots everytime...
Thanks.
OK, finally got through all the steps, thank to you!
How the heck do I run the client? It's not in my Applications directory, or in Spotlight...
Glad to hear that the build works now!
OK, finally got through all the steps, thank to you!
How the heck do I run the client? It's not in my Applications directory, or in Spotlight...
Can you try running librum
from the command line? If that gives you an error saying something about ...dylib not found ...
try running export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib
first and then librum
.
I'll have access to a mac again very soon and thus will be able to finally get the mac packages done.
Yep, in this case I kept the . at the end of the line, and it was not needed.
After I exported the DYLD...path without the . I was able to run Librum.