Opened 10 years ago

Last modified 8 months ago

#1851 new bug

"make install-strip" should work

Reported by: igloo Owned by:
Priority: normal Milestone:
Component: Build System Version: 8.0.1
Keywords: Cc: gidyn
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

With the bindists (not sure about a normal build tree) install-strip doesn't work:

$ make install-strip
make: *** No rule to make target `install-strip'.  Stop.
$

It is defined in mk/install.mk, so it presumably is meant to. The blurb after running configure should mention it, too.

The target is described in the GNU coding standards: http://www.gnu.org/prep/standards/html_node/Standard-Targets.html

Change History (26)

comment:1 Changed 10 years ago by igloo

Owner: set to igloo

comment:2 Changed 10 years ago by igloo

Resolution: fixed
Status: newclosed

Now fixed, both in build trees and in bindists, and in both the HEAD and the 6.8 branch.

comment:3 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:4 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:5 Changed 3 years ago by gidyn

Milestone: 6.8.2
Owner: igloo deleted
Resolution: fixed
Status: closednew
Type of failure: None/Unknown
Version: 6.8.17.8.4-rc1

This is fixed in bindist, but still doesn't work in the source distribution.

# make install-strip
===--- building phase 0
make -r --no-print-directory -f ghc.mk phase=0 phase_0_builds
make[1]: Nothing to be done for `phase_0_builds'.
===--- building phase 1
make -r --no-print-directory -f ghc.mk phase=1 phase_1_builds
make[1]: Nothing to be done for `phase_1_builds'.
===--- building final phase
make -r --no-print-directory -f ghc.mk phase=final install-strip
make[1]: *** No rule to make target `install-strip'.  Stop.
make: *** [install-strip] Error 2 

comment:6 Changed 3 years ago by gidyn

Cc: gidyn added
Type of failure: None/UnknownBuilding GHC failed

comment:7 Changed 3 years ago by gidyn

Milestone: 7.10.1
Version: 7.8.4-rc17.9

comment:8 Changed 3 years ago by gidyn

Still a problem in 7.10.1 RC1

comment:9 Changed 3 years ago by gidyn

Version: 7.97.10.1-rc1

comment:10 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

comment:11 Changed 2 years ago by thomie

Owner: set to thomie

comment:12 Changed 2 years ago by Thomas Miedema <thomasmiedema@…>

In 47493e60/ghc:

Build system: simplify install.mk.in

This will allow fixing #1851 more easily
("make install-strip" should work).

This reverts 57e2a81c589103b50da80a9e378b1a11285bd521:
  "On Cygwin, use a Cygwin-style path for /bin/install's destination"

Update submodule haddock and hsc2hs.

comment:13 Changed 2 years ago by Thomas Miedema <thomasmiedema@…>

In 64761ce/ghc:

Build system: implement `make install-strip` (#1851)

Reviewed by: bgamari

Differential Revision: https://phabricator.haskell.org/D1209

comment:14 Changed 2 years ago by thomie

Resolution: fixed
Status: newclosed

gidyn: should be fixed in 7.12.

comment:15 Changed 2 years ago by gidyn

The patch only seems to strip executables. This is appreciated, but stripping installed libraries with --strip-unneeded is also needed (and saves much more space than just stripping executables).

comment:16 Changed 2 years ago by thomie

Haskell libraries are always stripped currently, using --strip-unneeded by Cabal. You don't need make install-strip for that. There was a bug in Cabal where .a files didn't get stripped for us, for a few releases, but that should be fixed now.

https://github.com/haskell/cabal/pull/2782

The only libraries that aren't stripped are the those for the runtime system. I'm not sure why they aren't. I might look into this later.

Last edited 2 years ago by thomie (previous) (diff)

comment:17 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:18 Changed 2 years ago by Ben Gamari <ben@…>

In aaed24a4/ghc:

Build system: fix 'make install-strip' in bindist

The INSTALL_PROGRAM variable is set in mk/config.mk, so we have to
include that file before using it.

Running 'make install' before './configure' in a bindist will now also
display a nice message.

Reviewers: hvr, austin, bgamari

Reviewed By: bgamari

Differential Revision: https://phabricator.haskell.org/D1604

GHC Trac Issues: #1851

comment:19 Changed 18 months ago by gidyn

Milestone: 8.0.18.0.2
Owner: thomie deleted
Resolution: fixed
Status: closednew
Version: 7.10.1-rc18.0.1

make install-strip doesn't strip anything from the source distribution.

comment:20 Changed 18 months ago by thomie

Can you give instructions to reproduce the problem. What do you mean precisely with "anything from the source distribution"?

I tried the following (using HEAD), and it seems to work as expected:

$ DESTDIR=/tmp/install make install
$ DESTDIR=/tmp/install-strip make install-strip
$ file /tmp/install/usr/local/lib/ghc-8.1.20160521/bin/ghc
... ELF 64-bit LSB executable ... not stripped
$ file /tmp/install-strip/usr/local/lib/ghc-8.1.20160521/bin/ghc
... ELF 64-bit LSB executable ... stripped

comment:21 Changed 18 months ago by gidyn

Resolution: fixed
Status: newclosed

I seem to be having a problem with gcc. I'll re-open if it turns out that there was an issue in ghc after all.

comment:22 Changed 18 months ago by gidyn

Resolution: fixed
Status: closednew

OK, I think I've found the libraries which aren't stripped. (Apologies for the earlier comment, a problem with my gcc installation had led me to think that nothing is stripped.)

# cd /usr/local/lib/ghc-8.0.1/rts
# du -h *
3.1M    libHSrts.a
3.9M    libHSrts_thr.a
# strip --strip-unneeded *
# du -h *
736K    libHSrts.a
848K    libHSrts_thr.a

comment:23 Changed 18 months ago by thomie

Ack.

Maybe the new build system (https://github.com/snowleopard/hadrian) will do better, although it doesn't know how to install GHC at all yet.

comment:24 Changed 15 months ago by bgamari

Milestone: 8.0.28.0.3

It doesn't look like this will get fixed for 8.0.2.

comment:25 Changed 9 months ago by bgamari

Milestone: 8.0.38.2.1

At this point it is rather unlikely that there will be an 8.0.3. Re-milestoning.

comment:26 Changed 8 months ago by bgamari

Milestone: 8.2.1

It's unlikely this will be fixed for 8.2; de-milestoning until someone picks it up. Moreover, we will hopefully have Hadrian soon.

Note: See TracTickets for help on using tickets.