Debian package
This change introduces one unfortunate change:
Our Goobuntu version of debian is so old some packages can no longer be
found (using the same version) on newer systems. One of these packages
is libjsoncpp.so.0.
By far I have failed to instruct clang and everyone else to use
libjsoncpp.so, rather than libjsoncpp.so.0. For the time being I would
like to land the version with json linked in statically until a better
solution can be identified.
BUG=64528814
Change-Id: I81767e24afab61b301437bb4975519dfa2535a2b
(cherry picked from commit 2be6210253ef4ce3411231654c47feb27a2316ed)
diff --git a/ivserver/BUILD b/ivserver/BUILD
index 3426d4c..6d34d09 100644
--- a/ivserver/BUILD
+++ b/ivserver/BUILD
@@ -6,8 +6,15 @@
copts = [
"-I/usr/include/jsoncpp",
],
+ # TODO(ender): find a better way to manage dependencies across
+ # incompatible systems, like our obsolete Goobuntu vs modern Debian distros.
+ # The following libraries must be linked statically
+ # to avoid problems with missing (obsolete) library versions on newer systems.
+ linkstatic = 1,
linkopts = [
+ "-Wl,-Bstatic",
"-ljsoncpp",
+ "-static-libgcc",
],
deps = [
":ivserver_lib",
@@ -33,10 +40,6 @@
copts = [
"-I/usr/include/jsoncpp",
],
- linkopts = [
- "-lrt",
- "-ljsoncpp",
- ],
hdrs = [
"hald_client.h",
"ivserver.h",
@@ -61,6 +64,9 @@
copts = [
"-I/usr/include/jsoncpp",
],
+ linkopts = [
+ "-ljsoncpp",
+ ],
deps = [
":ivserver_lib",
"@cuttlefish//common/libs/fs",