I try to build elektra from git master using this build function:
build() {
cd lib${pkgname%-git}
[[ -d build ]] || mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DPLUGINS:STRING="ALL" \
-DTOOLS:STRING="ALL" \
-DBUILD_STATIC:STRING=OFF \
-DBINDINGS:STRING="ALL" \
-DSWIG_EXECUTABLE:STRING="/usr/bin/swig" \
-DLUA_INCLUDE_DIR:PATH=/usr/include \
-DLUA_LIBRARY:STRING=/usr/lib/liblua.so ..
make clean
make
}
This should build elektra, but
[ 0%] Building C object doc/CMakeFiles/markdownlinkconverter.dir/markdownlinkconverter/markdownlinkconverter.c.o
[ 1%] Linking C executable ../bin/markdownlinkconverter
[ 1%] Built target markdownlinkconverter
[ 1%] Generating html/index.html, man/man3elektra/kdb.3elektra
[ 1%] Built target html
[ 1%] Built target man3
[ 1%] Generating ../../../doc/man/man7/elektra-values.7
CMake Error: Error processing file: /home/haawda/paketierung/meine_Pakete/elektra-git/src/libelektra/scripts/cmake/ElektraManpage.cmake
make[2]: *** [doc/help/CMakeFiles/man-elektra-values.dir/build.make:61: ../doc/man/man7/elektra-values.7] Error 1
make[1]: *** [CMakeFiles/Makefile2:1196: doc/help/CMakeFiles/man-elektra-values.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
==> ERROR: A failure occurred in build().
Aborting...
Ronn is installed, but obviously not detected.
Full build log attached.
buildlog.txt
Thank you for the bug report. I tried to reproduce the issue using Docker. I used the following Dockerfile to build the container:
FROM archlinux/base
RUN pacman -Sy --noconfirm \
awk \
cmake \
gcc \
lua \
make \
ninja \
ruby-ronn \
swig \
tar
# Google Test
ENV GTEST_ROOT=/opt/gtest
ARG GTEST_VER=release-1.8.1
RUN mkdir -p ${GTEST_ROOT} \
&& cd /tmp \
&& curl -o gtest.tar.gz \
-L https://github.com/google/googletest/archive/${GTEST_VER}.tar.gz \
&& tar -zxvf gtest.tar.gz --strip-components=1 -C ${GTEST_ROOT} \
&& rm gtest.tar.gz
. In then executed the commands below inside the container:
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DPLUGINS:STRING="ALL" \
-DTOOLS:STRING="ALL" \
-DBUILD_STATIC:STRING=OFF \
-DBINDINGS:STRING="cpp" \
-DSWIG_EXECUTABLE:STRING="/usr/bin/swig" \
-DLUA_INCLUDE_DIR:PATH=/usr/include \
-DLUA_LIBRARY:STRING=/usr/lib/liblua.so ..
make clean
make
. The CMake command above only includes the cpp binding, since make was unable to build elektra-io-glib:
In file included from /usr/include/glib-2.0/glib/galloca.h:32,
from /usr/include/glib-2.0/glib.h:30,
from /home/jenkins/workspace/src/bindings/io/glib/io_glib.c:11:
/usr/include/glib-2.0/glib/gtypes.h:32:10: fatal error: glibconfig.h: No such file or directory
32 | #include <glibconfig.h>
| ^~~~~~~~~~~~~~
. On my machine the last command finished successfully. Can you please remove the build folder (build) and check if building Elektra works afterwards?
I tried so, but nothing changed.
I have a working build of commit g061d02af1 from 30th october here. I also downgraded cmake to 3.15.4, without success.
Does the following work:
cd /tmp
mkdir test
cd test
git clone https://github.com/ElektraInitiative/libelektra.git
cd libelektra
mkdir build
cd build
cmake ..
make -j9
on your machine?
No, that does not work either.
Scanning dependencies of target man-kdb-cmerge
Scanning dependencies of target man-kdb-help
[ 5%] Built target man-kdb-editor
[ 5%] Built target man-kdb-plugin-info
[ 5%] Built target man-kdb-meta-show
Scanning dependencies of target man-kdb-list-tools
[ 5%] Built target man-kdb-help
[ 5%] Built target man-kdb-cmerge
Scanning dependencies of target man-elektra-spec
Scanning dependencies of target man-kdb-list-commands
Scanning dependencies of target man-kdb-find
Scanning dependencies of target man-kdb-ls
Scanning dependencies of target man-kdb-meta-get
[ 5%] Built target man-kdb-list-tools
Scanning dependencies of target man-elektra-metadata
[ 5%] Built target man-elektra-spec
[ 6%] Built target man-kdb-ls
[ 6%] Built target man-kdb-list-commands
[ 6%] Built target man-kdb-find
[ 6%] Built target man-kdb-meta-get
Scanning dependencies of target man-elektra-cascading
Scanning dependencies of target man-kdb-sget
Scanning dependencies of target man-kdb-restore
[ 6%] Built target man-elektra-metadata
Scanning dependencies of target man-kdb-meta-set
[ 6%] Built target man-kdb-sget
[ 6%] Built target man-kdb-restore
Scanning dependencies of target man-kdb-backup
[ 6%] Built target man-elektra-cascading
Scanning dependencies of target man-kdb-meta-rm
Scanning dependencies of target man-kdb-reset-elektra
Scanning dependencies of target man-kdb-mount-list-all-files
Scanning dependencies of target man-kdb-mountpoint-info
Scanning dependencies of target man-kdb-elektrify-getenv
[ 6%] Built target man-kdb-meta-set
Scanning dependencies of target man-kdb-set
[ 6%] Built target man-kdb-mount-list-all-files
[ 6%] Built target man-kdb-reset-elektra
[ 6%] Built target man-kdb-meta-rm
[ 6%] Built target man-kdb-backup
[ 6%] Built target man-kdb-mountpoint-info
[ 6%] Generating ../../../../../doc/man/man1/kdb-elektrify-getenv.1
Scanning dependencies of target man-kdb-global-mount
[ 7%] Built target man-kdb-set
Scanning dependencies of target man-kdb-gen
Scanning dependencies of target man-kdb-mv
CMake Error: Error processing file: /tmp/elektratest/libelektra/scripts/cmake/ElektraManpage.cmake
Scanning dependencies of target man-kdb-plugin-check
Scanning dependencies of target man-kdb-plugin-list
make[2]: *** [src/bindings/intercept/env/CMakeFiles/man-kdb-elektrify-getenv.dir/build.make:61: ../doc/man/man1/kdb-ele
ktrify-getenv.1] Fehler 1
Scanning dependencies of target man-kdb-remount
make[1]: *** [CMakeFiles/Makefile2:15389: src/bindings/intercept/env/CMakeFiles/man-kdb-elektrify-getenv.dir/all] Fehle
r 2
make[1]: *** Es wird auf noch nicht beendete Prozesse gewartet....
Scanning dependencies of target man-kdb-reset
[ 8%] Built target man-kdb-mv
[ 8%] Built target man-kdb-global-mount
[ 8%] Built target man-kdb-plugin-check
[ 8%] Built target man-kdb-gen
[ 8%] Built target man-kdb-plugin-list
[ 8%] Built target man-kdb-remount
[ 8%] Built target man-kdb-reset
make: *** [Makefile:163: all] Fehler 2
"Es wird auf noch nicht beendete Prozesse gewartet...." meens waiting for unfinished jobs.
But similar message occurs without -j9 (I do not have so many cores).
buildlog.txt
BTW: Commit 89e79ee0502293783cfcd37602c14288cda4a35b introduces this behaviour. I can still compile g061d02af1 without problems.
Thank you for the quick reply. Can you please execute the following commands and paste the output here:
cd /tmp
mkdir test2
cd test2
git clone https://github.com/ElektraInitiative/libelektra.git
cd libelektra
cmake -D RONN_COMMAND="$(which ronn)" \
-D DIFF_COMMAND="$(which diff)" \
-D MDFILE="$PWD/doc/help/kdb.md" \
-D MANPAGE="$PWD/doc/man/man1/kdb.1" \
-P "$PWD/scripts/cmake/ElektraManpage.cmake"
echo $?
which ronn
ronn -h
which diff
diff -h
?
[haawda@frege git-aurcheck]$ cd /tmp
[haawda@frege tmp]$ mkdir test2
[haawda@frege tmp]$ cd test2
[haawda@frege test2]$ git clone https://github.com/ElektraInitiative/libelektra.git
Klone nach 'libelektra' ...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (20/20), done.
Empfange Objekte: 20% (31103/155515), 15.18 MiB | 6.06 MiB/s
remote: Total 155515 (delta 5), reused 6 (delta 0), pack-reused 155495
Empfange Objekte: 100% (155515/155515), 65.04 MiB | 6.73 MiB/s, Fertig.
L枚se Unterschiede auf: 100% (120471/120471), Fertig.
[haawda@frege test2]$ cd *
[haawda@frege libelektra]$ cmake -D RONN_COMMAND="$(which ronn)" \
> -D DIFF_COMMAND="$(which diff)" \
> -D MDFILE="$PWD/doc/help/kdb.md" \
> -D MANPAGE="$PWD/doc/man/man1/kdb.1" \
> -P "$PWD/scripts/cmake/ElektraManpage.cmake"
CMake Error: Error processing file: /tmp/test2/libelektra/scripts/cmake/ElektraManpage.cmake
[haawda@frege libelektra]$ echo $?
1
[haawda@frege libelektra]$ which ronn
/usr/bin/ronn
[haawda@frege libelektra]$ ronn -h
Usage: ronn <options> <file>...
ronn -m|--man <file>
ronn -S|--server <file> ...
ronn --pipe [<file>...]
Convert ronn source <file>s to roff or HTML manpage. In the first synopsis form,
build HTML and roff output files based on the input file names.
Mode options alter the default behavior of generating files:
--pipe write to standard output instead of generating files
-m, --man show manual like with man(1)
-S, --server serve <file>s at http://localhost:1207/
Format options control which files / formats are generated:
-r, --roff generate roff output
-5, --html generate entire HTML page with layout
-f, --fragment generate HTML fragment
--markdown generate post-processed markdown output
Document attributes:
--date=<date> published date in YYYY-MM-DD format (bottom-center)
--manual=<name> name of the manual (top-center)
--organization=<name> publishing group or individual (bottom-left)
Misc options:
-w, --warnings show troff warnings on stderr
-W disable previously enabled troff warnings
--version show ronn version and exit
--help show this help message
A <file> named example.1.ronn generates example.1.html (HTML manpage)
and example.1 (roff manpage) by default.
[haawda@frege libelektra]$ which diff
/usr/bin/diff
[haawda@frege libelektra]$ LANG=C diff --h
diff: option '--h' is ambiguous; possibilities: '--help' '--horizon-lines'
diff: Try 'diff --help' for more information.
diff --help produces very log output.
diffhelp.txt
Thank you. Can you please also add the output of the last commands of my previous comment:
which ronn
ronn -h
which diff
diff -h
?
I did so, see above.
[haawda@frege libelektra]$ which diff
/usr/bin/diff
[haawda@frege libelektra]$ which ronn
/usr/bin/ronn
I did so, see above.
Thank you. I think I found the problem. The name of ElektraManPage.cmake was spelled wrong:
. I hope commit 545ff5f5 fixes the problem. Sorry for introducing the bug and thank you for your help.
No need to apologize, mistakes happen! Thanks for the work on this.
Thank you for your kind words. I am closing this for now, since I assume commit 545ff5f did fix the issue. If it did not, then please just comment below.