From 01d65286f0e142d99b4cd72c9b7eb768a492b6bc Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 5 Feb 2021 00:54:57 -0800 Subject: [PATCH] make thneed compile more robust old-commit-hash: 5930749a127cfab11d2e541ad279527645352813 --- selfdrive/modeld/SConscript | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/selfdrive/modeld/SConscript b/selfdrive/modeld/SConscript index 7233eacb75..44a2fc7f29 100644 --- a/selfdrive/modeld/SConscript +++ b/selfdrive/modeld/SConscript @@ -59,9 +59,10 @@ common_model = lenv.Object(common_src) # build thneed model if arch == "aarch64" or arch == "larch64": compiler = lenv.Program('thneed/compile', ["thneed/compile.cc" ]+common_model, LIBS=libs) - cmd = f"cd {Dir('.').get_abspath()} && {compiler[0].get_abspath()} ../../models/supercombo.dlc ../../models/supercombo.thneed --binary" - snpe_path = "/data/pythonpath/phonelibs/snpe/"+arch - cenv = Environment(ENV = {'LD_LIBRARY_PATH' : snpe_path+":"+lenv["ENV"]["LD_LIBRARY_PATH"]}) + cmd = f"cd {Dir('.').abspath} && {compiler[0].abspath} ../../models/supercombo.dlc ../../models/supercombo.thneed --binary" + + lib_paths = ':'.join([Dir(p).abspath for p in lenv["LIBPATH"]]) + cenv = Environment(ENV={'LD_LIBRARY_PATH': f"{lib_paths}:{lenv['ENV']['LD_LIBRARY_PATH']}"}) cenv.Command("../../models/supercombo.thneed", ["../../models/supercombo.dlc", compiler], cmd) lenv.Program('_dmonitoringmodeld', [