Closed gbprz closed 5 years ago
I think you're supposed to re-run autoconf
and automake
and commit the generated files to fix the Travis issues...
It looks like Travis is configured to run:
sh build.sh && ./configure --with-python=/usr/bin/python && make distcheck DISTCHECK_CONFIGURE_FLAGS="--with-python=/usr/bin/python"
build.sh
takes care of running autoconf
and automake
and I checked the Travis logs to confirm this. Next, I updated the Travis config to make sure the flag --with-libmongoc=own
is passed during the configure/build steps (since this PR adds the conditional checks to include the libmongoc subdir). I made it further, but still ran into issues.
I have a Travis container running locally for testing. I'll try to get more info on what's causing this.
Travis is running make distcheck
which will recurse into all DIST_SUBDIRS
when running the distdir
target: https://github.com/Stackdriver/collectd/blob/b929f60ad6c1c2dca9b251ebdd88bce3293f6d86/src/Makefile.in#L5513
https://github.com/Stackdriver/collectd/blob/b929f60ad6c1c2dca9b251ebdd88bce3293f6d86/src/Makefile.in#L5528
Libmongoc was still included in the distributed subdirs, despite being conditionally removed from subdirs
. To address this, I made sure to explicitly set DIST_SUBDIRS
equal to SUBDIRS
[1]. Unless the mongodb plugin is enabled, libmongoc won't be included in either SUBDIRS
or DIST_SUBDIRS
.
I don't think it's an issue, but do we care about distributing directories if we're not going to configure and build them? If so, I can find another approach to fix this issue (maybe something like [2]). If we don't mind, then this works (at least until libmongoc is no longer vendored in).
Friendly ping.
I don't think there's anything that needs to be distributed outside of SUBDIRS
, so making DIST_SUBDIRS
the same SGTM.
While building for Ubuntu 18.04, I ran into issues with the bundled version of libmongoc and changes to the openssl API in version 1.1. This PR allows us to temporarily disable libmongoc for Bionic builds, but continue using it for other platforms.
There is a complementary agents-packaging PR (Stackdriver/agent-packaging#37) which conditionally disables the mongodb plugin when building on Bionic.
Note: the build script will need to be run so
autoconf
andautomake
regenerate theconfigure
script andMakefile
. I have a few open branches for required Bionic build changes and at least one of them also requires running the build script. To avoid merge conflicts, I left this commit out of this PR until everything is merged into the "gabeperez-bionic-build-changes" feature branch. My idea was to run the build script once everything is merged into that branch. Please let me know if you would prefer I include this commit instead.