Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt 5.10.1 configuration error #430

Open
ynikitenko opened this issue Apr 2, 2020 · 12 comments
Open

qt 5.10.1 configuration error #430

ynikitenko opened this issue Apr 2, 2020 · 12 comments
Assignees

Comments

@ynikitenko
Copy link

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
Copy link
Author

I found that the error is pretty same as in #260 (comment).

@stale
Copy link

stale bot commented Jun 1, 2020

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.

@stale stale bot added the stale label Jun 1, 2020
@mgautierfr
Copy link
Member

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

@stale stale bot removed the stale label Jun 17, 2020
@stale
Copy link

stale bot commented Aug 16, 2020

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.

@stale stale bot added the stale label Aug 16, 2020
@kelson42
Copy link
Contributor

kelson42 commented Apr 6, 2023

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

@stale stale bot removed the stale label Apr 6, 2023
@ynikitenko
Copy link
Author

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, kiwix/kiwix-desktop#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
Copy link
Contributor

kelson42 commented Apr 6, 2023

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

@ynikitenko
Copy link
Author

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%

  • I think that if there is an error, then the installation should immediately stop! Or it must be a "warning", if it is not critical.
  • I already have some qt installed on my system. It's not needed (or at least unexpected for me) that it has to download it anew.

@kelson42
Copy link
Contributor

kelson42 commented Apr 6, 2023

So the error reported first has vanished?

