Opened 4 years ago

Closed 4 years ago

#4283 closed defect (fixed)

Update installation documentation (Dan's comments)

Reported by: tomek Owned by: fdupont
Priority: medium Milestone: Kea1.1
Component: documentation Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 10 Add Hours to Ticket: 3
Total Hours: 12 Internal?: no

Description (last modified by fdupont)

As Dan pointed out, there are a couple things that could be improved in the documentation:

  • INSTALL file does not mention that there are external dependencies, the file simply points out to kea-guide.
  • Dan encountered a problem with compilation:
    Somewhat, I've now hit a build failure:
    
    Making all in .
      CXX      libkea_asiolink_la-interval_timer.lo
    In file included from interval_timer.cc:15:
    In file included from /usr/local/include/boost/asio.hpp:21:
    In file included from 
    /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
    In file included from /usr/local/include/boost/asio/basic_socket.hpp:20:
    In file included from 
    /usr/local/include/boost/asio/basic_io_object.hpp:19:
    In file included from /usr/local/include/boost/asio/io_service.hpp:767:
    In file included from 
    /usr/local/include/boost/asio/impl/io_service.hpp:71:
    In file included from 
    /usr/local/include/boost/asio/detail/task_io_service.hpp:203:
    /usr/local/include/boost/asio/detail/impl/task_io_service.ipp:261:42: 
    error:
          unused parameter 'is_continuation' [-Werror,-Wunused-parameter]
        task_io_service::operation* op, bool is_continuation)
                                             ^
    1 error generated.
    *** Error code 1
    
    
    Current packages:
    
    root@sql1-kea:/usr/home/isc/kea-1.0.0 # pkg info | cut -d " " -f 1
    boost-all-1.55.0
    boost-docs-1.55.0
    boost-jam-1.55.0
    boost-libs-1.55.0_9
    boost-python-libs-1.55.0
    botan110-1.10.9
    gettext-runtime-0.19.6
    gmp-5.1.3_2
    icu-55.1
    indexinfo-0.2.4
    libffi-3.2.1
    log4cplus-1.1.2_2
    nano-2.4.3
    pkg-1.6.2
    python27-2.7.11_1
    

This is a combination of a new compiler and too old boost. Thomas suggested this: Newer compilers catch that error, which has been fixed in newer versions of boost. You should be able to circumvent the error by adding
"--without-werror" to the configure arguments. Alternatively you can
upgrade Boost. I know the issue is fixed in 1.60, it may have been
corrected in an earlier version.

This should be mentioned in either the User's Guide or in System specific notes for FreeBSD (which we sadly have grossly outdated).

Subtickets

Change History (18)

comment:1 Changed 4 years ago by fdupont

  • Description modified (diff)

comment:2 Changed 4 years ago by jreed

For a similar issue in bind10, we had configure check for the problem and maybe workaround it. Note we had ticket about this already #4225

comment:3 Changed 4 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea1.1

Per Jan 27 team meeting, accept 1.1. Estimated to be provided.

comment:4 Changed 4 years ago by fdupont

#4225 shows the problem needed and still needs a solution... I have a long experience of FreeBSD and NetBSD so I'll try to understand what to do.

comment:5 Changed 4 years ago by fdupont

  • Estimated Difficulty changed from 0 to 4
  • Owner set to fdupont
  • Status changed from new to accepted

comment:6 Changed 4 years ago by fdupont

  • Estimated Difficulty changed from 4 to 6

