Opened 7 years ago

Closed 7 years ago

#3001 closed defect (fixed)

BIND10-1.1.0 fails to build because of missing header inclusions

Reported by: thozza Owned by: muks
Priority: high Milestone: Sprint-20130709
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: High
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 1 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

I'm unable to compile latest bind10 version 1.1.0 using Fedora rawhide.
There seems to be missing inclusion of stdint.h header in files:

src/lib/util/random/qid_gen.h
src/lib/util/memory_segment_mapped.cc

After I added inclusion of stdint.h into gid_gen.h, the
problem in memory_segment_mapped.cc appeared. After fixing
the second file BIND10 compiles just fine.

Error in qid_gen.h

...
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../..  -I../../../src/lib -I../../../src/lib -I../../../src/lib/util -I../../../src/lib/util -I../../../src/lib/exceptions -I../../../src/lib/exceptions  -DLOCKFILE_DIR=\"/var/bind10\" -DOS_LINUX  -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -fPIC  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c -o qid_gen.lo `test -f 'random/qid_gen.cc' || echo './'`random/qid_gen.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -I../../../src/lib/util -I../../../src/lib/util -I../../../src/lib/exceptions -I../../../src/lib/exceptions -DLOCKFILE_DIR=\"/var/bind10\" -DOS_LINUX -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -c random/qid_gen.cc  -fPIC -DPIC -o .libs/qid_gen.o
In file included from random/qid_gen.cc:21:0:
../../../src/lib/util/random/qid_gen.h:58:5: error: 'uint16_t' does not name a type
     uint16_t generateQid();
     ^
random/qid_gen.cc:49:1: error: 'uint16_t' does not name a type
 uint16_t
 ^
make[5]: *** [qid_gen.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
...

Error in memory_segment_mapped.cc:

...
/bin/sh ../../../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../..  -I../../../src/lib -I../../../src/lib -I../../../src/lib/util -I../../../src/lib/util -I../../../src/lib/exceptions -I../../../src/lib/exceptions  -DLOCKFILE_DIR=\"/var/bind10\" -DOS_LINUX  -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -fPIC  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c -o qid_gen.lo `test -f 'random/qid_gen.cc' || echo './'`random/qid_gen.cc
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/lib -I../../../src/lib -I../../../src/lib/util -I../../../src/lib/util -I../../../src/lib/exceptions -I../../../src/lib/exceptions -DLOCKFILE_DIR=\"/var/bind10\" -DOS_LINUX -I../../../ext/asio -I../../../ext/coroutine -DASIO_DISABLE_THREADS=1 -Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -c random/qid_gen.cc  -fPIC -DPIC -o .libs/qid_gen.o
memory_segment_mapped.cc: In member function 'size_t isc::util::MemorySegmentMapped::getCheckSum() const':
memory_segment_mapped.cc:369:11: error: 'uint8_t' does not name a type
     const uint8_t* const cp_begin = static_cast<const uint8_t*>(
           ^
memory_segment_mapped.cc:371:11: error: 'uint8_t' does not name a type
     const uint8_t* const cp_end = cp_begin + impl_->base_sgmt_->get_size();
           ^
memory_segment_mapped.cc:374:16: error: 'uint8_t' does not name a type
     for (const uint8_t* cp = cp_begin; cp < cp_end; cp += pagesize) {
                ^
memory_segment_mapped.cc:374:40: error: expected ';' before 'cp'
     for (const uint8_t* cp = cp_begin; cp < cp_end; cp += pagesize) {
                                        ^
memory_segment_mapped.cc:374:40: error: 'cp' was not declared in this scope
memory_segment_mapped.cc:374:45: error: 'cp_end' was not declared in this scope
     for (const uint8_t* cp = cp_begin; cp < cp_end; cp += pagesize) {
                                             ^
make[5]: *** [memory_segment_mapped.lo] Error 1
...

For reference:
bind10-dev list post

Subtickets

Attachments (1)

0001-Add-missing-stdint.h-header-inclusion.patch (1.3 KB) - added by thozza 7 years ago.
PATCH adding the missing header inclusion.

Download all attachments as: .zip

Change History (10)

Changed 7 years ago by thozza

PATCH adding the missing header inclusion.

comment:1 Changed 7 years ago by muks

  • Milestone changed from New Tasks to Next-Sprint-Proposed

comment:2 Changed 7 years ago by muks

  • Estimated Difficulty changed from 0 to 1

comment:3 Changed 7 years ago by muks

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130709

comment:4 Changed 7 years ago by muks

  • Owner set to UnAssigned
  • Status changed from new to reviewing

This is actually a review ticket, so putting it to review queue.

comment:5 Changed 7 years ago by muks

  • Owner changed from UnAssigned to muks

Picking.

comment:6 Changed 7 years ago by muks

This is a straightforward patch that looks fine to me.

Will merge to master after make check passes on trac3001.

comment:7 Changed 7 years ago by muks

Note that we decided during sprint planning call that we will not verify this with a Fedora development release installation as the patch is trivial, and it's not reasonable for us to be able to test BIND 10 on every user platform. In this case, the reporter has determined that this patch makes it work and is necessary.

comment:8 Changed 7 years ago by muks

ChangeLog entry:

+XYZ.   [bug]           muks
+       Applied a patch by Tomas Hozza to fix a couple of compile errors
+       on Fedora 19 development release.
+       (Trac #3001, git ...)

comment:9 Changed 7 years ago by muks

  • Resolution set to fixed
  • Status changed from reviewing to closed

Pushed to master branch in commit 6e42b90971b377261c72d51c38bf4a8dc336664a:

* 382705e Add missing stdint.h header inclusion

Resolving as fixed. Thank you for the patch Tomas.

Note: See TracTickets for help on using tickets.