Skip to content

Confirm how dynamically built ch binary looks for the library #5425

Open
@ZHOUYue67

Description

@ZHOUYue67

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):

  1. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chakracore (line 21-22)
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions