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

kiwix-desktop fails to build under Arch Linux #260

Closed
THS-on opened this issue Oct 3, 2018 · 13 comments · Fixed by kiwix/kiwix-desktop#131
Closed

kiwix-desktop fails to build under Arch Linux #260

THS-on opened this issue Oct 3, 2018 · 13 comments · Fixed by kiwix/kiwix-desktop#131
Assignees

Comments

@THS-on
Copy link

THS-on commented Oct 3, 2018

I've added arch to the compatible_host list as described here: kiwix/kiwix-desktop#37 (comment).
Building with dependencies failed because http://download.kiwix.org/dev/zlib-1.2.8.tar.gz: is not reachable, so I tried to build it without ( kiwix-build kiwix-desktop --target-platform native_dyn --build-nodeps).
This also failed. This error is a known issue and can be fixed by manually building kiwix-desktop with qmake QMAKE_CFLAGS_ISYSTEM=. More here: https://bugreports.qt.io/browse/QTBUG-53367

Another thing is that the auto scaling in QT is somewhat broken that means all Icons are too big and I have to start kiwix-desktop like this:

QT_AUTO_SCREEN_SCALE_FACTOR=0 kiwix-desktop

Build log

(kiwix-build) [user@USER-PC kiwix-build]$ kiwix-build kiwix-desktop --target-platform native_dyn --build-nodeps
[INSTALL PACKAGES]
SKIP, No package to install.
[SETUP PLATFORMS]
[PREPARE]
prepare sources kiwix-desktop :
  gitclone kiwix-desktop : OK
  gitupdate kiwix-desktop : OK
[BUILD]
build kiwix-desktop (native_dyn):
  configure kiwix-desktop : OK
  compile kiwix-desktop : ERROR
/usr/bin/uic ../../SOURCE/kiwix-desktop/ui/mainwindow.ui -o ui_mainwindow.h
/usr/bin/uic ../../SOURCE/kiwix-desktop/ui/about.ui -o ui_about.h
/usr/bin/uic ../../SOURCE/kiwix-desktop/src/tocsidebar.ui -o ui_tocsidebar.h
g++ -c -pipe -std=c++11 -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DGIT_VERSION="2.0-alpha3" -DBUILD_DATE="Mi 3. Okt 20:35:45 CEST 2018" -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I../../SOURCE/kiwix-desktop -I. -isystem /usr/include -isystem /usr/include/qt -isystem /usr/include/qt/QtWebEngineWidgets -isystem /usr/include/qt/QtWebEngineCore -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtWebChannel -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtPositioning -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o main.o ../../SOURCE/kiwix-desktop/src/main.cpp
g++ -c -pipe -std=c++11 -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DGIT_VERSION="2.0-alpha3" -DBUILD_DATE="Mi 3. Okt 20:35:45 CEST 2018" -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I../../SOURCE/kiwix-desktop -I. -isystem /usr/include -isystem /usr/include/qt -isystem /usr/include/qt/QtWebEngineWidgets -isystem /usr/include/qt/QtWebEngineCore -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtWebChannel -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtPositioning -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o mainwindow.o ../../SOURCE/kiwix-desktop/src/mainwindow.cpp
g++ -c -pipe -std=c++11 -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DGIT_VERSION="2.0-alpha3" -DBUILD_DATE="Mi 3. Okt 20:35:45 CEST 2018" -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I../../SOURCE/kiwix-desktop -I. -isystem /usr/include -isystem /usr/include/qt -isystem /usr/include/qt/QtWebEngineWidgets -isystem /usr/include/qt/QtWebEngineCore -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtWebChannel -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtPositioning -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o kiwixapp.o ../../SOURCE/kiwix-desktop/src/kiwixapp.cpp
g++ -c -pipe -std=c++11 -O2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wall -W -D_REENTRANT -fPIC -DGIT_VERSION="2.0-alpha3" -DBUILD_DATE="Mi 3. Okt 20:35:45 CEST 2018" -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WEBENGINEWIDGETS_LIB -DQT_WEBENGINECORE_LIB -DQT_QUICK_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_POSITIONING_LIB -DQT_CORE_LIB -I../../SOURCE/kiwix-desktop -I. -isystem /usr/include -isystem /usr/include/qt -isystem /usr/include/qt/QtWebEngineWidgets -isystem /usr/include/qt/QtWebEngineCore -isystem /usr/include/qt/QtQuick -isystem /usr/include/qt/QtPrintSupport -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtWebChannel -isystem /usr/include/qt/QtQml -isystem /usr/include/qt/QtNetwork -isystem /usr/include/qt/QtPositioning -isystem /usr/include/qt/QtCore -I. -isystem /usr/include/libdrm -I. -I/usr/lib/qt/mkspecs/linux-g++ -o blobbuffer.o ../../SOURCE/kiwix-desktop/src/blobbuffer.cpp
In file included from /usr/include/c++/8.2.1/bits/stl_algo.h:59,
                 from /usr/include/c++/8.2.1/algorithm:62,
                 from /usr/include/qt/QtCore/qglobal.h:142,
                 from /usr/include/qt/QtGui/qtguiglobal.h:43,
                 from /usr/include/qt/QtWidgets/qtwidgetsglobal.h:43,
                 from /usr/include/qt/QtWidgets/qmainwindow.h:43,
                 from /usr/include/qt/QtWidgets/QMainWindow:1,
                 from ../../SOURCE/kiwix-desktop/src/mainwindow.h:4,
                 from ../../SOURCE/kiwix-desktop/src/mainwindow.cpp:2:
