Building Atom on Linux to non-default directory?


I have built a fully bootstrapped toolchain/binary/library environment that runs the latest version of glibc (2.19) for the kernel on the servers at work (an old version of CentOS), gcc 7.3.0, and binutils 2.30, following most of the Linux From Scratch book. It’s insulated from the host libraries. Everything I’ve thrown at it works well, even having built Xorg, GTK+2/3, and GUI applications.

I’d love to build atom, but simply passing the argument ‘–install=/home/tools’ is not enough (/home/tools is the location of my independent, bootstrapped environment; including bin, etc, include, etc directories). The problem is, that when it’s installing the dependencies it fails because apm for instance has its search paths hard-coded to look for libraries in /usr or /usr/local. Is there a way around this behavior and have it use the libraries and include files and all dependencies under my own directory of /home/tools?


The git-utils dependency for apm for instance is looking for GLIBC 3.4.21. I’m assuming it’s trying to run a pre-built binary which obviously won’t work on my system which has Glibc 2.19 (which is from 2014, so not exactly ancient). Anyway to get it to build from source, as opposed to using prebuilt binaries?

bash-4.4$ ./script/build CPPFLAGS="-I/home/tools/include" LDFLAGS="-L/home/tools/lib -Wl,rpath=/home/tools/lib" --install=/home/tools
Node:	v9.7.1
Npm:	v5.3.0
Installing script dependencies
Installing apm
  return process.dlopen(module, path._makeLong(filename));

Error: /usr/lib64/ version `GLIBCXX_3.4.21' not found (required by /nfs/home/user/lfs/x11/atom-1.24.0/apm/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node)
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/nfs/home/user/lfs/x11/atom-1.24.0/apm/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:8:16)
    at Object.<anonymous> (/nfs/home/user/lfs/x11/atom-1.24.0/apm/node_modules/atom-package-manager/node_modules/git-utils/lib/git.js:371:4)
    at Module._compile (module.js:570:32)
    throw err;


I misspoke. That’s GLIBCXX 3.4.21, which is part of libstdc++. This error is happening purely because it’s looking for in the standard /usr/lib64 directory rather than my own /home/tools/lib, which has the latest gcc and GLIBCXX_ 3.4.24. So I need to somehow get the installer to look in my local directory rather than under /usr