public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* My build executable file very larger then release
@ 2022-05-31  5:18 A jeep
       [not found] ` <5e412d02-44fd-4ce5-947e-9872cb918c1cn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: A jeep @ 2022-05-31  5:18 UTC (permalink / raw)
  To: pandoc-discuss


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

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:

```
179924840  pandoc
125288616  pandoc-crossref
```

And I try to use Haskell docker:

```
docker run -it --rm --entrypoint=/bin/sh haskell:8.10

cabal update
cabal install pandoc pandoc-crossref
```

the results are more larger then the former.

How can I shrink the exec files to pandoc official release file size?

-- 
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/5e412d02-44fd-4ce5-947e-9872cb918c1cn%40googlegroups.com.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: My build executable file very larger then release
       [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>
  0 siblings, 1 reply; 4+ messages in thread
From: Albert Krewinkel @ 2022-05-31  6:18 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


A jeep <ajeep8-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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: My build executable file very larger then release
       [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>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2022-05-31 20:16 UTC (permalink / raw)
  To: Albert Krewinkel, pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw


It could be that the -split-sections option is responsible
for some of the shrinking.

Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:

> A jeep <ajeep8-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-discuss+unsubscribe-/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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: My build executable file very larger then release
       [not found]         ` <m25yllzcdr.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2022-06-01  7:05           ` A jeep
  0 siblings, 0 replies; 4+ messages in thread
From: A jeep @ 2022-06-01  7:05 UTC (permalink / raw)
  To: pandoc-discuss


[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-06-01  7:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31  5:18 My build executable file very larger then release 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 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).