[SERVER-4594] syntax error in bsonobjbuilder.h Created: 02/Jan/12 Updated: 03/Jan/12 Resolved: 03/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.0.0, 2.0.1, 2.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benedikt Böhm | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Linux 3.1.6 on x86_64, gcc version 4.5.3 (Gentoo 4.5.3-r1 p1.0, pie-0.4.5), manual compilation with no system libraries |
||
| Attachments: |
|
| Operating System: | Linux |
| Participants: |
| Description |
|
The following error is triggered when compiling the MongoDB backend for PowerDNS:
i've bisected the code between 1.9.0 and 2.0.0 and found the following bad commit:
unfortunately my C++ skills are very weak and i've no idea what's going on |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 03/Jan/12 ] | |||||||||
|
Maks sense | |||||||||
| Comment by Benedikt Böhm [ 03/Jan/12 ] | |||||||||
|
after a good night of sleep that's what i thought as well, and switching the order of headers indeed fixes the issue. d'oh thanks for your help, you can close this issue. | |||||||||
| Comment by Eliot Horowitz (Inactive) [ 03/Jan/12 ] | |||||||||
|
Can you undefine L before including the mongo headers or include them first? | |||||||||
| Comment by Benedikt Böhm [ 02/Jan/12 ] | |||||||||
|
yes it is defined in http://wiki.powerdns.com/trac/browser/trunk/pdns/pdns/dns.hh#L268 and used all over the place for logging. was easier for me to change the template variable and left/right. i know it's not mongodbs fault, but it would be nice if you'd apply the patch | |||||||||
| Comment by Eliot Horowitz (Inactive) [ 02/Jan/12 ] | |||||||||
|
Is the L it defines a macro? | |||||||||
| Comment by Benedikt Böhm [ 02/Jan/12 ] | |||||||||
|
i've finally found the issue: powerdns defines a global L for the logging object. i've attached a patch that renames the use of L in the header files. | |||||||||
| Comment by Benedikt Böhm [ 02/Jan/12 ] | |||||||||
|
also the usage of L and R in bson-inl.h breaks:
replacing L with left and R with right fixes this issue, and triggers another one:
line 109 contains a simple auto_ptr<mongo::DBClientCursor> cursor; source can be found at http://wiki.powerdns.com/trac/browser/trunk/pdns/modules/mongodbbackend/mongodbbackend.hh |