You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mkdir hello-world && cd hello-world
$ cabal init -n
[Info] Guessing dependencies...
[Info] Using cabal specification: 3.12
[Warn] unknown license type, you must put a copy in LICENSE yourself.
[Info] Creating fresh file CHANGELOG.md...
[Info] Creating fresh directory ./app...
[Info] Creating fresh file app/Main.hs...
[Info] Creating fresh file hello-world.cabal...
[Warn] No synopsis given. You should edit the .cabal file and add one.
[Info] You may want to edit the .cabal file and add a Description field.
$ cabal install --install-method=copy --installdir=bin
Wrote tarball sdist to
.../hello-world/dist-newstyle/sdist/hello-world-0.1.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-9.2.8 -O1
In order, the following will be built (use -v for more details):
- hello-world-0.1.0.0 (exe:hello-world) (requires build)
Starting hello-world-0.1.0.0 (exe:hello-world)
Building hello-world-0.1.0.0 (exe:hello-world)
Installing hello-world-0.1.0.0 (exe:hello-world)
Completed hello-world-0.1.0.0 (exe:hello-world)
Copying 'hello-world' to 'bin/hello-world'
$ file bin/hello-world
bin/hello-world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=f01f23649275f7d42dfb4b6875ba1eaab4558218, with debug_info, not stripped
NB: with debug_info, not stripped
Expected behavior
For comparison:
$ rm bin/hello-world
$ { echo 'packages: .'; echo 'executable-stripping: True'; } > cabal.project
$ cabal install --install-method=copy --installdir=bin
Wrote tarball sdist to
.../hello-world/dist-newstyle/sdist/hello-world-0.1.0.0.tar.gz
Resolving dependencies...
Build profile: -w ghc-9.2.8 -O1
In order, the following will be built (use -v for more details):
- hello-world-0.1.0.0 (exe:hello-world) (requires build)
Starting hello-world-0.1.0.0 (exe:hello-world)
Building hello-world-0.1.0.0 (exe:hello-world)
Installing hello-world-0.1.0.0 (exe:hello-world)
Completed hello-world-0.1.0.0 (exe:hello-world)
Copying 'hello-world' to 'bin/hello-world'
$ file bin/hello-world
bin/hello-world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=400106adf4c1724d0afd02e49918c9ea835e8dc9, stripped
NB: stripped
This is the result I would have expected without setting executable-stripping manually in the project file.
System information
Operating system: Ubuntu Linux
cabal, ghc versions: 3.12.1.0, 9.2.8
The text was updated successfully, but these errors were encountered:
Describe the bug
According to https://cabal.readthedocs.io/en/stable/cabal-project-description-file.html#cfg-field-executable-stripping, executable stripping is on by default ("Default value:
True
"). But it isn't.To Reproduce
NB: with debug_info, not stripped
Expected behavior
For comparison:
NB: stripped
This is the result I would have expected without setting
executable-stripping
manually in the project file.System information
cabal
,ghc
versions: 3.12.1.0, 9.2.8The text was updated successfully, but these errors were encountered: