[MONGOCRYPT-192] Document package installation from PPA Created: 21/Oct/19  Updated: 28/Oct/23  Resolved: 15/Nov/19

Status: Closed
Project: Libmongocrypt
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.0

Type: Task Priority: Major - P3
Reporter: Roberto Sanchez Assignee: Roberto Sanchez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by GODRIVER-1406 FLE GA docs changes Closed
Related
related to MONGOCRYPT-182 Reconsider how libmongocrypt is obtained Closed
related to MONGOCRYPT-206 Adjust GetVersion.cmake to produce de... Closed

 Description   

This document is a good starting point: https://github.com/mongodb/docs/blob/master/source/tutorial/install-mongodb-on-ubuntu.txt



 Comments   
Comment by Githook User [ 15/Nov/19 ]

Author:

{'name': 'Roberto C. Sánchez', 'username': 'rcsanchez97', 'email': 'roberto@connexer.com'}

Message: MONGOCRYPT-192 document package installation from PPAs
Branch: master
https://github.com/mongodb/libmongocrypt/commit/aa8bb140bd016a095e5ffc84e2d0df103521336a

Comment by Roberto Sanchez [ 24/Oct/19 ]

The errors are definitely a problem. I'll have to look at the build and see what we are missing.

We actually do a small example program compilation test for the .deb and .rpm packages we build for the C driver. I think that the necessary utilities are there so that we can do this in chroot environments without disturbing anything installed in system-wide directories.

Comment by Kevin Albertson [ 24/Oct/19 ]

Package installation seems ok, but using cmake and pkg-config with the installed package has some issues.

> sudo apt-get install libmongocrypt-dev
> cmake --find-package -DNAME:string=mongocrypt -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=LINK
 
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/mongocrypt/mongocrypt_targets.cmake:87 (message):
  The imported target "mongo::mongocrypt" references the file
 
     "/usr/lib/lib/libmongocrypt.so.0.0.0"
 
  but this file does not exist.  Possible reasons include:
 
  * The file was deleted, renamed, or moved to another location.
 
  * An install or uninstall procedure did not complete successfully.
 
  * The installation package was faulty and contained
 
     "/usr/lib/x86_64-linux-gnu/cmake/mongocrypt/mongocrypt_targets.cmake"
 
  but not all the files it references.
 
Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/mongocrypt/mongocrypt-config.cmake:1 (include)
  /usr/share/cmake-3.5/Modules/CMakeFindPackageMode.cmake:190 (find_package)
 
> pkg-config libmongocrypt --cflags --libs
-I/usr/local/include/libbson-1.0 -I/data/mci/5223e3463426076cf112c5c6c95eb094/install/libmongocrypt/include/mongocrypt -L/data/mci/5223e3463426076cf112c5c6c95eb094/install/libmongocrypt/lib -lmongocrypt

cmake is unable to find, and the pkg-config prefix includes the auto generated evergreen path. I think we should modify this ticket to include the fixes to the generated pkg-config/cmake files, or create a separate ticket (and have this ticket depend on it).

I think it'd be ideal to test usage on evergreen (e.g. link a small test program with package config/cmake) but perhaps that's not a reasonable request, as it would require installing these packages to system directories in evergreen tasks. So perhaps we're limited to manually testing this for now.

Generated at Thu Feb 08 09:08:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.