Reset by default LD_LIBRARY_PATH in xds-project.conf 71/17171/1
authorSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 11 Oct 2018 15:34:24 +0000 (17:34 +0200)
committerSebastien Douheret <sebastien.douheret@iot.bzh>
Thu, 11 Oct 2018 15:34:24 +0000 (17:34 +0200)
New environment-setup-*-agl-linux file, used to set environment
variables to use an SDK, now checks if LD_LIBRARY_PATH is set or not.
And not empty LD_LIBRARY_PATH is considered as misconfigured and
prevent to use SDK. Following is the error message displayed in that
case :

Your environment is misconfigured, you probably need to
'unset LD_LIBRARY_PATH' but please check why this was set in the
first place and that it's safe to unset.
The SDK will not operate correctly in most cases when LD_LIBRARY_PATH
is set.
For more references see:
  http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80
  http://xahlee.info/UnixResource_dir/_/ldpath.html

Change-Id: I5f89f68d95a78e9b73f89e487ec74dd314bd5c48
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
lib/agent/projects.go

index 0bd5315..d5f809f 100644 (file)
@@ -169,6 +169,8 @@ func (p *Projects) Add(newP xaapiv1.ProjectConfig, fromSid, requestURL string) (
                } else {
                        fd.WriteString("#export XDS_SDK_ID=???\n")
                }
+               fd.WriteString("\n# Only disable reset of LD_LIBRARY_PATH if you are absolutely know what you are doing!\n")
+               fd.WriteString("export LD_LIBRARY_PATH=''\n")
                fd.Close()
        }