/usr/include/c++/8.2.1/cstdlib:75:15: schwerwiegender Fehler: stdlib.h: Datei oder Verzeichnis nicht gefunden
 #include_next <stdlib.h>
               ^~~~~~~~~~
Kompilierung beendet.
make: *** [Makefile:944: mainwindow.o] Fehler 1
make: *** Es wird auf noch nicht beendete Prozesse gewartet....
In file included from /usr/include/c++/8.2.1/ext/string_conversions.h:41,
                 from /usr/include/c++/8.2.1/bits/basic_string.h:6391,
                 from /usr/include/c++/8.2.1/string:52,
                 from /usr/include/c++/8.2.1/bits/locale_classes.h:40,
                 from /usr/include/c++/8.2.1/bits/ios_base.h:41,
                 from /usr/include/c++/8.2.1/ios:42,
                 from /usr/include/c++/8.2.1/ostream:38,
                 from /usr/include/c++/8.2.1/iostream:39,
                 from /usr/include/zim/blob.h:25,
                 from ../../SOURCE/kiwix-desktop/src/blobbuffer.h:4,
                 from ../../SOURCE/kiwix-desktop/src/blobbuffer.cpp:1:
/usr/include/c++/8.2.1/cstdlib:75:15: schwerwiegender Fehler: stdlib.h: Datei oder Verzeichnis nicht gefunden
 #include_next <stdlib.h>
               ^~~~~~~~~~
Kompilierung beendet.
In file included from /usr/include/c++/8.2.1/ext/string_conversions.h:41,
                 from /usr/include/c++/8.2.1/bits/basic_string.h:6391,
                 from /usr/include/c++/8.2.1/string:52,
                 from /usr/include/c++/8.2.1/bits/locale_classes.h:40,
                 from /usr/include/c++/8.2.1/bits/ios_base.h:41,
                 from /usr/include/c++/8.2.1/ios:42,
                 from /usr/include/c++/8.2.1/istream:38,
                 from /usr/include/c++/8.2.1/sstream:38,
                 from /usr/include/kiwix/manager.h:24,
                 from ../../SOURCE/kiwix-desktop/src/library.h:4,
                 from ../../SOURCE/kiwix-desktop/src/kiwixapp.h:4,
                 from ../../SOURCE/kiwix-desktop/src/main.cpp:1:
/usr/include/c++/8.2.1/cstdlib:75:15: schwerwiegender Fehler: stdlib.h: Datei oder Verzeichnis nicht gefunden
 #include_next <stdlib.h>
               ^~~~~~~~~~
