[CDRIVER-4013] Invalid RPATH to sources directories Created: 03/Jun/21 Updated: 27/Oct/23 Resolved: 30/Jul/21 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libbson, libmongoc |
| Affects Version/s: | 1.17.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Remi Collet | Assignee: | Roberto Sanchez |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
ERROR 0002: file '/usr/bin/mongoc-stat' contains an invalid rpath '/dev/shm/extras/BUILD/mongo-c-driver-1.17.6/x86_64-redhat-linux-gnu/src/libmongoc' in [/dev/shm/extras/BUILD/mongo-c-driver-1.17.6/x86_64-redhat-linux-gnu/src/libmongoc:/dev/shm/extras/BUILD/mongo-c-driver-1.17.6/x86_64-redhat-linux-gnu/src/libbson] Notice: starting with Fedora 35, invalid RPATH are blocker for build Changing CMAKE_SKIP_BUILD_RPATH to ON seems a working workaround, but a better fix probably exists (RPATH mays be needed to run the test suite), but are unwanted in installed binaries |
| Comments |
| Comment by Roberto Sanchez [ 30/Jul/21 ] | ||||||
|
The issue is best resolved downstream through the use of an already available build option, as described in an earlier comment. | ||||||
| Comment by Remi Collet [ 30/Jul/21 ] | ||||||
|
Thanks, -DCMAKE_SKIP_RPATH:BOOL=ON is OK.
Build: https://koji.fedoraproject.org/koji/taskinfo?taskID=72953511
Can be closed | ||||||
| Comment by Roberto Sanchez [ 29/Jul/21 ] | ||||||
|
remi, it seems that the solution is to specify -DCMAKE_SKIP_RPATH:BOOL=ON as a CMake option. I dropped your sed workaround and added that option in the %build option of the spec. After that, no RPATHs were set in the built or installed components. Are you comfortable with making this change to your downstream spec as the resolution to this issue? If so, I would like to close this issue. | ||||||
| Comment by Roberto Sanchez [ 26/Jul/21 ] | ||||||
|
Ah, of course! I had overlooked that. I will remove the sed command from the spec file and try to reproduce the error. Thanks for the pointer. | ||||||
| Comment by Remi Collet [ 26/Jul/21 ] | ||||||
|
I confirm the issue is still present in 1.18.0
> your spec file
Have you removed the workaround to this issue ? {{ (sed -e '/CMAKE_SKIP_BUILD_RPATH/s/OFF/ON/' -i CMakeLists.txt)}} | ||||||
| Comment by Roberto Sanchez [ 24/Jul/21 ] | ||||||
|
remi, I have tried several different approaches, but I cannot reproduce the error you describe. From what I can tell, the installed components of the C driver do not carry RPATH settings. After building in a F35 mock (using the script .evergreen/build_snapshot_rpm.sh in the C driver repository and your spec file with minor modifications), this is what I observe:
Additionally, I tried several different checks with rpmlint and rpminspect-fedora (as described in the wiki page you linked) and none of them found problems with the RPATH. If I have missed something in replicating the behavior, please let me know. As an added precaution, you should be able to add the option -DCMAKE_SKIP_INSTALL_RPATH:BOOL=ON to the CMake command line invoked from the spec file. Would this be sufficient? Or do I need to dig deeper? | ||||||
| Comment by Kevin Albertson [ 04/Jun/21 ] | ||||||
|
Thank you for the bug report remi! We will investigate this soon. |