Out-of-tree build
For the meson-build of sage, I need to out-of-tree build ecl.
I tried the following:
mkdir temp/build
cd temp/build
<path to>/ecl/src/configure --enable-manual=no --enable-unicode=yes --with-defsystem --prefix=/usr/local --libdir=/usr/local/lib64 --bindir=/usr/local/bin
make -j8
DESTDIR=<path to>/temp/dist make install
Running then <path to>/temp/dist/usr/local/bin/ecl however gives
<path to>/temp/dist/usr/local/bin/ecl: error while loading shared libraries: libecl.so.24.5: cannot open shared object file: No such file or directory
What's the best way to fix this?
After setting
export LDFLAGS=-Wl,-rpath,<path to>/temp/dist/usr/local/lib64
and running the above commands again, I get a bit further. However, now in ecl I get
> (require 'cmp)
;;; Loading #P"<path to>/temp/build/cmp.fas"
("CMP")
for some reason it still refers to the build and not dist directory. How to fix it?
Using the same steps, but with different env variables I also get
Condition of type: SIMPLE-ERROR
Module error: Don't know how to REQUIRE CMP.
Available restarts:
1. (RESTART-TOPLEVEL) Go back to Top-Level REPL.
Broken at SI:BYTECODES. [Evaluation of: (REQUIRE (QUOTE CMP))] In: #<process TOP-LEVEL 0x7b9a09bb5f00>.
I still have to figure out which env variable is the problem here. Any advice which ones to check?