Hi,

I tried compiling libsigrok and it failed because of lot's of symbols being
defined twice, like this:

bindings/cxx/include/libsigrokcxx/enums.hpp:24:32: error: redeclaration of 
'const sigrok::LogLevel* const sigrok::LogLevel::NONE'
  static const LogLevel * const NONE;
                                ^~~~
bindings/cxx/include/libsigrokcxx/enums.hpp:12:32: note: previous declaration 
'const sigrok::LogLevel* const sigrok::LogLevel::NONE'
  static const LogLevel * const NONE;
                                ^~~~

I found out that these files are automatically generated from the data 
generated by Doxygen. And indeed, Doxygen detected all of these objects twice. 
The reason seems to be that Doxygen gets some of it's input files relative to 
the current dir while others relative to $(BUILDDIR). Doxygen doesn't see that 
some of these files are actually the same, so it parses them twice. Maybe   
the reason is that builddir is usually symlinked to another disk on my system.

I propose to make all input files relative to $(BUILDDIR), as in the attached 
patch. I tested it by building with a defined $(BUILDDIR) and without, both 
yielded working code and proper Doxygen output.

Please consider applying. 

This is my first contribution to sigrok. If you prefer to pull patches from a 
git branch somewhere instead of receiving them via the mailinglist like this 
please say so.

Thanks.

Kind regards,

Gerd
diff -u -r libsigrok-0.5.1.orig/Doxyfile libsigrok-0.5.1/Doxyfile
--- libsigrok-0.5.1.orig/Doxyfile	2018-10-14 22:43:32.000000000 +0200
+++ libsigrok-0.5.1/Doxyfile	2019-02-10 16:58:22.294043240 +0100
@@ -743,7 +743,7 @@
 # spaces.
 # Note: If this tag is empty the current directory is searched.
 
-INPUT                  = src include $(BUILDDIR)include/libsigrok
+INPUT                  = $(BUILDDIR)src $(BUILDDIR)include $(BUILDDIR)include/libsigrok
 
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to