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

Bug 796733 - warning: multiple use of section label 'xxx' while adding section #6605

Closed
Kochise opened this issue Nov 6, 2018 · 13 comments
Closed
Labels
needinfo reported bug is incomplete, please add additional info Usage The mentioned problem is not a doxygen problem but due to usage of a feature.

Comments

@Kochise
Copy link

Kochise commented Nov 6, 2018

Get this error because I add this to each file header :

///
/// \file	xxx.yyy
...
/// \section	LICENSE
///
/// Start of the Copyright Notice \n
/// zzz
/// End of the Copyright Notice \n
/// \n
///

No problem with 1.8.6

@albert-github
Copy link
Collaborator

I did a small test but didn't get a warning message.
What is the meaning of the ... part in the example?
Can you explain / show the exact error message that you get from doxygen.

Can you complete this to a more complete example and add attach a, small, self contained example (source+config file in a tar or zip) that allows us to reproduce the problem?

@albert-github albert-github added the needinfo reported bug is incomplete, please add additional info label Nov 6, 2018
@Kochise
Copy link
Author

Kochise commented Nov 7, 2018

The '...' part is additional doxygen informations. The problem doesn't show up until you deal with several files with the same file header featuring the same 'section' part.

@albert-github
Copy link
Collaborator

When I understand it well you need to have the license text in multiple files.

Doxygen needs the section labels to be unique so that is why you will get the warning message.
The question for me is as well why use a section? as this would mean that in table of contents this would appear as well. When it is necessary to use a section I would think about an ALIAS with an argument so that when including the license text one can make it unique.

The solution I would use is:

  • create a file in a separate directory (and add this directory to the EXAMPLE_PATH) with a contents like:
    <h1> LICENSE</h1>

    Start of the Copyright Notice <br>
    zzz<br>
    End of the Copyright Notice <br>
    <br>
  • use \includedoc to include it in the relevant files

another solution would be similar but with snippets and \snippetdoc.

Note: I cannot get all the problems here as I'm missing a, small, self contained example (source+config file) that shows the problem?

@Kochise
Copy link
Author

Kochise commented Nov 7, 2018

Will try to provide it, but as I said, it works in 1.8.6, so why is there regression on this ?

@albert-github
Copy link
Collaborator

Would be good to have the example so we can see what the deeper cause is (in his case)
Sometimes some side effects, unexpected, happen when there are changes (and between 1.8.6 and now there have been quite a few changes / improvements).
Another possibility might be that in 1.8.6 the problem was present as well but, incorrectly, no message was given.

@Kochise
Copy link
Author

Kochise commented Nov 7, 2018

Sounds fair, will try to provide a global example of my issues in a separate ZIP file a bit later.

@albert-github
Copy link
Collaborator

@Kochise Any possibility of getting the example or has the problem been resolved?

@albert-github albert-github added the invalid bug report is not complete, or not reproducible or not a doxygen issue label Feb 22, 2023
@albert-github
Copy link
Collaborator

