gpsd prerequisite fails to build on centos7 when dbus-glib-devel RPM is already installed
Summary
Source installation of the framework fails to build the gpsd prerequisite.
Steps to reproduce
yum install dbus-glib-devel
./scripts/install-packages.sh && ./scripts/install-prerequisites.sh
Context
What is the expected correct behavior
Core framework build succeeds.
Relevant logs and/o
os.chdir('/home/dhoover/git/gitlab.com/opencpi/bugdbus/opencpi/prerequisites-build/gpsd/gpsd/ocpi-build-centos7')
gcc -o gpsd -pthread dbusexport.o gpsd.o shmexport.o timehint.o sd_socket.o -L. -lgpsd -lgps_static -lm -lrt -ldbus-1 -lpthread -lsystemd
/usr/bin/ld: cannot find -lsystemd
collect2: error: ld returned 1 exit status
scons: *** [gpsd] Error 1
scons: building terminated because of errors.
Environment info
- OpenCPI Version used: commit 737ad1cd
- Type of install (RPM or source): source
- Environment vars (
env | grep -i ocpi): - Operating System and version (
uname -a): Linux localhost.localdomain 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 30 14:19:46 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux - Link to your project on GitLab: https://gitlab.com/opencpi/opencpi/
Possible fixes
I believe the issue is that the gpsd prerequisite build uses the default scons build value of true for dbus_export (which means dbus will be used if its packages are found), but the centos install-packages.sh scripts are not installing gpsd's documented required libraries for dbus (which for centos7 is dbus-glib-devel). So the gpsd prerequisite build on our gitlab CI was auto-disabling dbus because dbus-glib-devel happened to not be installed.
Modifying line 72 of build/prerequisites/gpsd/install-gpsd.sh to set dbus_export=False seems to be a reasonable solution here. We would have to re-test gpsd functionality to be sure we didn't break anything.
Criteria for closing this issue
-
bugfix merged into develop -
make a "best effort" attempt to test the bugfix (we don't have a great test at the moment...) try running e3xx project's e3xx_clock app on E310 w/ GPS antenna (must comment out e31x_mimo_xcvr_gps_time_proxyfrom OAS)