elinks icon indicating copy to clipboard operation
elinks copied to clipboard

Parallel build of documentation fails

Open aelmahmoudy opened this issue 5 years ago • 8 comments

Build of documentation fails if make is invoked with parallel build enabled:

{{{ cd doc && make -j4 all-docs make[2]: Entering directory '/<<PKGBUILDDIR>>/doc' [CONF2DOC] doc/features.txt [KEYS2DOC] doc/keymap-actions.txt [KEYS2DOC] doc/keymap-defaults.txt [HELP2XML] doc/option-command.frag.xml [HELP2XML] doc/option-config.frag.xml [ASCIIDOC] doc/elinkskeys.5.xml [HELP2XML] doc/option-command.frag.xhtml [HELP2XML] doc/option-config.frag.xhtml ERROR: elinkskeys.5.txt: line 97: empty section is not valid make[2]: *** [Makefile:185: elinkskeys.5.xml] Error 1 }}}

aelmahmoudy avatar May 25 '20 13:05 aelmahmoudy

I'll wait until someone rewrite it using CMake.

rkd77 avatar May 25 '20 19:05 rkd77

In 0.14.GIT I added meson build system. Here is sample script to build using meson:

meson build
meson configure build  -Dbrotli=true \
-Dutf-8=true \
-Dtrue-color=true \
-Dgopher=true \
-Dspidermonkey=false \
-Dbzlib=true \
-Dlzma=false \
-Dperl=false \
-Dzlib=true \
-Dbacktrace=false \
-Dcombining=true \
-Dbittorrent=true \
-D88-colors=true \
-D256-colors=true \
-Dlibdom=false \
-Dopenssl=false \
-Dgnutls=true \
-Dlibevent=true \
-Dlibev=false \
-Dterminfo=false \
-Dcgi=true \
-Druby=true \
-Dsm-scripting=false \
-Dpython=true \
-Dzstd=true \
-Dlibdom=true \
-Dwithdebug=false \
-Dluapkg='luajit' \
-Dguile=true \
-Dgpm=false \
-Dprefix=$HOME

meson compile -C build

Also documentation can be build in similar way.

meson compile -C build html

This is work in progress. Please provide ideas, pull requests, issues, etc.

rkd77 avatar Sep 23 '20 16:09 rkd77

On autoconf, I'm also getting a parallel build failure in lib.o on macOS:

[MAKE all]   src                                                                                                                                                                                    
[MAKE all]   src/bfu                                                                                                                                                                                
      [LD]   src/lib.o                                                                                                                                                                              
      [CC]   src/bfu/button.o                                                                                                                                                                       
      [CC]   src/bfu/checkbox.o                                                                                                                                                                     
ld: warning: -arch not specified                                                                                                                                                                    
ld: no object files specified                                                                                                                                                                       
make[1]: *** [lib.o] Error 1                                                                                                                                                                        
make[1]: *** Waiting for unfinished jobs....                                                                                                                                                        

I'm working to package felinks for Homebrew. I'll look more into this, and also into meson-based build, once I've done more testing.

johnsonjh avatar Jul 20 '22 17:07 johnsonjh

I tried to build using meson, I got this during meson setup:

./meson.build:6:0: ERROR: Program or command 'git' not found or not executable

the build environment doesn't have git.

aelmahmoudy avatar Apr 20 '23 18:04 aelmahmoudy

It seems that this part in meson.build needs to be wrapped in a check for git availability:

txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip()
dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip()
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')

otherwise set BUILD_ID to an empty string. Just as was done in src/Makefile

aelmahmoudy avatar Apr 22 '23 00:04 aelmahmoudy

OK, please check now.

rkd77 avatar Apr 22 '23 08:04 rkd77

That worked, thanks. Yet meson doesn't install the built pdf, html, txt docs.

Built using the command:

ninja -C buildir man html pdf txt

Install using the command:

ninja install man html pdf txt

aelmahmoudy avatar Apr 23 '23 01:04 aelmahmoudy

Fixed doc installation in: https://github.com/rkd77/elinks/pull/224

aelmahmoudy avatar Apr 23 '23 05:04 aelmahmoudy