Unfortunately no further response, (might be fixed in the mean time by e.g. #6779 or user found its problem and has fixed it) setting to incomplete problem report.

@Kochise
Copy link
Author

Kochise commented Feb 23, 2023

Forgot about this one, will try to check if recent version solves the issue.

Thank for the reminder.

@Kochise
Copy link
Author

Kochise commented Mar 13, 2023

tl;dr

Tested : warning still present in 1.9.6

C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c:3: warning: multiple use of section label 'LICENSE' while adding section, (first occurrence: C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c, line 3)

test_1.c.txt
test_2.c.txt

Complete test procedure

  1. From https://github.com/doxygen/doxygen/releases/tag/Release_1_9_6
  2. Download doxygen-1.9.6.windows.x64.bin.zip
  3. Extract it inside doxygen-1.9.6.windows.x64.bin folder
  4. Add the two test_x.c files inside, alongside with doxygen.exe
  5. Create doxygen subfolder, go inside it
  6. From https://github.com/Kochise/batch-doxygen_generate
  7. Download files into the doxygen subfolder you created above
  8. Execute doxygen_template_generate.bat
  9. Edit generated doxygen-1.9.6.windows.x64.bin.doxygen if needed
  10. Execute doxygen_documentation_generate.bat
  11. Doxygen should be run, the .html file opened at the end
  12. Console output is as follow :
Console output

C:\Users\Kochise\Downloads\doxygen-1.9.6.windows.x64.bin\doxygen>doxygen_documentation_generate.bat
vpath=doxygen-1.9.6.windows.x64.bin
Fichier introuvable
Doxygen version used: 1.9.6
Searching for include files...
Searching for example files...
Searching for images...
Searching for dot files...
Searching for msc files...
Searching for dia files...
Searching for files to exclude
Searching INPUT for files to process...
Searching for files in directory C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin
Searching for files in directory C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen
Reading and parsing tag files
Parsing files
Reading C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/README.md...
Preprocessing C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c...
Parsing file C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c...
Preprocessing C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c...
Parsing file C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c...
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c:3: warning: multiple use of section label 'LICENSE' while adding section, (first occurrence: C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c, line 3)
Building macro definition list...
Building group list...
Building directory list...
Building namespace list...
Building file list...
Building class list...
Building concept list...
Computing nesting relations for classes...
Associating documentation with classes...
Associating documentation with concepts...
Building example list...
Searching for enumerations...
Searching for documented typedefs...
Searching for members imported via using declarations...
Searching for included using directives...
Searching for documented variables...
Building interface member list...
Building member list...
Searching for friends...
Searching for documented defines...
Computing class inheritance relations...
Computing class usage relations...
Flushing cached template relations that have become invalid...
Computing class relations...
Add enum values to enums...
Searching for member function documentation...
Creating members for template instances...
Building page list...
Search for main page...
Computing page relations...
Determining the scope of groups...
Sorting lists...
Determining which enums are documented
Computing member relations...
Building full member lists recursively...
Adding members to member groups.
Computing member references...
Inheriting documentation...
Generating disk names...
Adding source references...
Adding xrefitems...
Sorting member lists...
Setting anonymous enum type...
Computing dependencies between directories...
Generating citations page...
Counting members...
Counting data structures...
Resolving user defined references...
Finding anchors and sections in the documentation...
Transferring function references...
Combining using relations...
Adding members to index pages...
Correcting members for VHDL...
Computing tooltip texts...
Generating style sheet...
Generating search indices...
Generating example documentation...
Generating file sources...
Parsing code for file doxygen/README.md...
Parsing code for file test_1.c...
Parsing code for file test_2.c...
Generating file documentation...
Generating docs for file doxygen/README.md...
Generating docs for file test_1.c...
Generating docs for file test_2.c...
Generating page documentation...
Generating docs for page md_doxygen_README...
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/README.md:9: warning: Found unknown command '\Program'
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/README.md:9: warning: Found unknown command '\Graphvizyourinstalledversionbecausehavingitinthefoldernameisobviouslyveryimportant'
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/README.md:9: warning: Found unknown command '\bin'
Generating group documentation...
Generating class documentation...
Generating concept documentation...
Generating namespace index...
Generating graph info page...
Generating directory documentation...
Generating index page...
Generating page index...
Generating module index...
Generating namespace index...
Generating namespace member index...
Generating concept index...
Generating annotated compound index...
Generating alphabetical compound index...
Generating hierarchical class index...
Generating graphical class hierarchy...
Generating member index...
Generating file index...
Generating file member index...
Generating example index...
finalizing index lists...
writing tag file...
Running plantuml with JAVA...
Running dot...
Running dot for graph 1/1
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/html/graph_legend.dot:1: error: Problems running dot: exit code=-1, command='dot.exe', arguments='"C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/html/graph_legend.dot" -Tpng -o "C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/doxygen/html/graph_legend.png"'

type lookup cache used 0/65536 hits=0 misses=0
symbol lookup cache used 0/65536 hits=0 misses=0
finished...

C:\Users\Kochise\Downloads\doxygen-1.9.6.windows.x64.bin\doxygen>

Yet expected output is output as expected :

doxygen-1 9 6 windows x64 bin

@albert-github
Copy link
Collaborator

  1. Please don't add references to external sources as they might not be persistent.
  2. you request to run a certain bat file, but this runs only on Windows so other people with Linux cannot verify it. Please add the result of the procedure to the issue.

So all in all a self contained example (source+configuration file in a, compressed, tar or zip file) is needed that allows us to reproduce the problem? Please don't add external links as they might not be persistent.

I looked at the log file and the relevant output is:

Preprocessing C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c...
Parsing file C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c...
Preprocessing C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c...
Parsing file C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c...
C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_2.c:3: warning: multiple use of section label 'LICENSE' while adding section, (first occurrence: C:/Users/Kochise/Downloads/doxygen-1.9.6.windows.x64.bin/test_1.c, line 3)

In both the test_1.c and test_2.c I see:

/// \section    LICENSE

in doxygen labels / anchors should be unique over the complete source, but here we have twice the label / anchor LICENSE and this is not allowed in doxygen.

(Note: the "problem" is already reproducible with just the 2 files and an empty Doxyfile).

@albert-github
Copy link
Collaborator

A possible solution for you might be to replace:

/// \section    LICENSE

with

/// # LICENSE

@albert-github albert-github added Usage The mentioned problem is not a doxygen problem but due to usage of a feature. and removed invalid bug report is not complete, or not reproducible or not a doxygen issue labels Mar 13, 2023
@Kochise
Copy link
Author

Kochise commented Mar 13, 2023

Ok, thank for the feedback, I'll see what's file-wise and what's project-wide.

Regards.

@doxygen doxygen closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo reported bug is incomplete, please add additional info Usage The mentioned problem is not a doxygen problem but due to usage of a feature.
Projects
None yet
Development

No branches or pull requests

3 participants