[CDRIVER-377] build/mci.sh creating rpm not working on CentOS 6.5 Created: 17/Jun/14  Updated: 03/May/17  Resolved: 26/Jun/14

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: TBD
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Tom Pusateri Assignee: Christian Hergert
Resolution: Done Votes: 0
Labels: driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

[pusateri@fedora mongo-c-driver]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 20 (Heisenbug)
Release: 20
Codename: Heisenbug



 Description   

[pusateri@fedora ~]$ ./build/mci.sh
...
./doc/mallard2man.py 3 doc/mongoc_init.page
./doc/mallard2man.py 3 doc/mongoc_gridfs_file_set_filename.page
./doc/mallard2man.py 3 doc/mongoc_collection_save.page
./doc/mallard2man.py 3 doc/mongoc_stream_tls_check_cert.page
./doc/mallard2man.py 3 doc/mongoc_collection_update.page
./doc/mallard2man.py 3 doc/mongoc_socket_bind.page
./doc/mallard2man.py 3 doc/mongoc_gridfs_file_opt_t.page
./doc/mallard2man.py 3 doc/mongoc_version.page
./doc/mallard2man.py 3 doc/mongoc_cursor_more.page
./doc/mallard2man.py 3 doc/mongoc_gridfs_file_error.page
./doc/mallard2man.py 3 doc/mongoc_uri_get_auth_mechanism.page
./doc/mallard2man.py 3 doc/mongoc_client_get_write_concern.page
./doc/mallard2man.py 3 doc/mongoc_collection_keys_to_index_string.page
./doc/mallard2man.py 3 doc/mongoc_bulk_operation_update.page
./doc/mallard2man.py 3 doc/mongoc_cursor_t.page
./doc/mallard2man.py 3 doc/mongoc_gridfs_file_set_content_type.page
if test -d "mongo-c-driver-0.96.3"; then find "mongo-c-driver-0.96.3" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "mongo-c-driver-0.96.3" ||

{ sleep 5 && rm -rf "mongo-c-driver-0.96.3"; }

; else :; fi
test -d "mongo-c-driver-0.96.3" || mkdir "mongo-c-driver-0.96.3"
cp: cannot stat ‘./doc/mongoc_stream_close.3’: No such file or directory
gmake: *** [distdir] Error 1
cp: cannot stat ‘mongo-c-driver-*.tar.gz’: No such file or directory
error: File /home/pusateri/rpmbuild/SOURCES/mongo-c-driver-0.96.3.tar.gz: No such file or directory

[pusateri@fedora ~]$



 Comments   
Comment by Tom Pusateri [ 03/Jul/14 ]

Just verified that it works fine if I uninstall libbson RPMs but if they are installed, it still fails for me.

Comment by Christian Hergert [ 26/Jun/14 ]

Fixed in https://github.com/mongodb/mongo-c-driver/commit/100fc320a24d6ba9f8cdec966cdc52e42c399c7a

Comment by Christian Hergert [ 26/Jun/14 ]

I was able to recreate this finally. This was an issue where libbson was installed and distcheck resulted in using the installed libbson instead of the bundled libbson.

Adding --with-libbson=bundled to the distcheck flags fixes the issue.

Comment by Christian Hergert [ 25/Jun/14 ]

Very strange. I looked through the bash history on my build VM and there are surprisingly few things that have been done from a base install with the developer tools option. Just python-virtualenv (for buildbot), python-lxml, openssl-devel, cyrus-sasl-devel, and lsb-core.

Can you upload an attachment containing the entire build process?

Comment by Tom Pusateri [ 25/Jun/14 ]

Ok, still having a problem with build/mci.sh:
git clone https://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
./build/mci.sh

...

{ "status": "PASS", "name": "/TLS/no_certs", "seed": "891809184", "elapsed": 0.000308301 }

,

{ "status": "PASS", "name": "/TLS/no_verify", "seed": "3926971201", "elapsed": 0.002201976 }

,

{ "status": "PASS", "name": "/TLS/password", "seed": "254163997", "elapsed": 0.007223795 }