In file included from /usr/include/c++/8.2.1/ext/string_conversions.h:41,
                 from /usr/include/c++/8.2.1/bits/basic_string.h:6391,
                 from /usr/include/c++/8.2.1/string:52,
                 from /usr/include/c++/8.2.1/bits/locale_classes.h:40,
                 from /usr/include/c++/8.2.1/bits/ios_base.h:41,
                 from /usr/include/c++/8.2.1/ios:42,
                 from /usr/include/c++/8.2.1/istream:38,
                 from /usr/include/c++/8.2.1/sstream:38,
                 from /usr/include/kiwix/manager.h:24,
                 from ../../SOURCE/kiwix-desktop/src/library.h:4,
                 from ../../SOURCE/kiwix-desktop/src/kiwixapp.h:4,
                 from ../../SOURCE/kiwix-desktop/src/kiwixapp.cpp:1:
/usr/include/c++/8.2.1/cstdlib:75:15: schwerwiegender Fehler: stdlib.h: Datei oder Verzeichnis nicht gefunden
 #include_next <stdlib.h>
               ^~~~~~~~~~
Kompilierung beendet.
Kompilierung beendet.
make: *** [Makefile:958: blobbuffer.o] Fehler 1
make: *** [Makefile:930: main.o] Fehler 1
make: *** [Makefile:955: kiwixapp.o] Fehler 1
run command 'make -j4  '
current directory is '/home/user/aur/kiwix-build/BUILD_native_dyn/kiwix-desktop'
env is :
  LS_COLORS : 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'
  XDG_MENU_PREFIX : 'gnome-'
  LANG : 'de_DE.UTF-8'
  GDM_LANG : 'de_DE.UTF-8'
  DISPLAY : ':0'
  COLORTERM : 'truecolor'
  USERNAME : 'user'
  MOZ_PLUGIN_PATH : '/usr/lib/mozilla/plugins'
  XDG_VTNR : '2'
  GIO_LAUNCHED_DESKTOP_FILE_PID : '3949'
  SSH_AUTH_SOCK : '/run/user/1000/keyring/ssh'
  VIRTUAL_ENV : '/home/user/aur/kiwix-build'
  XDG_SESSION_ID : '2'
  USER : 'user'
  DESKTOP_SESSION : 'gnome-xorg'
  PWD : '/home/user/aur/kiwix-build'
  HOME : '/home/user'
  GUAKE_TAB_UUID : '846c04b7-f8cf-459f-8902-81a994a145af'
  XDG_SESSION_TYPE : 'x11'
  XDG_DATA_DIRS : '/home/user/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/'
  XDG_SESSION_DESKTOP : 'gnome-xorg'
  GJS_DEBUG_OUTPUT : 'stderr'
  MAIL : '/var/spool/mail/user'
  WINDOWPATH : '2'
  VTE_VERSION : '5401'
  TERM : 'xterm-256color'
  SHELL : '/usr/bin/fish'
  XDG_CURRENT_DESKTOP : 'GNOME'
  GIO_LAUNCHED_DESKTOP_FILE : '/usr/share/applications/guake.desktop'
  XDG_SEAT : 'seat0'
  SHLVL : '2'
  GDK_BACKEND : 'x11'
  GDMSESSION : 'gnome-xorg'
  LOGNAME : 'user'
  DBUS_SESSION_BUS_ADDRESS : 'unix:path=/run/user/1000/bus'
  XDG_RUNTIME_DIR : '/run/user/1000'
  XAUTHORITY : '/run/user/1000/gdm/Xauthority'
  PATH : '/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/bin:/home/user/aur/kiwix-build/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl'
  PS1 : '(kiwix-build) [\\u@\\h \\W]\\$ '
  GJS_DEBUG_TOPICS : 'JS ERROR;JS LOG'
  SESSION_MANAGER : 'local/USER-PC:@/tmp/.ICE-unix/767,unix/USER-PC:/tmp/.ICE-unix/767'
  _ : '/home/user/aur/kiwix-build/bin/kiwix-build'
  PKG_CONFIG_PATH : ':/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib/pkgconfig'
  LD_LIBRARY_PATH : ':/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib:/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib'
  QMAKE_CXXFLAGS : '-I/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/include '
  CPPFLAGS : '-I/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/include '
  QMAKE_LFLAGS : '-L/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib -L/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib '
  LDFLAGS : '-L/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib -L/home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib '

Stopping build due to errors
@kelson42
Copy link
Contributor

kelson42 commented Oct 3, 2018

@THS-on It looks like my cleanup action was a bit too much, I have put back http://download.kiwix.org/dev/zlib-1.2.8.tar.gz. Can you try again please?

@THS-on
Copy link
Author

THS-on commented Oct 13, 2018

Currently it fails because xapian-core-1.4.7.tar.xz is missing but there is a xapian-core-1.4.7.zip. I've patched kiwix-build to use the zip file instead and it fails because libaria2 doesn't want to build.

prepare sources libaria2 :
  download libaria2 : OK
  extract libaria2 : OK
  patch libaria2 : OK
  post_prepare_script libaria2 : ERROR
Copying file ABOUT-NLS
Copying file config.rpath
Copying file m4/codeset.m4
Copying file m4/fcntl-o.m4
Copying file m4/gettext.m4
Copying file m4/glibc2.m4
Copying file m4/glibc21.m4
Copying file m4/iconv.m4
Copying file m4/intdiv0.m4
Copying file m4/intl.m4
Copying file m4/intldir.m4
Copying file m4/intlmacosx.m4
Copying file m4/intmax.m4
Copying file m4/inttypes-pri.m4
Copying file m4/inttypes_h.m4
Copying file m4/lcmessage.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/lock.m4
Copying file m4/longlong.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/printf-posix.m4
Copying file m4/progtest.m4
Copying file m4/size_max.m4
Copying file m4/stdint_h.m4
Copying file m4/threadlib.m4
Copying file m4/uintmax_t.m4
Copying file m4/visibility.m4
Copying file m4/wchar_t.m4
Copying file m4/wint_t.m4
Copying file m4/xsize.m4
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/en@boldquot.header
Copying file po/en@quot.header
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin
aclocal: overwriting 'm4/ax_check_compile_flag.m4' with '/usr/share/aclocal/ax_check_compile_flag.m4'
aclocal: installing 'm4/ax_cxx_compile_stdcxx.m4' from '/usr/share/aclocal/ax_cxx_compile_stdcxx.m4'
aclocal: overwriting 'm4/ax_cxx_compile_stdcxx_11.m4' with '/usr/share/aclocal/ax_cxx_compile_stdcxx_11.m4'
aclocal: installing 'm4/libgcrypt.m4' from '/usr/share/aclocal/libgcrypt.m4'
aclocal: installing 'm4/libtool.m4' from '/usr/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from '/usr/share/aclocal/lt~obsolete.m4'
aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
aclocal: installing 'm4/ax_require_defined.m4' from '/usr/share/aclocal/ax_require_defined.m4'
aclocal: error: too many loops
aclocal: Please contact <bug-automake@gnu.org>.
 at /usr/share/automake-1.16/Automake/Channels.pm line 662.
	Automake::Channels::msg("automake", "", "too many loops") called at /usr/share/automake-1.16/Automake/ChannelDefs.pm line 212
	Automake::ChannelDefs::prog_error("too many loops") called at /usr/bin/aclocal line 1195
autoreconf: aclocal failed with exit status: 255
run command 'autoreconf -i'
current directory is '/home/user/aur/kiwix-build/SOURCE/libaria2-1.33.1'
`` ` 

@THS-on THS-on closed this as completed Oct 13, 2018
@THS-on THS-on reopened this Oct 13, 2018
@kelson42
Copy link
Contributor

@kelson42
Copy link
Contributor

kelson42 commented Nov 3, 2018

@THS-on What is the status on this?

@THS-on
Copy link
Author

THS-on commented Nov 5, 2018

It still fails but now with building the QT dependency.

(kiwix-build) [user@USER-PC kiwix-build]$ kiwix-build kiwix-desktop
[INSTALL PACKAGES]
SKIP, No package to install.
[SETUP PLATFORMS]
[PREPARE]
prepare sources icu4c :
  download icu4c : SKIP
  extract icu4c : SKIP
  patch icu4c : SKIP
prepare sources zlib :
  download zlib : SKIP
  extract zlib : SKIP
  patch zlib : SKIP
prepare sources qt :
  download qt : Sha256 for qt-everywhere-src-5.10.1.tar.xz not set, do no verify download
OK
  extract qt : OK
prepare sources qtwebengine :
  download qt : SKIP
  extract qt : SKIP
prepare sources pugixml :
  download pugixml : OK1.50%
  extract pugixml : OK
  patch pugixml : OK
prepare sources lzma :
  download lzma : OK0.43%
  extract lzma : OK
prepare sources uuid :
  download uuid : OK0.75%
  extract uuid : OK
prepare sources xapian-core :
  download xapian-core : OK0.04%
  extract xapian-core : OK
  patch xapian-core : OK
prepare sources libzim :
  gitclone libzim : OK
  gitupdate libzim : OK
prepare sources libcurl :
  download libcurl : OK0.09%
  extract libcurl : OK
prepare sources ctpp2c :
  download ctpp2 : OK1.26%
  extract ctpp2 : OK
  patch ctpp2 : OK
prepare sources ctpp2 :
  download ctpp2 : SKIP
  extract ctpp2 : SKIP
  patch ctpp2 : SKIP
prepare sources kiwix-lib :
  gitclone kiwix-lib : OK
  gitupdate kiwix-lib : OK
prepare sources kiwix-desktop :
  gitclone kiwix-desktop : OK
  gitupdate kiwix-desktop : OK
[BUILD]
build icu4c (native_dyn):
  configure icu4c : OK
  compile icu4c : ...OK
  install icu4c : OK
build zlib (native_dyn):
  pre_build_script zlib : OK
  configure zlib : OK
  compile zlib : OK
  install zlib : OK
build qt (native_dyn):
  configure qt : ...ERROR
+ cd qtbase
+ /home/user/aur/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 /home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL -libdir /home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib
Preparing build tree...
Creating qmake...
/home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:101:12: Fehler: »int renameat2(int, const char*, int, const char*, unsigned int)« wurde »extern« deklariert und später »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.2.1/cstdio:42,
                 from /usr/include/c++/8.2.1/ext/string_conversions.h:43,
                 from /usr/include/c++/8.2.1/bits/basic_string.h:6391,
                 from /usr/include/c++/8.2.1/string:52,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/tools/qbytearray.h:52,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qbytearray.h:1,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:49,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qstring.h:1,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/io/qiodevice.h:50,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qiodevice.h:1,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/../../src/corelib/io/qfiledevice.h:43,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/include/QtCore/qfiledevice.h:1,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfile.h:44,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_p.h:54,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:43:
/usr/include/stdio.h:164:12: Anmerkung: vorherige Deklaration von »int renameat2(int, const char*, int, const char*, unsigned int)«
 extern int renameat2 (int __oldfd, const char *__old, int __newfd,
            ^~~~~~~~~
In file included from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:106:
/usr/include/linux/stat.h:56:8: Fehler: Redefinition von »struct statx_timestamp«
 struct statx_timestamp {
        ^~~~~~~~~~~~~~~
In file included from /usr/include/sys/stat.h:446,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
/usr/include/bits/statx.h:25:8: Anmerkung: vorherige Definition von »struct statx_timestamp«
 struct statx_timestamp
        ^~~~~~~~~~~~~~~
In file included from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:106:
/usr/include/linux/stat.h:99:8: Fehler: Redefinition von »struct statx«
 struct statx {
        ^~~~~
In file included from /usr/include/sys/stat.h:446,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
/usr/include/bits/statx.h:36:8: Anmerkung: vorherige Definition von »struct statx«
 struct statx
        ^~~~~
/home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:107:12: Fehler: »int statx(int, const char*, int, unsigned int, statx*)« wurde »extern« deklariert und später »static« [-fpermissive]
 static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
            ^~~~~
In file included from /usr/include/sys/stat.h:446,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/mkspecs/linux-g++/qplatformdefs.h:75,
                 from /home/user/aur/kiwix-build/SOURCE/qt-5.10.1/qtbase/src/corelib/io/qfilesystemengine_unix.cpp:42:
/usr/include/bits/statx.h:87:5: Anmerkung: vorherige Deklaration von »int statx(int, const char*, int, unsigned int, statx*)«
 int statx (int __dirfd, const char *__restrict __path, int __flags,
     ^~~~~
make: *** [Makefile:429: qfilesystemengine_unix.o] Fehler 1
run command '/home/user/aur/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 /home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL -libdir /home/user/aur/kiwix-build/BUILD_native_dyn/INSTALL/lib'
current directory is '/home/user/aur/kiwix-build/BUILD_native_dyn/qt-5.10.1'

@kelson42
Copy link
Contributor

@mgautierfr Any idea?

@kelson42
Copy link
Contributor

A similar compilation error meta-qt5/meta-qt5#94

@mgautierfr
Copy link
Member

I strongly suggest to not build Qt and QtWebEngine. They are very complex (and long) to compile.
Distribution packages are far better than a custom build script here. (and I will not try to debug qt compilation on arch)

The best you can do is to add the list of package to install in https://github.com/kiwix/kiwix-build/blob/master/kiwixbuild/packages.py. See how it is made of 'debian_native_dyn' and does the "same" for arch_native_dyn. (I don't know the list of packages to install, you will have to find the equivalent to the ubuntu ones on arch)
You will also have to tell kiwix-build how to install packages on arch by adding a case to https://github.com/kiwix/kiwix-build/blob/master/kiwixbuild/builder.py#L153-L162

@THS-on
Copy link
Author

THS-on commented Apr 9, 2019

@mgautierfr I've tried to build it with kiwix-build kiwix-desktop --target-platform native_dyn --build-nodeps. This still fails with the originally reported issue. This issue has nothing really to do with the dependencies, it is about qmake.
See here

mgautierfr added a commit to kiwix/kiwix-desktop that referenced this issue Apr 16, 2019
It appears that setting `INCLUDEPATH` in qmake break things.
Because qmake add the include path using `-isystem`.

We don't need to extract include path and define  from PKGCONFIG_CFLAGS.
Updating `CFLAGS` and `CXXFLAGS` is enough. No need for complex things.

Fix #90
Fix kiwix/kiwix-build#260
@mgautierfr
Copy link
Member

Thanks @THS-on for the links, it helps me understand the problem.
The PR kiwix/kiwix-desktop#131 should fix the problem.

It would be nice that you confirm the issue is close with the PR and I will merge it.
You can checkout the PR in the SOURCE/kiwix-desktop directory. And run kiwix-build kiwix-desktop --target-platform native_dyn --build-nodeps --skip-source-prepare --assume-packages-installed to test the build.

@THS-on
Copy link
Author

THS-on commented Apr 19, 2019

@mgautierfr I tried to build it with your patch and it works! Thank you for fixing this.

@THS-on THS-on closed this as completed Apr 19, 2019
@soloturn
Copy link
Contributor

soloturn commented Jun 2, 2019

@THS-on what command are you using currently to build? is it
kiwix-build kiwix-desktop --target-platform native_dyn --build-nodeps --skip-source-prepare --assume-packages-installed

because this gives for me:
ERROR: The target platform native_dyn cannot be build on host arch.

@THS-on
Copy link
Author

THS-on commented Jun 2, 2019

@soloturn
You still need to add arch to the compatible_host in kiwixbuild/platforms/native.py and kiwixbuild/platforms/neutral.py.

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

Successfully merging a pull request may close this issue.

4 participants