[SERVER-11282] C++ client driver install target does not install new util/options_parser headers Created: 20/Oct/13  Updated: 11/Jul/16  Resolved: 30/Oct/13

Status: Closed
Project: Core Server
Component/s: Internal Client
Affects Version/s: None
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

Run "install-mongoclient", and then attempt to build a trivial program that does #include "mongo/client/dbclient.h" from the install directory. It will fail.

Participants:

 Description   

The file dbclient.h recently started to depend on files from the new utils/options_parser directory, but that directory is not among the directories searched by the install target for headers. As a result, dbclient.h from an "install-mongoclient" is not useable.

A workaround is to manually copy the header files from this directory:

https://github.com/mongodb/mongo/tree/r2.5.3/src/mongo/util/options_parser

into a new directory at <prefix>/include/mongo/util/options_parser, where <prefix> is the argument to the --prefix argument used when building the install-mongoclient target.



 Comments   
Comment by Andrew Morrow (Inactive) [ 30/Oct/13 ]

The actual issue here has been fixed, along with a target to run the test 'check-install-mongoclient'. We still have some issues on the MCI side of integrating this into the CI system, but I'd rather track that as an MCI ticket.

Comment by auto [ 24/Oct/13 ]

Author:

{u'username': u'ehershey', u'name': u'Ernie Hershey', u'email': u'ernie.hershey@10gen.com'}

Message: SERVER-11282 change check-mongoclient-install to check-install-mongoclient
Branch: master
https://github.com/10gen/mci/commit/d3dbba2b536d4e3bea045e20de9e9ab89510906f

Comment by auto [ 24/Oct/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11282 Always run the check-mongoclient-install target to validate client header installs

This is the MCI side of the server code fix for SERVER-11282. It adds a new target to the list
of build targets in the MCI compile phase, because this test is a compile time test. We also
need to set a prefix directory, since the compile time test tests compiling against the
artifacts installed to the prefix directory by the install-mongoclient target, which is
depended on by check-install-mongoclient.

We choose a prefix directory that contains the name of the scons variant directory so that the
installation artifacts are kept in the build directory, rather than going somewhere
unknown. This is important, since for the test to be meaningfull, the directory must be empty
at start. MCI always starts with a fresh source directory, so the way we are setting things up
is fairly safe, whereas if we installed to /tmp/something/or/other we would risk seeing stale
files.

The install directory is prefixed with a '.' to prevent the duplicate ID checker from seeing
the headers installed in the prefix directory as having duplicate ids with the normal headers
in the source tree. We are exploiting the fact that the duplicate id checker doesn't descend
into directories that start with '.'. Down the road, we should fix the duplicate ID checker,
but for now this will get this important test running automatically, which is cruicial now that
we no longer have the tests of the client driver 'tarball' to catch missing headers.

Signed-off-by: Ernie Hershey <ernie.hershey@10gen.com>
Branch: master
https://github.com/10gen/mci/commit/e51dad959ec4c81bc4d21ff015f302db7554931c

Comment by auto [ 24/Oct/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11282 Always run the check-mongoclient-install target to validate client header installs

This is the MCI side of the server code fix for SERVER-11282. It adds a new target to the list
of build targets in the MCI compile phase, because this test is a compile time test. We also
need to set a prefix directory, since the compile time test tests compiling against the
artifacts installed to the prefix directory by the install-mongoclient target, which is
depended on by check-install-mongoclient.

We choose a prefix directory that contains the name of the scons variant directory so that the
installation artifacts are kept in the build directory, rather than going somewhere
unknown. This is important, since for the test to be meaningfull, the directory must be empty
at start. MCI always starts with a fresh source directory, so the way we are setting things up
is fairly safe, whereas if we installed to /tmp/something/or/other we would risk seeing stale
files.

The install directory is prefixed with a '.' to prevent the duplicate ID checker from seeing
the headers installed in the prefix directory as having duplicate ids with the normal headers
in the source tree. We are exploiting the fact that the duplicate id checker doesn't descend
into directories that start with '.'. Down the road, we should fix the duplicate ID checker,
but for now this will get this important test running automatically, which is cruicial now that
we no longer have the tests of the client driver 'tarball' to catch missing headers.

Signed-off-by: Ernie Hershey <ernie.hershey@10gen.com>
Branch: master
https://github.com/10gen/mci/commit/e51dad959ec4c81bc4d21ff015f302db7554931c

Comment by auto [ 23/Oct/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11282 Add copyright notices to client include tests to placate lint
Branch: master
https://github.com/mongodb/mongo/commit/e7089550acfde9507dcae677e03000e8b2dad3b4

Comment by auto [ 23/Oct/13 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}

Message: SERVER-11282 Add a target that verifies that dbclient.h and bson.h are usable as installed
Branch: master
https://github.com/mongodb/mongo/commit/007665da8b3c2c622ab5fe112f64b7d475bb3220

Comment by Andy Schwerin [ 21/Oct/13 ]

We should probably take both proposed actions.

Generated at Thu Feb 08 03:25:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.