Description
It seems to me that, under Linux/macOS, dynamically built ch
binary will only looks for the dynamic library (libChakraCore.so
/libChakraCore.dylib
) under the same directory as the binary itself.
However, Linux/macOS usually put binaries and libraries under different directories (bin
and lib
).
If that's the case, when packaging ChakraCore for Linux and macOS, we have to build two times in order to get the dynamic library and a usable (statically built) ch
binary.
I provide patches to build scripts for ArchLinux and Homebrew (macOS):
- https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chakracore (line 21-22)
- https://github.com/MikeChou/homebrew-core/blob/5823ffee6bafe925a8bc2ab53f500ae6489542f4/Formula/chakra.rb#L29-L30
If ch
can look for the dynamic library according to the environment vairable LD_LIBRARY_PATH
or some other standard mechanism, there will be no need to build the binary a second time for this purpose alone, hence will save time and disk space.