Bug 19306 - `make install DESTDIR=` fails if you used relative path to configure
Summary: `make install DESTDIR=` fails if you used relative path to configure
Status: RESOLVED DUPLICATE of bug 13993
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.4.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-07 03:10 UTC by spage@macromedia.com
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: sparc-sun-solaris2.9
Target: sparc-sun-solaris2.9
Build: sparc-sun-solaris2.9
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spage@macromedia.com 2005-01-07 03:10:23 UTC
	I configured gcc-3.4.3 with the above command line,
	note I gave a relative path to ../gcc-3.4.3 from my <objdir>.

	Everything worked fine (I even submitted my test results :), until I tried
		make DESTDIR=/usr/local/TEST_NEW_gcc install
	this failed with :
	make[1]: Entering directory `/usr/local/src/gcc/gcc_objdir/gcc'
	...
	...
	mkdir -p -- /usr/local/TEST_NEW_gcc/usr/local/man/man7
	rm -f /usr/local/TEST_NEW_gcc/usr/local/bin/g++
	../gcc-3.4.3/install-sh -c g++ /usr/local/TEST_NEW_gcc/usr/local/bin/g++
	make[1]: ../gcc-3.4.3/install-sh: Command not found

	Note that having descended into the gcc subdirectory,
	the mkinstalldirs command understands that the path to the <srcdir> is one "../" higher,
	but the failing install-sh line doesn't add this, hence it can't find it.

Environment:
System: SunOS d01web01 5.9 Generic_112233-12 sun4u sparc SUNW,Sun-Fire-480R
Architecture: sun4

	
host: sparc-sun-solaris2.9
build: sparc-sun-solaris2.9
target: sparc-sun-solaris2.9
configured with: ../gcc-3.4.3/configure --disable-nls --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld

How-To-Repeat:
	Install GCC, but when you configure, don't use an absolute path to the <srcdir>/configure binary.
Comment 1 spage@macromedia.com 2005-01-07 03:10:23 UTC
Fix:
	Either the tools should handle the relative path, or the installation documentation
	(http://gcc.gnu.org/install/configure.html and in the distribution) should be
	very explicit and state
		"<srcdir> should be an absolute path to the sources directory,
		don't use relative paths."
	
	Looking at the gcc/Makefile, the successful mkinstalldirs command uses
		srcdir = ../../gcc-3.4.3/gcc
		mkinstalldirs='$(SHELL) $(srcdir)/mkinstalldirs' \
	The failing install-sh g++ line looks like it uses
		INSTALL = ../../gcc-3.4.3/gcc/../install-sh -c
	I'm not sure how this loses the "../" in front.


	Thanks for an awesome piece of software engineering.
Comment 2 Andrew Pinski 2005-01-07 03:13:06 UTC
This is a dup of bug 13993.

*** This bug has been marked as a duplicate of 13993 ***