#280 bogus entry in include/ecl directory after install

install (1)

There are two ecl install problems in ecl-12.12.1.p4, both due to an
embedded cd command in these lines:

for i in `(cd ecl && find . -type d)`; do \
for i in `(cd ecl && find . -name '*.h')`; do echo $$i; \

I have CDPATH path set, with "." as the first entry (so that I'll go to
the local subdirectory first). This causes bash to find the directory
using the CDPATH, and thereofre write out the working directory
(cf. /usr/share/info/bash.info.gz)

 If a non-empty directory name from `CDPATH' is used, or if `-' is
 the first argument, and the directory change is successful, the
 absolute pathname of the new working directory is written to the
 standard output.

Suggested fix: unset CDPATH, as in

for i in `(unset CDPATH; cd ecl && find . -type d)`; do \
  k="$(DESTDIR)$(includedir)/ecl/$$i"; \
  test -d "$$k" || $(mkinstalldirs) $$k; \
for i in `(unset CDPATH; cd ecl && find . -name '*.h')`; do echo $$i; \
  $(INSTALL_DATA) ecl/$$i $(DESTDIR)$(includedir)/ecl/$$i; \

I found this problem using sage (sagemath.org). Here's the problem in
that context.


When I (build and) install the ecl package, it creates a bogus entry
in the local/include/ecl directory, namely there is this entry


where my SAGE_ROOT is /scratch1/local/opt/sage-6.0.

It may be related to the following snippet and complaint in the
build output (note the explicit mkdir -p of the bogus entry)

mkdir -p -- /scratch1/local/opt/sage-6.0/local/include//ecl//scratch1/local/opt/sage-6.0/local/var/tmp/sage/build/ecl-12.12.1.p4/src/build/ecl
for i in `(cd ecl && find . -name '*.h')`; do echo $i; \
  /usr/bin/install -c -m 644 ecl/$i /scratch1/local/opt/sage-6.0/local/include//ecl/$i; \
/usr/bin/install: cannot stat `ecl//scratch1/local/opt/sage-6.0/local/var/tmp/sage/build/ecl-12.12.1.p4/src/build/ecl': No such file or directory

==Desired Result==

no bogus entry in $SAGE_ROOT/local/include/ecl

==Context of the Problem==

Happened on intial build of sage,
and reproduced with sage -f ecl
after moving the $SAGE_ROOT.

==Platform (CPU) and Operating System==

RedHat Enterprise Linux 5.7

==Exact version of Sage (command: "version()")==

sage: version()
'Sage Version 6.0, Release Date: 2013-12-17'




Cancel   Add attachments