@ynikitenko
Copy link
Author

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_native_dyn/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'

  • cd qtbase
  • /opt/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 -shared -prefix /opt/kiwix-build/./BUILD_native_dyn/INSTALL -libdir /opt/kiwix-build/./BUILD_native_dyn/INSTALL/lib
    Preparing build tree...
    Creating qmake...
    /opt/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/global/qrandom.cpp: In static member function ‘static void QRandomGenerator::SystemAndGlobalGenerators::securelySeed(QRandomGenerator*)’:
    /opt/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/global/qrandom.cpp:457:62: error: no matching function for call to ‘std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::mersenne_twister_engine(QRandomGenerator::SystemGenerator&)’
    457 | new (&rng->storage.engine()) RandomEngine(self()->sys);
    | ^
    In file included from /usr/include/c++/12.2.1/random:49,
    from /opt/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/global/qrandom.h:45,
    from /opt/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/global/qrandom.cpp:43:
    /usr/include/c++/12.2.1/bits/random.h:544:9: note: candidate: ‘template<class _Sseq, class> std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mersenne_twister_engine(_Sseq&) [with = _Sseq; _UIntType = unsigned int; long unsigned int __w = 32; long unsigned int __n = 624; long unsigned int __m = 397; long unsigned int __r = 31; _UIntType __a = 2567483615; long unsigned int __u = 11; _UIntType __d = 4294967295; long unsigned int __s = 7; _UIntType __b = 2636928640; long unsigned int __t = 15; _UIntType __c = 4022730752; long unsigned int __l = 18; _UIntType __f = 1812433253]’
    544 | mersenne_twister_engine(_Sseq& __q)
    | ^~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/12.2.1/bits/random.h:544:9: note: template argument deduction/substitution failed:
    /usr/include/c++/12.2.1/bits/random.h: In substitution of ‘template<class _Sseq, class _Engine, class _Res, class _GenerateCheck> using __is_seed_seq = std::_and<std::_not<std::is_same<typename std::remove_cv<typename std::remove_reference<_Tp>::type>::type, _Engine> >, std::is_unsigned, std::_not<std::is_convertible<_Sseq, _Res> > > [with _Sseq = QRandomGenerator::SystemGenerator; _Engine = std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>; _Res = unsigned int; _GenerateCheck = void]’:
    /usr/include/c++/12.2.1/bits/random.h:505:8: required by substitution of ‘template<class _UIntType, long unsigned int __w, long unsigned int __n, long unsigned int __m, long unsigned int __r, _UIntType __a, long unsigned int __u, _UIntType __d, long unsigned int __s, _UIntType __b, long unsigned int __t, _UIntType __c, long unsigned int __l, _UIntType __f> template using _If_seed_seq = typename std::enable_if<std::__detail::__is_seed_seq<_Sseq, std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>, _UIntType>::value>::type [with _Sseq = QRandomGenerator::SystemGenerator; _UIntType = unsigned int; long unsigned int __w = 32; long unsigned int __n = 624; long unsigned int __m = 397; long unsigned int __r = 31; _UIntType __a = 2567483615; long unsigned int __u = 11; _UIntType __d = 4294967295; long unsigned int __s = 7; _UIntType __b = 2636928640; long unsigned int __t = 15; _UIntType __c = 4022730752; long unsigned int __l = 18; _UIntType __f = 1812433253]’
    /usr/include/c++/12.2.1/bits/random.h:542:32: required from here
    /usr/include/c++/12.2.1/bits/random.h:210:13: error: no type named ‘result_type’ in ‘struct QRandomGenerator::SystemGenerator’
    210 | using __is_seed_seq = _and<
    | ^~~~~~~~~~~~~
    /usr/include/c++/12.2.1/bits/random.h:533:7: note: candidate: ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mersenne_twister_engine(result_type) [with _UIntType = unsigned int; long unsigned int __w = 32; long unsigned int __n = 624; long unsigned int __m = 397; long unsigned int __r = 31; _UIntType __a = 2567483615; long unsigned int __u = 11; _UIntType __d = 4294967295; long unsigned int __s = 7; _UIntType __b = 2636928640; long unsigned int __t = 15; _UIntType __c = 4022730752; long unsigned int __l = 18; _UIntType __f = 1812433253; result_type = unsigned int]’
    533 | mersenne_twister_engine(result_type __sd)
    | ^~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/12.2.1/bits/random.h:533:43: note: no known conversion for argument 1 from ‘QRandomGenerator::SystemGenerator’ to ‘std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::result_type’ {aka ‘unsigned int’}
    533 | mersenne_twister_engine(result_type __sd)
    | ~~~~~~~~~~~~^~~~
    /usr/include/c++/12.2.1/bits/random.h:530:7: note: candidate: ‘std::mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mersenne_twister_engine() [with _UIntType = unsigned int; long unsigned int __w = 32; long unsigned int __n = 624; long unsigned int __m = 397; long unsigned int __r = 31; _UIntType __a = 2567483615; long unsigned int __u = 11; _UIntType __d = 4294967295; long unsigned int __s = 7; _UIntType __b = 2636928640; long unsigned int __t = 15; _UIntType __c = 4022730752; long unsigned int __l = 18; _UIntType __f = 1812433253]’
    530 | mersenne_twister_engine() : mersenne_twister_engine(default_seed) { }
    | ^~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/12.2.1/bits/random.h:530:7: note: candidate expects 0 arguments, 1 provided
    /usr/include/c++/12.2.1/bits/random.h:475:11: note: candidate: ‘constexpr std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::mersenne_twister_engine(const std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>&)’
    475 | class mersenne_twister_engine
    | ^~~~~~~~~~~~~~~~~~~~~~~
    /usr/include/c++/12.2.1/bits/random.h:475:11: note: no known conversion for argument 1 from ‘QRandomGenerator::SystemGenerator’ to ‘const std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>&’
    /usr/include/c++/12.2.1/bits/random.h:475:11: note: candidate: ‘constexpr std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>::mersenne_twister_engine(std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>&&)’
    /usr/include/c++/12.2.1/bits/random.h:475:11: note: no known conversion for argument 1 from ‘QRandomGenerator::SystemGenerator’ to ‘std::mersenne_twister_engine<unsigned int, 32, 624, 397, 31, 2567483615, 11, 4294967295, 7, 2636928640, 15, 4022730752, 18, 1812433253>&&’
    make: *** [Makefile:318: qrandom.o] Error 1

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
Copy link
Author

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants