Mixed language code documentation - need help to debug doxygen - c++

I would be glad to make the code documentation of our big project, http://www.diracprogram.org, which is a mixture of F90, F77, Fortran include files, C and C++ source code files. Plus a lot of preprocessor statements (mainly in Fortran files).
I am using Doxygen 1.8.6, and playing with the Doxygen.in configuration file and the doxygen debug statements.
Fortran is the main language.
As you can see, there is a lot of errors. Any clue how to track, understand them and then adapt the Fortran source files accordingly?
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/utils/mx2fit.F90 line: 621, state: 21
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/utils/polfit.F90 line: 168, state: 21
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/utils/twofit.F90 line: 310, state: 21
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/amfi/amfi3.F line: 2824, state: 4
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/cc_external/hsfscc/chp_11a.F90 line: 1993, state: 21
********************************************************************
parse error in end <scopename>********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/dirac/dirbss.F line: 7884, state: 6
********************************************************************
/home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/include/dcbgascip.h:37: warning: Found ';' while parsing initializer list! (doxygen could be confused by a mac
ro call without semicolon)
/home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/include/dcbham.h:50: warning: Found ';' while parsing initializer list! (doxygen could be confused by a macro
call without semicolon)
parse error in end <scopename>********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/krmc/krmcgascip.F line: 4684, state: 6
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/reladc/adccore.F line: 7170, state: 19
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/reladc/adcdble.F line: 2871, state: 10
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/reladc/adcdiag.F line: 4813, state: 10
********************************************************************
********************************************************************
Error in file /home/ilias/Dokumenty/Work/QCH/software/dirac_git/working_trunk/src/reladc/adcexci.F line: 1995, state: 10
********************************************************************
make[3]: *** [CMakeFiles/doxygen] Segmentation fault (core dumped)
make[3]: Target `CMakeFiles/doxygen.dir/build' not remade because of errors.
make[2]: *** [CMakeFiles/doxygen.dir/all] Error 2
make[1]: *** [CMakeFiles/doxygen.dir/rule] Error 2
make[1]: Target `doxygen' not remade because of errors.
make: *** [doxygen] Error 2

First I assume that the code compiles correctly.
It is also advised to upgrade to the newest version of doxygen (currently 1.8.8) as a number of problems might be solved.
Best way to track down is (unfortunately in case of the state errors the reported line number is, most of the time, of no use):
- study the doxygen code
- for each file run doxygen on it separately and try to solve the problem by e.g. reducing the file till the error disappears and conclude from this what was wrong.
- build doxygen yourself and run with flex in debug mode / add print statements
For each of the *.F90 lines you should see in the output line similar to:
Preprocessing .../a.F90...
Parsing file .../a.F90...
for each *.f90 file:
Reading .../a.f90...
Parsing file .../a.f90...
for each *.F file:
Preprocessing .../a.F...
Prepassing fixed form of .../a.F
Parsing file ...a.F...
for each *.f file:
Reading .../a.f...
Prepassing fixed form of .../a.f
Parsing file .../a.f...
When this is not the case the file is not properly recognized as free formatted Fortran / fixed formatted code and doxygen might get confused.
This can be accomplished by defining in the Doxyfile:
EXTENSION_MAPPING = f=FortranFixed f90=FortranFree
(this is possible since version 1.8.7 of doxygen)
when this is not possible set in the first column of the first line of a *.f / .F file a 'C'. 'c' or ''.
On the site of www.diracprogram.org I could not find the source code, is it possible to share (part?).
Now something about the different states, they come from fortranscanner.l (for a solution I have to make a guess):
state: 4
SubprogBody: probably due to not properly closed / recognized subroutine body in fixed formatted code (as it is a .F file, so add 'C' ...)
state: 6
Start: probably due to not properly closed / recognized start condition in fixed formatted code (as it is a .F file, so add 'C' ...)
state: 10
ModuleBody: probably due to not properly closed / recognized module body in fixed formatted code (as it is a .F file, so add 'C' ...)
state: 19
InterfaceBody: probably due to not properly closed / recognized interface in fixed formatted code (as it is a .F file, so add 'C' ...)
state: 21
String: string not properly closed string or string quotes somewhere in comment

Related

The unique trouble with ninja during building chromium. (ninja: error: toolchain.ninja: lexing error)

