kiwix / kiwix-build

Kiwix & openZIM build engine
GNU General Public License v3.0
90 stars 43 forks source link

qt 5.10.1 configuration error #430

Open ynikitenko opened 4 years ago

ynikitenko commented 4 years ago

I run kiwix-build --target-platform native_static kiwix-desktop. During qt build there appears an error:

build qt (native_static): configure qt : ....ERROR run command '/opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/configure -recheck -opensource -confirm-license -ccache -make libs -skip qt3d -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebglplugin -skip qtwebsockets -static -prefix /opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL -libdir /opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib64' current directory is '/opt/kiwix_build/kiwix-build/BUILD_native_static/qt-5.10.1'

(... some environment, I can show it if needed ...)

PKG_CONFIG_PATH : ':/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib64/pkgconfig' QMAKE_CXXFLAGS : '-I/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/include ' CPPFLAGS : '-I/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/include ' QMAKE_LFLAGS : '-L/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib -L/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib64 ' LDFLAGS : '-L/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib -L/opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib64 ' CFLAGS : ' -fPIC -O3' CXXFLAGS : ' -fPIC -O3' + cd qtbase + /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/configure -top-level -recheck -opensource -confirm-license -ccache -make libs -skip qt3d -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebglplugin -skip qtwebsockets -static -prefix /opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL -libdir /opt/kiwix_build/kiwix-build/BUILD_native_static/INSTALL/lib64 Preparing build tree... Creating qmake... /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:101:12: error: ‘int renameat2(int, const char, int, const char, unsigned int)’ was declared ‘extern’ and later ‘static’ [-fpermissive] static int renameat2(int oldfd, const char oldpath, int newfd, const char newpath, unsigned flags) ^~~~~ In file included from /usr/include/c++/8/cstdio:42, from /usr/include/c++/8/ext/string_conversions.h:43, from /usr/include/c++/8/bits/basic_string.h:6400, from /usr/include/c++/8/string:52, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/tools/qbytearray.h:52, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qbytearray.h:1, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:49, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qstring.h:1, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/io/qiodevice.h:50, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qiodevice.h:1, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/io/qfiledevice.h:43, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qfiledevice.h:1, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfile.h:44, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_p.h:54, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:43: /usr/include/stdio.h:164:12: note: previous declaration of ‘int renameat2(int, const char, int, const char, unsigned int)’ extern int renameat2 (int oldfd, const char *old, int __newfd, ^~~~~ /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:107:12: error: ‘int statx(int, const char, int, unsigned int, statx)’ was declared ‘extern’ and later ‘static’ [-fpermissive] static int statx(int dirfd, const char pathname, int flag, unsigned mask, struct statx statxbuf) ^~~~~ In file included from /usr/include/bits/statx.h:37, from /usr/include/sys/stat.h:446, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:75, from /opt/kiwix_build/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42: /usr/include/bits/statx-generic.h:56:5: note: previous declaration of ‘int statx(int, const char, int, unsigned int, statx)’ int statx (int dirfd, const char *restrict path, int flags, ^~~~~ gmake: *** [Makefile:429: qfilesystemengine_unix.o] Error 1 Stopping build due to errors

It seems that qt functions statx and renameat2 conflict with system functions. Probably this is not so much an issue of kiwix-build, but what should be done about that? A better version of the qt package? Some manual fixes? (I'm using Fedora Core 29).

ynikitenko commented 4 years ago

I found that the error is pretty same as in https://github.com/kiwix/kiwix-build/issues/260#issuecomment-436046733.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

mgautierfr commented 4 years ago

The Qt compilation is mostly broken. We should remove it and use a pre-compiled version (system packages).

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

kelson42 commented 1 year ago

@ynikitenko Do you still experience this problem with latest vetsions of kiwix-desktop?

ynikitenko commented 1 year ago

I don't know. I'm using kiwix-desktop from the "community" Arch Linux repository, so it should be rather up-to-date. I have a problem with the search bar, https://github.com/kiwix/kiwix-desktop/issues/499, so I'm not going to make a new manual installation. I use Kiwix 0.9 most often, it functions flawlessly for me (but I also use the more recent version for newer ZIM files, when I really want to check them). I think if it works for other people, you can close this issue (hope things have improved since then, and also it can be installed by its maintainers on Arch).

kelson42 commented 1 year ago

@ynikitenko Glad to hear the result of your last attempt... otherwise I will close at some point in the future.

ynikitenko commented 1 year ago

Fine, I'm trying to install it. I have several notes.

$ kiwix-build kiwix-desktop ERROR: The target platform native_dyn cannot be build on host arch. Select another target platform or change your host system. [INSTALL PACKAGES] SKIP, No package to install. [SETUP PLATFORMS] [PREPARE] prepare sources icu4c : download icu4c : OK (4.7s) extract icu4c : OK (4.0s) patch icu4c : OK (0.1s) prepare sources zlib : download zlib : OK (3.7s) extract zlib : OK (0.1s) patch zlib : OK (0.0s) prepare sources qt : download qt : 3.64%

kelson42 commented 1 year ago

So the error reported first has vanished?

ynikitenko commented 1 year ago

I didn't know at that time, because it was downloading qt, and then it was building it. Oh, yes, here is the error:

`build qt (native_dyn): configure qt : .ERROR run command '/opt/kiwix-build/SOURCE/qt-5.10.1/configure -recheck -opensource -confirm-license -ccache -make libs -skip qt3d -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtlocation -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtvirtualkeyboard -skip qtwayland -skip qtwebglplugin -skip qtwebsockets -shared -prefix /opt/kiwix-build/./BUILD_native_dyn/INSTALL -libdir /opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib' current directory is '/opt/kiwix-build/./BUILD_nativedyn/qt-5.10.1' env is : SHELL : '/bin/bash' ... : '/home/yaroslav/.local/bin/kiwix-build' PKG_CONFIG_PATH : ':/opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib/pkgconfig' QMAKE_CXXFLAGS : '-I/opt/kiwix-build/./BUILD_native_dyn/INSTALL/include ' CPPFLAGS : '-I/opt/kiwix-build/./BUILD_native_dyn/INSTALL/include ' QMAKE_LFLAGS : '-L/opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib -L/opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib ' LDFLAGS : '-L/opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib -L/opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib ' CFLAGS : ' -O3' CXXFLAGS : ' -O3'

Stopping build due to errors `

So now it is a different error. Maybe one can say that the old error has disappeared, but I'm not sure.

ynikitenko commented 1 year ago

I didn't use virtualenv (hope it doesn't influence the results), but otherwise I ran commands from https://github.com/kiwix/kiwix-build.

kelson42 commented 12 months ago

@mgautierfr Honestly I'm a bit puzzled how to deal with this issue. Do you?