sioyek icon indicating copy to clipboard operation
sioyek copied to clipboard

build failure on macos 10.15

Open telephon opened this issue 3 years ago • 16 comments

Following the build instructions, the build fails wiith:

<...>
    CC build/release/platform/gl/gl-ui.o
    CC build/release/platform/gl/gl-win32.o
    LINK build/release/mupdf-gl
ld: warning: option -s is obsolete and being ignored
Info: creating stash file /Volumes/data/git/sioyek/.qmake.stash
Project ERROR: Unknown module(s) in QT: openglextensions
make: *** No targets specified and no makefile found.  Stop.
mv: rename sioyek.app to build/sioyek.app: No such file or directory
cp: build/sioyek.app/Contents/MacOS/shaders: No such file or directory
  • macOS 10.15
  • qt5 6.2.2

telephon avatar Feb 19 '22 13:02 telephon

Does this help? https://github.com/ahrm/sioyek/issues/41

ahrm avatar Feb 19 '22 13:02 ahrm

No, all the homebrew dependencies are installed, still the same.

telephon avatar Feb 20 '22 11:02 telephon

No, all the homebrew dependencies are installed, still the same.

Are you using the correct version of qt (5.* not 6.*) when building the project?

ahrm avatar Feb 20 '22 11:02 ahrm

Not sure how I can find this out. I tried this:

$> qmake --version
QMake version 3.1
Using Qt version 6.2.2 in /usr/local/lib

So this looks like 6.2.2 which is then wrong. How could I direct the script to another version?

telephon avatar Feb 24 '22 21:02 telephon

You could edit build_mac.sh and replace qmake with the exact path for correct version of qmake.

ahrm avatar Feb 25 '22 08:02 ahrm

getting this with:

sh-4.4# ./build_linux.sh 
make: *** No targets specified and no makefile found.  Stop.
Project ERROR: Unknown module(s) in QT: quickwidgets 3dcore 3danimation 3dextras 3dinput 3dlogic 3drender
make: *** No targets specified and no makefile found.  Stop.
cp: cannot stat 'sioyek': No such file or directory
sh-4.4# qmake --version
QMake version 3.1
Using Qt version 5.9.5 in /usr/lib/x86_64-linux-gnu

I'm sindie a qt5 container. Specifically theshadowx/qt5:latest

What is the correct qt version to use?

ldelossa avatar Mar 17 '22 03:03 ldelossa

I use 5.12 but the issue you are facing is because you don't have some packages. See https://github.com/ahrm/sioyek/issues/97#issuecomment-962556062 for more details.

ahrm avatar Mar 17 '22 08:03 ahrm

Thanks ill try to get those deps installed in my build container.

BTW the rpm copr repo fails hard. Doesnt install correctly on fedora.

Flatpak version seems to not allow the addition of a user key map in xdg-config dir.

So now im attempting to build from src

ldelossa avatar Mar 17 '22 12:03 ldelossa

Hey @ahrm I installed those depedencies but now I'm getting:

sh-4.4# ./build_linux.sh 
make: *** No targets specified and no makefile found.  Stop.
g++ -c -pipe -std=c++17 -O2 -Wall -W -D_REENTRANT -fPIC -DQT_3DCORE_LIB -DQT_3DANIMATION_LIB -DQT_3DEXTRAS_LIB -DQT_3DINPUT_LIB -DQT_3DLOGIC_LIB -DQT_3DRENDER_LIB -DQT_OPENGL_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_QUICKWIDGETS_LIB -DQT_SQL_LIB -DQT_WIDGETS_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QUICKWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_QUICK_LIB -DQT_3DANIMATION_LIB -DQT_3DEXTRAS_LIB -DQT_3DRENDER_LIB -DQT_3DINPUT_LIB -DQT_3DLOGIC_LIB -DQT_3DCORE_LIB -DQT_OPENGLEXTENSIONS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -Ipdf_viewer -Imupdf/include -Izlib -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuickWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtQuick -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DAnimation -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DExtras -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DRender -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DInput -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DLogic -isystem /usr/include/x86_64-linux-gnu/qt5/Qt3DCore -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGLExtensions -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtSql -isystem /usr/include/x86_64-linux-gnu/qt5/QtQml -isystem /usr/include/x86_64-linux-gnu/qt5/QtNetwork -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -I. -isystem /usr/include/libdrm -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o config.o pdf_viewer/config.cpp
In file included from pdf_viewer/path.h:5:0,
                 from pdf_viewer/config.h:9,
                 from pdf_viewer/config.cpp:1:
pdf_viewer/utils.h:143:1: error: ‘fz_quad’ does not name a type; did you mean ‘fz_quadto’?
 fz_quad quad_from_rect(fz_rect r);
 ^~~~~~~
 fz_quadto
pdf_viewer/utils.h:144:13: error: ‘fz_quad’ was not declared in this scope
 std::vector<fz_quad> quads_from_rects(const std::vector<fz_rect>& rects);
             ^~~~~~~
pdf_viewer/utils.h:144:13: note: suggested alternative: ‘fz_quadto’
 std::vector<fz_quad> quads_from_rects(const std::vector<fz_rect>& rects);
             ^~~~~~~
             fz_quadto
pdf_viewer/utils.h:144:20: error: template argument 1 is invalid
 std::vector<fz_quad> quads_from_rects(const std::vector<fz_rect>& rects);
                    ^
pdf_viewer/utils.h:144:20: error: template argument 2 is invalid

Do I have a version mismatch of one of the dependencies?

ldelossa avatar Mar 17 '22 12:03 ldelossa

This error indicates that you are using a wrong version of mupdf, which is weird because we compile the correct version of mupdf ourselves. Maybe the compiler is using your system header files of mupdf instead of the ones in sioyek source directory?

ahrm avatar Mar 17 '22 12:03 ahrm

Would it be possible to provide a build script which can run inside a qt container that works on your end?

Is Sioyek statically compiled? Or are some shared libs on the host system required as well?

ldelossa avatar Mar 17 '22 13:03 ldelossa

Would it be possible to provide a build script which can run inside a qt container that works on your end?

I am on a windows machine right now. I will try that when I have access to my linux machines.

Is Sioyek statically compiled? Or are some shared libs on the host system required as well?

It is statically compiled.

ahrm avatar Mar 17 '22 13:03 ahrm

Would it be possible to provide a build script which can run inside a qt container that works on your end?

I am on a windows machine right now. I will try that when I have access to my linux machines.

Is Sioyek statically compiled? Or are some shared libs on the host system required as well?

It is statically compiled.

Awesome, so all the dependencies can be added to a qt base container and the binary dropped to the filesystem once built

ldelossa avatar Mar 17 '22 14:03 ldelossa

if someone could build a cask with everything needed to just run brew I would be eternally grateful - the discussions here are way over my head , and the app seems extremely useful for my work...

Alceste72 avatar May 17 '22 08:05 Alceste72

@Alceste72 if you try the prebuilt binary, the app works mostly (some features such as external search don't work) works well. I have been trying to build the app for some versions but no success unfortunately.

hasantahir avatar May 17 '22 13:05 hasantahir

Yes i could never get it to build myself. I gave up awhile ago.

ldelossa avatar May 17 '22 14:05 ldelossa

There is a homebrew cask by a community member here: https://formulae.brew.sh/cask/sioyek

ahrm avatar Dec 29 '22 16:12 ahrm