I compile chromium from source code. I use a command gn args out/mybuild. The list of arguments:
proprietary_codecs=true
ffmpeg_branding="Chrome"
is_debug = false
dcheck_always_on = false
is_official_build = true
enable_nacl=false
blink_symbol_level=0
v8_symbol_level=0
chrome_pgo_phase = 0
The result is
Generating files...
Done. Made 18307 targets from 3100 files in 4850ms
Next step is autoninja -C out/mybuild chrome. Output is
ninja: Entering directory `out/mybuild'
ninja: error: toolchain.ninja:309: lexing error
I open the toolchain.ninja file with the error:
307 rule __base_build_date___build_toolchain_linux_clang_x64__rule
308 command = python3 ../../build/write_build_date_header.py gen/base/generated_build_date.h 1666540117\
309 \^[\[\?1034h
310 description = ACTION //base:build_date(//build/toolchain/linux:clang_x64)
308 and 309 lines are split. There are a lot of strings to be split like previous two. What type of formatting should I use? Or is there other reason?
The content of line 309 most likely shouldn't be there. It loks like some of the commands "gn gen" runs end up with trailing garbage. One reason for that could be if your python executable is a wrapper script that decorates output. I'd suggest trying
gn gen out/mybuild --script-executable=/usr/bin/python3.8
(or a different plain Python3 binary)
If it's not helping, I'd recommend adding something like
print(build_timestamp)
at the bottom of build/timestamp.gni, re-run gn, and see what it prints out, to try and figure out where the extra content comes from.

cc1plus.exe: fatal error: world.cpp: No such file or directory compilation terminated

i have problem with the code
everytime the code is done, running the code is still normal. when exiting visual code studio and re-entering, the code does not run end show the error as below
cc1plus.exe: fatal error: world.cpp: No such file or directory
compilation terminated.
I also got the same error, and to fix the error is easy. It may because your file name contains spaces. More information about this and how I know this is here:https://www.youtube.com/watch?v=Z5QxAjaiQp8. (Altough he got the different error raised but the way to fix it is still the same).
I resolved the error by removing the spaces between the name of the file I was saving. Earlier I was naming my c++ file as example- "test file.cpp", but when I removed the blank space i.e. "testfile.cpp" or "test_file.cpp", the error resolved.
If you are compiling the code using your terminal, you could check if the file you want to run is in that folder using dir for Windows or ls for Linux. If it is not, change to the folder where the file is and try running the file again.

Trouble with Magma -- "Internal error in ff_degree()"

I have a question for the Magma users out there.
Occasionally I will write a program that will run for a little while before it is terminated with the following message:
Internal error in ff_degree() at ff/access.c, line 1021
What does this mean?
Why does this problem only present occasionally?

Keil uVision5 .axf file is not created

I have used Keil uVision5 to create a hex file for the target STM32F103VE and I was not able to generate the hex. Here is the error log.(I have already thoroughly searched for the answer):
linking...
FromELF: creating hex file...
.\CompileOutput\Main.hex: Error: Q0122E: Could not open file '.\CompileOutput\Main.axf': No such file or directory
Finished: 0 information, 0 warning and 1 error messages.
After Build - User command #1: C:\Keil_v5\ARM\ARMCC\bin\fromelf.exe --bin -o .\Output\Main.bin .\CompileOutput\Main.axf
".\CompileOutput\Main.axf": Error: Q0122E: Could not open file '.\CompileOutput\Main.axf': No such file or directory
Finished: 0 information, 0 warning and 1 error messages.
".\CompileOutput\Main.axf" - 0 Error(s), 0 Warning(s).
Can anyone please help me get rid of this error?
We had a project with a similar error, and it turned out that we needed to disable cross-module optimization in the build options window.
I have similar issue. In my case full path to project contain '!' char.
Try with simple path like 'c:\myProj'

Xcode shell script invocation error

I just moved over to a new MacBook Air (10.8) and a 64-bit project that compiled before gives me Shell Script Invocation Error: /bin/sh failed with exit code 2
It looks like XCode 4.6 is failing on one of the intermediate files, saying unexpected EOF while looking for matching '"' in a file ending in .sh:
/Users/billferster/Library/Developer/Xcode/DerivedData/MovingPicture-hcmztqjnatzylkburxulgmdynyqg/Build/Intermediates/MovingPicture.build/Debug/MovingPicture.build/Script-E004D330137B9E5B00FDC604.sh: line 6: unexpected EOF while looking for matching `"'
/Users/billferster/Library/Developer/Xcode/DerivedData/MovingPicture-hcmztqjnatzylkburxulgmdynyqg/Build/Intermediates/MovingPicture.build/Debug/MovingPicture.build/Script-E004D330137B9E5B00FDC604.sh: line 7: syntax error: unexpected end of file
Command /bin/sh failed with exit code 2
Any ideas how to fix this?
Thank
Bill
it was was it said it was. A missing "