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

configuration stops with settings.h missing (Origin: bugzilla #728654) #5459

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Copy link
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity blocker in component build for ---
Reported in version 1.8.7 on platform Other
Assigned to: Dimitri van Heesch

Original attachment names and IDs:

On 2014-04-21 13:41:14 +0000, Dagobert Michelsen wrote:

The configuration step is stopping without properly generating a Makefile with the following error:

Created addon/doxysearch/doxyindexer.pro from addon/doxysearch/doxyindexer.pro.in...
Generating generated_src/doxygen/lang_cfg.h...
/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7/configure: generated_src/doxygen/lang_cfg.h: cannot create
Generating generated_src/doxygen/settings.h...
Traceback (most recent call last):
File "src/settings.py", line 9, in
f1 = open(os.path.join(sys.argv[3],'settings.h'),'w')
IOError: [Errno 2] No such file or directory: 'generated_src/doxygen/settings.h'
Finished

The invocation starts with

cd work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 && mkdir -p . && cd . && /usr/bin/env -i HOME="/home/dam" PATH="/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/install-isa-sparcv8plus/opt/csw/bin:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/install-isa-sparcv8plus/opt/csw/bin:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/install-isa-sparcv8plus/opt/csw/sbin:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/install-isa-sparcv8plus/opt/csw/sbin:/opt/csw/bin:/opt/csw/bin:/opt/csw/sbin:/opt/csw/sbin:/opt/solarisstudio12.3/bin:/home/dam/mgar/pkg/.buildsys/v2/gar/bin:/usr/bin:/usr/sbin:/usr/java/bin:/usr/ccs/bin:/usr/openwin/bin" LC_ALL="C" prefix="/opt/csw" exec_prefix="/opt/csw" bindir="/opt/csw/bin" sbindir="/opt/csw/sbin" libexecdir="/opt/csw/libexec" datadir="/opt/csw/share" sysconfdir="/etc/opt/csw" sharedstatedir="/opt/csw/share" localstatedir="/var/opt/csw" libdir="/opt/csw/lib" infodir="/opt/csw/share/info" lispdir="/opt/csw/share/emacs/site-lisp" includedir="/opt/csw/include" mandir="/opt/csw/share/man" docdir="/opt/csw/share/doc" sourcedir="/opt/csw/src" CPPFLAGS="-I/opt/csw/include" CFLAGS="-xO3 -m32 -xarch=sparc" CXXFLAGS="-xO3 -m32 -xarch=sparc -features=tmplrefstatic -features=extensions -D__FUNCTION__=func" LDFLAGS="-m32 -xarch=sparc -L/opt/csw/lib -norunpath" FFLAGS="-xO3 -m32 -xarch=sparc" FCFLAGS="-xO3 -m32 -xarch=sparc" F77=" " FC="/opt/solarisstudio12.3/bin/f95 " ASFLAGS="" OPTFLAGS="-xO3 -m32 -xarch=sparc" CC="/opt/solarisstudio12.3/bin/cc " CXX="/opt/solarisstudio12.3/bin/CC " CC_HOME="/opt/solarisstudio12.3" CC_VERSION="Sun C 5.12 SunOS_sparc Patch 148917-07 2013/10/18" CXX_VERSION="Sun C++ 5.12 SunOS_sparc Patch 148506-16 2013/12/03" GARCH="sparc" GAROSREL="5.10" GARPACKAGE="trunk" LD_OPTIONS="-R/opt/csw/lib/$ISALIST -R/opt/csw/lib -M /home/dam/mgar/pkg/.buildsys/v2/gar/lib/map.solaris10 -B direct -z ignore" PKG_CONFIG_PATH="/opt/csw/lib/pkgconfig" DESTDIR="/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/install-isa-sparcv8plus" /home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7/configure --prefix /opt/csw --release --docdir /opt/csw/share/doc/doxygen --dot /opt/csw/bin/dot --platform solaris-cc
Checking for platform solaris-cc... supported
Checking for GNU make tool... using /opt/csw/bin/gmake
Checking for GNU install tool... using /opt/csw/bin/ginstall
Checking for dot (part of GraphViz)... using /opt/csw/bin/dot
Checking for python... using /opt/csw/bin/python2
Checking for perl... using /opt/csw/bin/perl
Checking for flex... using /opt/csw/bin/flex
Checking for bison... using /opt/csw/bin/bison
/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7/configure: !: not found
Generating generated_src/doxygen/version.cpp and VERSION...

On 2014-04-21 14:20:14 +0000, albert wrote:

An interesting statement is "!: not found"

Can you run with on the first line #!/bin/sh -xv instead of #!/bin/sh and attach the entire output to this bug report.

On 2014-04-21 14:23:34 +0000, Dimitri van Heesch wrote:

Seems like

if ! test -d "generated_src/doxygen"; then
mkdir -p generated_src/doxygen
fi
if test "$f_wizard" = YES; then
if ! test -d "generated_src/doxywizard"; then
mkdir -p generated_src/doxywizard
fi
fi

is indeed not understood by your shell. Can you check if you replace it with

mkdir -p generated_src/doxygen
if test "$f_wizard" = YES; then
mkdir -p generated_src/doxywizard
fi

There is no harm in trying to create an existing directory with mkdir -p.

On 2014-04-21 16:12:56 +0000, Dagobert Michelsen wrote:

Yes, this fixes the issue. There is now another issue left at the end of configure:

Generating generated_src/doxygen/lang_cfg.h...
Traceback (most recent call last):
File "src/lang_cfg.py", line 4, in
if (sys.argv[1] == "ENONLY"):
IndexError: list index out of range
Generating generated_src/doxygen/settings.h...
Finished
[configure-modulated] complete for oxygen.

However, compilation seems to start fine.

On 2014-04-21 16:21:45 +0000, albert wrote:

Strange as the statement is "protected" against "underflow" of argv.

The file reads:
import sys

if (len(sys.argv) > 0):
if (sys.argv[1] == "ENONLY"):
print "#define ENGLISH_ONLY"
else:
for x in xrange(1, len(sys.argv)):
print "#define LANG_%s"%(sys.argv[x])

Can You change this in:
import sys

print (sys.version)
print len(sys.argv)
print sys.argv
if (len(sys.argv) > 0):
if (sys.argv[1] == "ENONLY"):
print "#define ENGLISH_ONLY"
else:
for x in xrange(1, len(sys.argv)):
print "#define LANG_%s"%(sys.argv[x])

and send the result.

On 2014-04-21 16:35:21 +0000, Dagobert Michelsen wrote:

This is probably due to the length indexing starting by 0:

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > /opt/csw/bin/python src/lang_cfg.py
2.6.9 (unknown, Oct 31 2013, 16:41:40) [C]
1
['src/lang_cfg.py']
Traceback (most recent call last):
File "src/lang_cfg.py", line 7, in
if (sys.argv[1] == "ENONLY"):
IndexError: list index out of range
zsh: 12171 exit 1 /opt/csw/bin/python src/lang_cfg.py
dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > /opt/csw/bin/python src/lang_cfg.py abc
2.6.9 (unknown, Oct 31 2013, 16:41:40) [C]
2
['src/lang_cfg.py', 'abc']
#define LANG_abc

On 2014-04-21 17:00:54 +0000, albert wrote:

The ./configure script should look after it that lang_cfg.py always gets arguments. In case no languages are specified the entire list of languages should follow.
Can you also do the test with ./configure? and send the content of generated_src/doxygen/lang_cfg.h

In configure the variables f_lang and f_ulang are used, would be good to have their content as well just before calling src/lang_cfg.py
(also the output with #!/bin/sh -xv would do)

On 2014-04-22 19:43:17 +0000, Dagobert Michelsen wrote:

The full configure with 'set -x' is available at
http://buildfarm.opencsw.org/~dam/doxygen-1.8.7-configure.out
The reason is that f_langs is empty because sed on Solaris is not GNU sed:

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/.h//' | tr '\012' ',' ;echo
am,ar,br,ca,cn,cz,de,dk,en,eo,es,fa,fi,fr,gr,hr,hu,id,it,je,jp,ke,kr,lt,lv,mk,nl,no,pl,pt,ro,ru,sc,si,sk,sr,sv,tr,tw,ua,vi,za,
dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/.h//' | tr '\012' ',' | sed -e 's/,$//';echo

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > (ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/.h//' | tr '\012' ',' ;echo)| sed -e 's/,$//';echo
am,ar,br,ca,cn,cz,de,dk,en,eo,es,fa,fi,fr,gr,hr,hu,id,it,je,jp,ke,kr,lt,lv,mk,nl,no,pl,pt,ro,ru,sc,si,sk,sr,sv,tr,tw,ua,vi,za

It looks like Solaris sed does not like unterminated strings as input:

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > printf "abc" | sed -e 's/b/d/';echo

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 >

On 2014-04-23 17:12:08 +0000, albert wrote:

Created attachment 274971
Test script to be run on solarsi for sed problem

As you mentioned the sed on Solaris is not GNO sed, is it possible to obtain a version of GNU sed for Solaris ?

It is for me not clear which of the sed commands causes the problem, so can you run the attached script?

Is it possible to point out what the right syntax might be for the troublesome sed command? If we cannot find a solution we have to think about implementing this line in something else (e.g. awk).

On 2014-04-23 20:11:06 +0000, Dagobert Michelsen wrote:

Sure:

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > ./solaris_tst.sh
======= step 1 ==========
src/translator_am.h src/translator_ar.h src/translator_br.h src/translator_ca.h src/translator_cn.h src/translator_cz.h src/translator_de.h src/translator_dk.h src/translator_en.h src/translator_eo.h src/translator_es.h src/translator_fa.h src/translator_fi.h src/translator_fr.h src/translator_gr.h src/translator_hr.h src/translator_hu.h src/translator_id.h src/translator_it.h src/translator_je.h src/translator_jp.h src/translator_ke.h src/translator_kr.h src/translator_lt.h src/translator_lv.h src/translator_mk.h src/translator_nl.h src/translator_no.h src/translator_pl.h src/translator_pt.h src/translator_ro.h src/translator_ru.h src/translator_sc.h src/translator_si.h src/translator_sk.h src/translator_sr.h src/translator_sv.h src/translator_tr.h src/translator_tw.h src/translator_ua.h src/translator_vi.h src/translator_za.h
======= step 2 ==========
am.h ar.h br.h ca.h cn.h cz.h de.h dk.h en.h eo.h es.h fa.h fi.h fr.h gr.h hr.h hu.h id.h it.h je.h jp.h ke.h kr.h lt.h lv.h mk.h nl.h no.h pl.h pt.h ro.h ru.h sc.h si.h sk.h sr.h sv.h tr.h tw.h ua.h vi.h za.h
======= step 3 ==========
am ar br ca cn cz de dk en eo es fa fi fr gr hr hu id it je jp ke kr lt lv mk nl no pl pt ro ru sc si sk sr sv tr tw ua vi za
======= step 4 ==========
am,ar,br,ca,cn,cz,de,dk,en,eo,es,fa,fi,fr,gr,hr,hu,id,it,je,jp,ke,kr,lt,lv,mk,nl,no,pl,pt,ro,ru,sc,si,sk,sr,sv,tr,tw,ua,vi,za,
======= step 5 ==========

=========================

A normal Solaris 10 does not ship GNU sed, so relying on that would be bad. It looks like that
sed works on reading full lines terminated by a newline. I think the last line without newline is
silently ignored. The XPG4 sed shipped with Solaris gives a hint on that:

dam@unstable10s [unstable10s]:/home/dam > printf "a,b,c" | /usr/xpg4/bin/sed -e 's/b/d/';echo
sed: Missing newline at end of file standard input.
a,d,c

I am not sure if this behavior of Solaris sed can be modified.

Unfortunately my awk is not that good, in Perl I would write it like this:

dam@unstable10s [unstable10s]:/home/dam/mgar/pkg/doxygen/trunk/work/solaris10-sparc/build-isa-sparcv8plus/doxygen-1.8.7 > ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/.h//' | perl -e 'local $/;print join(",",split(/\n/,<>)),"\n"'
am,ar,br,ca,cn,cz,de,dk,en,eo,es,fa,fi,fr,gr,hr,hu,id,it,je,jp,ke,kr,lt,lv,mk,nl,no,pl,pt,ro,ru,sc,si,sk,sr,sv,tr,tw,ua,vi,za

On 2014-04-23 20:44:32 +0000, Dagobert Michelsen wrote:

I just had a chat on IRC on #sed and User emg suggested to not parse ls(tm) as in
http://mywiki.wooledge.org/ParsingLs

Instead he suggested the posix-conformant construct
unset comma; for f in src/translator_??.h; do f=${f%.h}; printf %s%s "$comma" "${f#src/translator_}"; comma=, done

On 2014-04-24 17:00:50 +0000, albert wrote:

Created attachment 275069
Updated configure script

I had a look at it and I think the solution can be quite simple, just remove the last sed in the f_langs assignment. The last comma is removed (at least where I test it when translating f_langs to f_ulangs. If this is not the case under Solaris (can be checked by printing f_ulangs), I just have to adjust the lang_cfg.py slightly (ignoring empty arguments), but I prefer when this is not necessary.

I've attached an updated configure (including the changes for the if ( ! test problem.

Please try it, the last line in the generated/doxygen/lang_cfg.h should be
#define LANG_ZA
if it works

On 2014-04-25 20:57:41 +0000, Dagobert Michelsen wrote:

Yes, that line is the last line. configure looks good now.

On 2014-04-26 09:22:07 +0000, albert wrote:

Thank you for all the information.
I've just pushed a patch to github (pull request 161) including all changes.

This bug fix fixes, in a general way, a number of issues encountered on Solaris

  • configure
    • ! (exclamation mark) not recognized properly, but with mkdir -p no test is necessary (fix from Dimitri)
    • sed problem regarding removing last , (comma) in language list. Is automatically replaced in with a space when translating language names to upper case.
  • lang_cfg.py
    • corrected check on number of arguments

On 2014-04-26 11:35:44 +0000, albert wrote:

Pull request integrated in git

On 2014-04-29 14:27:50 +0000, Dagobert Michelsen wrote:

I have now set up continuous integration for doxygen building on Solaris:
https://buildfarm.opencsw.org/buildbot/waterfall?builder=doxygen-solaris10-i386&builder=doxygen-solaris10-sparc&reload=60
Feel free to link to the page for reference. I can also set up notification on build failures.

On 2014-08-21 17:15:16 +0000, Dimitri van Heesch wrote:

This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.8.8. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant (preferrably in the form of a self-contained example).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.