From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30647 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: A jeep Newsgroups: gmane.text.pandoc Subject: Re: My build executable file very larger then release Date: Wed, 1 Jun 2022 00:05:43 -0700 (PDT) Message-ID: References: <5e412d02-44fd-4ce5-947e-9872cb918c1cn@googlegroups.com> <871qwa6x1n.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7322_484361587.1654067143217" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32300"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCNPD3HL2QLRBSE73SKAMGQEGPWJP6Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Jun 01 09:05:48 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f64.google.com ([209.85.210.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nwIQN-0008IL-HQ for gtp-pandoc-discuss@m.gmane-mx.org; Wed, 01 Jun 2022 09:05:47 +0200 Original-Received: by mail-ot1-f64.google.com with SMTP id y23-20020a056830109700b0060b9c207465sf100262oto.9 for ; Wed, 01 Jun 2022 00:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=sTn4WZDEglgSx+reFap2EOnt/ij8FD68CRwAAKF9Wew=; b=SglSO/zrqNfaLeaoCxtR4ZU11MseXWhQrPl5FSfNeZPiLOaUuSq45t8NPftML3Rcr3 Y6izvV4eG6t/LsGfAHtEHojDrQ5cwNOHM6wqm+ssjtYi+tGqjAFZK45Dujq+XTPfxC5I 0yUg9zaeQ1cBKBvITDftunaTY/4FI2yHEBa+V9zCGCkbwm9EteM0wC25qHe2ZDQjrOFL VbUSwMmtblBrCP5Mdd3ELE/4//d+wBsah4NCPah5/4DC28koi6k9GbTsibOQbG8jqa7G oK2CsK3olXt586VP61dYyT3kNFTv1sI2scLO/6DaT6Dq2eKzka1qjFtlXh6RhpjyLwPu c4ow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=sTn4WZDEglgSx+reFap2EOnt/ij8FD68CRwAAKF9Wew=; b=OAeGraJBrfNjIrmWOOKBlxma9CmHzLGidX6RKGLOD0TBYe6/MlQRcMSQTw68zoyPkR M2kiy2YqGE+QOLfuoY0TMcn4H+jImUdZjg1xp4ARwJ8Tt/7jaROoqsC+uN4+zMAsrfFq 4LX2H7X6RhWG3XM8r2z9oGoC8udxpHowRLX+qapBoROsZsHP+asLHbXqWrFVaynNxfz0 5A1vFGHjaIV/LXZZRtpaVBXiXRiwU0bbLgJQN75OwfhHpquNian6PGbLB1xTp8jmZxQi THr+awQSWDoaoCq1Z3WwGOFPGx8/7D3BRxlB8cUPmGwIV5lCc+BWu+/trbSJJ4alh51H HOcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=sTn4WZDEglgSx+reFap2EOnt/ij8FD68CRwAAKF9Wew=; b=nNfHZADBBdd+wrXEKIpBQovGBNtqE0MVvYnvVtEBbH4IvjikVU0OyvHyJzRJPYdnkq VPOt4/fm6TfbV5BP8eIS0HtWRQv0tx9KqW3OyqW0g9cVtlyuIMqJpj5sKo4F8DZ1Yyb4 91be9YZiZS0CaeJ5UdFZrr8cdLtpikHzLhhFy1q3t6kmwfWTLpHqu3ynNVkwWnM1B5SM T0GCQiebkzzgeCcdUJc+f0uWJiOd9AlHUt/kx9wZJkMgLl/2CNLM1qc//wwzf9A/0IIm 6xFSKa/ajjuOnijDC92Na0eljkVAyvjm0wD0HW3zJcpsHC9yLLJQ0kWdgj1EFxdwIFQh 5ghA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5304O7jZIkCagv+fd8z+SkIBamy/w4tR23MVQ9KODh7aL/FO8Gri EDbcYAgnjuiwSMSH5ySdf0w= X-Google-Smtp-Source: ABdhPJwfKp3bUO7IDx2poL29K6OpoTnePMxh2s1qYFbcjE3cUIT/CCIj76PpSXIIv+Pskwu/uWHUXQ== X-Received: by 2002:a9d:12cf:0:b0:60b:883:73cc with SMTP id g73-20020a9d12cf000000b0060b088373ccmr19088344otg.313.1654067146424; Wed, 01 Jun 2022 00:05:46 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:2181:b0:32a:ef0d:bd67 with SMTP id be1-20020a056808218100b0032aef0dbd67ls906547oib.10.gmail; Wed, 01 Jun 2022 00:05:43 -0700 (PDT) X-Received: by 2002:a54:4e8d:0:b0:325:988d:afaf with SMTP id c13-20020a544e8d000000b00325988dafafmr14820078oiy.135.1654067143783; Wed, 01 Jun 2022 00:05:43 -0700 (PDT) In-Reply-To: X-Original-Sender: ajeep8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:30647 Archived-At: ------=_Part_7322_484361587.1654067143217 Content-Type: multipart/alternative; boundary="----=_Part_7323_153065745.1654067143217" ------=_Part_7323_153065745.1654067143217 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for your replies. I tyied `strip -s -o pandoc-small pandoc`, but get the same size=20 pandoc-small. I try to make_artifacts.sh in haskell docker: ``` docker run -it --rm --entrypoint=3D/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=20 ghczuwrapperZC6ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCgetgrgidzur:=20 warning: Using 'getgrgid_r' in statically linked applications requires at= =20 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= =20 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=20 /artifacts/DONE: Directory nonexistent ``` It seem not completed, I only find a very large pandoc in=20 `/root/pandoc/dist-newstyle/build/x86_64-linux/ghc-8.10.7/pandoc-2.18/x/pan= doc/build/pandoc/` And, another problem, there's no make_artifacts.sh in pandoc-crossref.=20 But I find .github/workflows in pandoc and pandoc-crossref project, maybe I= =20 can find out how to thrink the binary by study .github/workflows? =E5=9C=A82022=E5=B9=B46=E6=9C=881=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UTC+8= 04:16:23 =E5=86=99=E9=81=93=EF=BC=9A > > It could be that the -split-sections option is responsible=20 > for some of the shrinking.=20 > > Albert Krewinkel writes:=20 > > > A jeep writes:=20 > >=20 > >> I'm not familiar with Haskell.=20 > >>=20 > >> In my utuntu 20.04, I `stack install pandoc pandoc-crossref`, the=20 > >> result exec files are very larger then official release:=20 > >>=20 > >> [...]=20 > >>=20 > >> How can I shrink the exec files to pandoc official release file size?= =20 > >=20 > > The main trick is to use `strip`, a tool to remove debug symbols and=20 > > other data that's not required.=20 > >=20 > > See also the script linux/make_artifacts.sh, which is used to generate= =20 > > the official release binaries.=20 > >=20 > >=20 > > --=20 > > Albert Krewinkel=20 > > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/871qwa6x1n.fsf%40zeitkra= ut.de.=20 > > --=20 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 e= mail 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. ------=_Part_7323_153065745.1654067143217 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for your replies.

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

=
I try to make_artifacts.sh in haskell docker:

```
docker run -it --rm --entrypoint=3D/bin/sh haskell:8.1= 0.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):g= hc_2.c:function ghczuwrapperZC6ZCunixzm2zi7zi2zi2ZCSystemziPosixziUserZCget= grgidzur: warning: Using 'getgrgid_r' in statically linked applications req= uires at runtime the shared libraries from the glibc version used for linki= ng

rts/Linker.c:596:0: error:
     warning: Using = 'dlopen' in statically linked applications requires at runtime the shared l= ibraries 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)
Preproc= essing test suite 'test-pandoc' for pandoc-2.18..
Building test suite 't= est-pandoc' for pandoc-2.18..
Running 1 test suites...
Test suite tes= t-pandoc: RUNNING...
Test suite test-pandoc: PASS
Test suite logged t= o:
/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-newst= yle/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.&nb= sp;

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

=E5=9C=A82022=E5=B9=B46=E6=9C=881=E6=97=A5=E6=98=9F=E6=9C=9F=E4=B8=89 UTC+= 8 04:16:23<John MacFarlane> =E5=86=99=E9=81=93=EF=BC=9A

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 <aj= e...-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 fil= e size?
>
> The main trick is to use `strip`, a tool to remove debug symbols a= nd
> other data that's not required.
>
> See also the script linux/make_artifacts.sh, which is used to gene= rate
> the official release binaries.
>
>
> --=20
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124
>
> --=20
> 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 pando= c-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pan= doc-discuss/871qwa6x1n.fsf%40zeitkraut.de.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@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.
------=_Part_7323_153065745.1654067143217-- ------=_Part_7322_484361587.1654067143217--