Bug 1228 - libsigrok compiler error on Debian unstable
Summary: libsigrok compiler error on Debian unstable
Status: RESOLVED DUPLICATE of bug 547
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Bindings: C++ (show other bugs)
Version: unreleased development snapshot
Hardware: All Linux
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-08 14:11 CEST by Harald Welte
Modified: 2019-05-01 18:22 CEST (History)
3 users (show)



Attachments
full error log of "make" (913.00 KB, text/plain)
2018-06-08 14:11 CEST, Harald Welte
Details
config.log preceding the failing make (75.56 KB, text/plain)
2018-06-08 14:11 CEST, Harald Welte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Welte 2018-06-08 14:11:12 CEST
Created attachment 434 [details]
full error log of "make"

When trying to build libsigrok on a current Debian unstable (gcc/g++ 7.3.0-21) on amd64, it fails with the following errors:

make  all-am
  CXX      bindings/cxx/classes.lo
In file included from bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp:1079:0,
                 from bindings/cxx/classes.cpp:27:
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 do not have any older/other libsigrok or header files installed on the system.

config.log and full error output attached.
Comment 1 Harald Welte 2018-06-08 14:11:42 CEST
Created attachment 435 [details]
config.log preceding the failing make
Comment 2 Harald Welte 2018-06-08 14:13:20 CEST
git describe output is "libsigrok-0.2.1-3057-gbf2a6eea"
Comment 3 Gerhard Sittig 2018-06-08 14:26:55 CEST
The problem is not necessarily in the source, but could be in the local setup.
In the past, symlinks between source and build directories, or nested build 
and source directories have resulted in this duplicate occurance of NONE in 
generated code.  Can you see whether this applies to your setup?  Use a build 
directory that resided _next_to_ the source, not underneath it.

If this helps for your case, it's not the solution, but a workaround is 
easily available.
Comment 4 Soeren Apel 2018-06-08 21:06:24 CEST
This is the same as #937, where the root cause was doxygen doing the wrong thing and duplicating the symbol names in its XML output.

Maybe the comment by Virgile Andreani is worth a try? It would also be interesting to see which Doxygen version you use, Harald. Maybe there's a certain version range that's buggy.
Comment 5 Uwe Hermann 2019-05-01 18:22:27 CEST
This is a duplicate of #547, which should be fixed now via 3535a6eeee267ebb0092a0f6600b0b3edc055bf8, but please re-test to confirm.

*** This bug has been marked as a duplicate of bug 547 ***