I created new system notes for FreeBSD cloned from Apple OS X one. If you want (say YES here) I can do the same for NetBSD.
I tried and checked when it had a chance to work:

  • MySQL (works fine)
  • PostgreSQL (a bit hard as the default on FreeBSD is to trust everybody. I'll update the doc about pg_hba.conf & co in the to-come branch).
  • Cassandra: there is no package or port with the CQL library so skipped
  • valgrind: the package has a dependency on gcc so skipped
  • lcov: FreeBSD uses clang and coverage does't work with clang (cf the ticket #4522)
  • documentation generation (works fine)
  • parser generation (old bison from package, BTW it works fine on docs which is a FreeBSD but I installed manually a recent bison on it)

The next step is to hack configure to handle old boost's which requires a --without-werrror.

A final point (new ticket?): MySQL and PostgreSQL use -with-dhcp-xxsql=yy_config configure options, Cassandra uses a simpler --with-cql=cql_config. IMHO they should be aligned (to the simplest? the dhcp seems to be from bind10) keeping backward compatibility.

comment:7 Changed 4 years ago by fdupont

  • Owner changed from fdupont to UnAssigned
  • Status changed from accepted to reviewing

Finally I hacked the Makefile's of asio{link,dns} to avoid the old boost issue. So I propose the branch to review.
2 still open questions:

  • system notes for NetBSD (and/or OpenBSD)?
  • -with-dhcp

comment:8 Changed 4 years ago by tomek

  • Owner changed from UnAssigned to tomek

comment:9 follow-ups: Changed 4 years ago by tomek

  • Add Hours to Ticket changed from 0 to 3
  • Owner changed from tomek to fdupont
  • Total Hours changed from 0 to 3

Your proposed solution helped a bit, but the code still failed to compile for me. I had to update several other Makefiles to compile Kea code on my FreeBSD 10.0. I pushed my changes. Please review.

Also, I have updated INSTALL file to explicitly mention dependencies. Updated link to wiki
(it should point to kea.isc.org/wiki/Install). Please pull and review my changes. If you're
ok with them, go ahead and merge.

Thanks for writing your FreeBSD installation notes. I have updated them slightly to point out that it's also possible to install kea on FreeBSD using ports.

If you want to do similar installation notes for NetBSD, go ahead!

comment:10 in reply to: ↑ 9 Changed 4 years ago by fdupont

  • Status changed from reviewing to accepted

Replying to tomek:

Your proposed solution helped a bit, but the code still failed to compile for me. I had to update several other Makefiles to compile Kea code on my FreeBSD 10.0. I pushed my changes. Please review.

=> if enough Makefiles have to be patched IMHO it will be simpler to use a global flag from configure.

Also, I have updated INSTALL file to explicitly mention dependencies. Updated link to wiki
(it should point to kea.isc.org/wiki/Install). Please pull and review my changes. If you're
ok with them, go ahead and merge.

=> I'll see for Makefile's vs configure.

Thanks for writing your FreeBSD installation notes. I have updated them slightly to point out that it's also possible to install kea on FreeBSD using ports.

=> I believe there is this kind of statement in another system notes. If/when it will be found it should be added at the beginning.

If you want to do similar installation notes for NetBSD, go ahead!

=> I put it in my TODO list.

comment:11 in reply to: ↑ 9 Changed 4 years ago by fdupont

Replying to tomek:

Your proposed solution helped a bit, but the code still failed to compile for me. I had to update several other Makefiles to compile Kea code on my FreeBSD 10.0. I pushed my changes. Please review.

=> I looked at the Makefile list and I am convinced it is better to fix it directly in configure.

Also, I have updated INSTALL file to explicitly mention dependencies.

=> BTW I disagree about boost libraries: it should be boost includes with a comment about libraries, for instance:
boost (at least includes). BTW only the system library can be required.

Updated link to wiki
(it should point to kea.isc.org/wiki/Install). Please pull and review my changes. If you're
ok with them, go ahead and merge.

Thanks for writing your FreeBSD installation notes. I have updated them slightly to point out that it's also possible to install kea on FreeBSD using ports.

=> your change is fine.

If you want to do similar installation notes for NetBSD, go ahead!

=> I'll do the last NetBSD and OpenBSD (the second for LibreSSL). I have to upgrade my VMs first.

comment:12 Changed 4 years ago by fdupont

  • Owner changed from fdupont to tomek
  • Status changed from accepted to reviewing

Put at least includes for boost is INSTALL.
Removed all the if USE_CLANGPP from Makefiles.
Removed all WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG from Makefiles.
Added CLANG -Wno-unused-variable -Wno-unused-parameter in configure
Added -Wno-missing-field-initializers in configure
Added optional -* flags to --with-werror: they are checked for validity and added to KEA_CXXFLAGS after -Werrror
Fixed the KEA_CXX_TRY_FLAG configure function:

  • added -Werror so it fails when a flag is not supported (vs. only check syntax)
  • changed no arg main to its C++ (vs C) correct definition {{{int main() { ... } ))).

Fixed bugs revealed by the removal of the bogus run_unittests_CXXFLAGS = -Wno-unused-parameter (vs +=) in src/bin/perfdhcp/tests/Makefile.am

In conclusion: I moved USE_CLANGPP dependencies to configure. This made clang platforms less attractive but I provide an easy way to re-enable warnings, e.g.:

./configure --with-gtest -with-werror="-Wmissing-field-initializers -Wunused-variable -Wunused-parameter"

Perhaps we need a --enable-developer as we have for bind9? Anyway !FreeBSD builds well now and no --without-werror is required.

Ready for review.

comment:13 Changed 4 years ago by fdupont

  • Estimated Difficulty changed from 6 to 10
  • Total Hours changed from 3 to 9

Added system notes for OpenBSD (no particular issue) and NetBSD (last versions >= 7 have a fatal bug in configure/libtool).
No impact to the #4283 ticket or trac4283 branch...

comment:14 Changed 4 years ago by tomek

  • Owner changed from tomek to fdupont
  • Total Hours changed from 9 to 12

I verified that the code now builds out of the box on my FreeBSD 10. The core issue here is solved.

Thanks for doing the clean up work in all makefiles.

I agree it would be useful to have --enable-developer. I think it should be enabled by default in git and disabled in release versions, but we don't need to do it in one step. Having --enable-developer for now would be good step toward that goal.

I verified that the code builds fine on FreeBSD10 (which uses clang) and Ubuntu 15.10 (which uses gcc).

I did reword the INSTALL text slightly. Please pull and review.

If you want to implement --enable-developer in this ticket, let's continue with the review. If don't want to do it, or prefer to do it in separate ticket, go ahead and merge.

comment:15 Changed 4 years ago by fdupont

Create #4534 about --enable-developer. BTW before merging we need to agree about a ChangeLog entry.

comment:16 Changed 4 years ago by fdupont

  • Owner changed from fdupont to tomek

comment:17 Changed 4 years ago by tomek

  • Owner changed from tomek to fdupont

The ticket you created is fine. How about this one for Changelog:

11XX.	[build]		fdupont
	Compilation problem on FreeBSD caused by unused parameter in certain 
        version of boost headers is now resolved. Also, INSTALL file has been
        updated and now lists dependencies.
	(Trac #4283, git tbd)

If you're ok with it, please merge.

comment:18 Changed 4 years ago by fdupont

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

Merged. Closing. (and commenting similar pending tickets)

Note: See TracTickets for help on using tickets.