public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: A jeep <ajeep8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: My build executable file very larger then release
Date: Wed, 1 Jun 2022 00:05:43 -0700 (PDT)	[thread overview]
Message-ID: <ed5f6fb7-80cb-4435-bea9-772fb428e78cn@googlegroups.com> (raw)
In-Reply-To: <m25yllzcdr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3728 bytes --]

Thank you for your replies.

I tyied `strip -s -o pandoc-small pandoc`, but get the same size 
pandoc-small.

I try to make_artifacts.sh in haskell docker:

```
docker run -it --rm --entrypoint=/bin/sh haskell:8.10.7
cd
git clone https://github.com/jgm/pandoc.git
cd pandoc
sh linux/make_artifacts.sh
```

but result:

```
/opt/ghc/8.10.7/lib/ghc-8.10.7/unix-2.7.2.2/libHSunix-2.7.2.2.a(User.o):ghc_2.c:function 
ghczuwrapperZC6ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetgrgidzur: 
warning: Using 'getgrgid_r' in statically linked applications requires at 
runtime the shared libraries from the glibc version used for linking

rts/Linker.c:596:0: error:
     warning: Using 'dlopen' in statically linked applications requires at 
runtime the shared libraries from the glibc version used for linking
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - pandoc-2.18 (test:test-pandoc) (ephemeral targets)
Preprocessing test suite 'test-pandoc' for pandoc-2.18..
Building test suite 'test-pandoc' for pandoc-2.18..
Running 1 test suites...
Test suite test-pandoc: RUNNING...
Test suite test-pandoc: PASS
Test suite logged to:
/root/pandoc/dist-newstyle/build/x86_64-linux/ghc-8.10.7/pandoc-2.18/t/test-pandoc/test/pandoc-2.18-test-pandoc.log
1 of 1 test suites (1 of 1 test cases) passed.
cp: cannot create regular file '/artifacts/': Not a directory
linux/make_artifacts.sh: 19: linux/make_artifacts.sh: cannot create 
/artifacts/DONE: Directory nonexistent
```
It seem not completed, I only find a very large pandoc in 
`/root/pandoc/dist-newstyle/build/x86_64-linux/ghc-8.10.7/pandoc-2.18/x/pandoc/build/pandoc/`

And, another problem, there's no make_artifacts.sh in pandoc-crossref. 

But I find .github/workflows in pandoc and pandoc-crossref project, maybe I 
can find out how to thrink the binary by study .github/workflows?

在2022年6月1日星期三 UTC+8 04:16:23<John MacFarlane> 写道:

>
> It could be that the -split-sections option is responsible 
> for some of the shrinking. 
>
> Albert Krewinkel <albert...-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes: 
>
> > A jeep <aje...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes: 
> > 
> >> I'm not familiar with Haskell. 
> >> 
> >> In my utuntu 20.04, I `stack install pandoc pandoc-crossref`, the 
> >> result exec files are very larger then official release: 
> >> 
> >> [...] 
> >> 
> >> How can I shrink the exec files to pandoc official release file size? 
> > 
> > The main trick is to use `strip`, a tool to remove debug symbols and 
> > other data that's not required. 
> > 
> > See also the script linux/make_artifacts.sh, which is used to generate 
> > the official release binaries. 
> > 
> > 
> > -- 
> > Albert Krewinkel 
> > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "pandoc-discuss" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/871qwa6x1n.fsf%40zeitkraut.de. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ed5f6fb7-80cb-4435-bea9-772fb428e78cn%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 5119 bytes --]

      parent reply	other threads:[~2022-06-01  7:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31  5:18 A jeep
     [not found] ` <5e412d02-44fd-4ce5-947e-9872cb918c1cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-05-31  6:18   ` Albert Krewinkel
     [not found]     ` <871qwa6x1n.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-05-31 20:16       ` John MacFarlane
     [not found]         ` <m25yllzcdr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-06-01  7:05           ` A jeep [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed5f6fb7-80cb-4435-bea9-772fb428e78cn@googlegroups.com \
    --to=ajeep8-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).