,

{ "status": "PASS", "name": "/TLS/trust_dir", "seed": "4033712003", "elapsed": 0.001477396 }

,

{ "status": "PASS", "name": "/TLS/wild", "seed": "4153569419", "elapsed": 0.002475416 }

]
}
{ test ! -d "mongo-c-driver-0.96.5" || { find "mongo-c-driver-0.96.5" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "mongo-c-driver-0.96.5"; }; }
test -d "mongo-c-driver-0.96.5" || mkdir "mongo-c-driver-0.96.5"
(cd src/libbson && /usr/bin/gmake top_distdir=../../mongo-c-driver-0.96.5 distdir=../../mongo-c-driver-0.96.5/src/libbson \
am_remove_distdir=: amskip_length_check=: am_skip_mode_fix=: distdir)
gmake[1]: Entering directory `/home/pusateri/src/mongo-c-driver/src/libbson'
gmake[1]: *** No rule to make target `distdir'. Stop.
gmake[1]: Leaving directory `/home/pusateri/src/mongo-c-driver/src/libbson'
gmake: *** [distdir] Error 1
cp: cannot stat `mongo-c-driver-*.tar.gz': No such file or directory
error: File /home/pusateri/rpmbuild/SOURCES/mongo-c-driver-0.96.5.tar.gz: No such file or directory
[pusateri@centos mongo-c-driver]$ ls ~/rpmbuild
BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
[pusateri@centos mongo-c-driver]$ ls ~/rpmbuild/SOURCES
[pusateri@centos mongo-c-driver]$

Comment by Tom Pusateri [ 25/Jun/14 ]

Whoops, ignore that last post. I was thinking about another platform and didn't use build/mci.sh.

Comment by Tom Pusateri [ 25/Jun/14 ]

Ok, it's probably the way I'm building it then. Still having trouble on CentOS 6.5.
I do this:
git clone https://github.com/mongodb/mongo-c-driver.git
cd mongo-c-driver
./autogen.sh --prefix=/usr --libdir=/usr/lib64 --enable-man-pages=yes --with-libbson=bundled
make dist-rpm

I get:
test -z "" || /bin/mkdir -p "/home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64"
make[3]: Leaving directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
make[2]: Leaving directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
make[1]: Leaving directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
+ find /home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64 -name '*.la' -exec rm -f '{}' ';'
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.MPr3Z7
+ umask 022
+ cd /home/pusateri/rpmbuild/BUILD
+ cd mongo-c-driver-0.96.5
+ make local-check
make[1]: Entering directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
make[1]: Nothing to be done for `local-check'.
make[1]: Leaving directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
+ make abicheck
make[1]: Entering directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
make[1]: Leaving directory `/home/pusateri/rpmbuild/BUILD/mongo-c-driver-0.96.5'
+ exit 0
Processing files: mongo-c-driver-0.96.5-1.el6.x86_64
Provides: libmongoc-1.0.so.0()(64bit)
Requires(interp): /sbin/ldconfig /sbin/ldconfig
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
Requires: libbson-1.0.so.0()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.6)(64bit) libcrypto.so.10()(64bit) libcrypto.so.10(libcrypto.so.10)(64bit) libm.so.6()(64bit) libmongoc-1.0.so.0()(64bit) librt.so.1()(64bit) librt.so.1(GLIBC_2.2.5)(64bit) libsasl2.so.2()(64bit) libssl.so.10()(64bit) libssl.so.10(libssl.so.10)(64bit) rtld(GNU_HASH)
Processing files: mongo-c-driver-devel-0.96.5-1.el6.x86_64
Provides: pkgconfig(libmongoc-1.0) = 0.96.5 pkgconfig(libmongoc-ssl-1.0) = 0.96.5
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(VersionedDependencies) <= 3.0.3-1
Requires: /usr/bin/pkg-config libbson-1.0.so.0()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libm.so.6()(64bit) libmongoc-1.0.so.0()(64bit) librt.so.1()(64bit) librt.so.1(GLIBC_2.2.5)(64bit) pkgconfig(libbson-1.0) pkgconfig(libmongoc-1.0) rtld(GNU_HASH)
Processing files: libbson-0.8.5-1.el6.x86_64
error: File not found by glob: /home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64/usr/share/doc/libbson/*
error: File not found by glob: /home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64/usr/lib64/libbson-1.0.so.*

RPM build errors:
File not found by glob: /home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64/usr/share/doc/libbson/*
File not found by glob: /home/pusateri/rpmbuild/BUILDROOT/mongo-c-driver-0.96.5-1.el6.x86_64/usr/lib64/libbson-1.0.so.*
make: *** [dist-rpm] Error 1
[pusateri@centos mongo-c-driver]$

Comment by Christian Hergert [ 23/Jun/14 ]

Hi Tom,

I'm going to mark this as can't reproduce since our build VM's generated RPMs just fine for the release.

In general, there isn't anything special about them. Just 6.5 from ISOs in VMware Player with automake, autoconf, libtool, cyrus-sasl-devel, openssl-devel, python-lxml, gcc, make, and yelp-tools.

Comment by Christian Hergert [ 20/Jun/14 ]

These RPMs were built on CentOS 6.5 for the 0.96.4 release.

https://github.com/mongodb/mongo-c-driver/releases/download/0.96.4/mongo-c-driver-0.96.4-x86_64-el6-rpms.tar.gz

Comment by Christian Hergert [ 20/Jun/14 ]

I should also note that 0.96.4 is scheduled for release today, and I'll release RPM's for CentOS 6.5.

Comment by Christian Hergert [ 20/Jun/14 ]

That's okay, we can keep this one.

Sadly, updating the build deps on the RPM isn't enough (since it happens after bootstrap), we should probably add a check to MCI on RPM-based systems.

As far as building on CentOS 6.5, my build farm shows it is fine at the moment and RPM artifacts were created, so we must be missing a dependency check here.

Comment by Tom Pusateri [ 17/Jun/14 ]

You can close ticket if you want and I can open a new one for CentOS 6.5.

Comment by Tom Pusateri [ 17/Jun/14 ]

The man page problem was resolved by installing python-lxml. RPM now is created on Fedora 20!
Still does not work on CentOS 6.5 due to a new problem:

: 0.000480368 },

{ "status": "PASS", "name": "/TLS/no_verify", "seed": "462739491", "elapsed": 0.002479268 }

,

{ "status": "PASS", "name": "/TLS/password", "seed": "2313135660", "elapsed": 0.007084065 }

,

{ "status": "PASS", "name": "/TLS/trust_dir", "seed": "3589330201", "elapsed": 0.001922898 }

,

{ "status": "PASS", "name": "/TLS/wild", "seed": "2982310642", "elapsed": 0.002042933 }

]
}
{ test ! -d "mongo-c-driver-0.96.3" || { find "mongo-c-driver-0.96.3" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -fr "mongo-c-driver-0.96.3"; }; }
test -d "mongo-c-driver-0.96.3" || mkdir "mongo-c-driver-0.96.3"
(cd src/libbson && /usr/bin/gmake top_distdir=../../mongo-c-driver-0.96.3 distdir=../../mongo-c-driver-0.96.3/src/libbson \
am_remove_distdir=: amskip_length_check=: am_skip_mode_fix=: distdir)
gmake[1]: Entering directory `/home/pusateri/src/mongo-c-driver/src/libbson'
gmake[1]: *** No rule to make target `distdir'. Stop.
gmake[1]: Leaving directory `/home/pusateri/src/mongo-c-driver/src/libbson'
gmake: *** [distdir] Error 1
cp: cannot stat `mongo-c-driver-*.tar.gz': No such file or directory
error: File /home/pusateri/rpmbuild/SOURCES/mongo-c-driver-0.96.3.tar.gz: No such file or directory

Comment by Tom Pusateri [ 17/Jun/14 ]

Same issue on Centos 6.5.

Generated at Wed Feb 07 21:09:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.