:: Re: [DNG] Building from source pack…
Top Page
Delete this message
Reply to this message
Author: Bill Purvis
Date:  
To: dng
Subject: Re: [DNG] Building from source package
On 25/05/2023 12:44, Antony Stone wrote:
> Hi.
>
> I have a requirement to build an application (in this case, Asterisk) from
> source, so that I can add some debugging flags in order to investigate a
> suspected bug.
>
> I would prefer to build this from the Debian/Devuan source package rather than
> the upstream Asterisk project tarball, in order to be as compatible as
> possible with the version I'm running which shows the suspected bug.
>
> I wanted firstly to build a "standard" binary, just to be sure that I was doing
> the right thing and ending up with what would normally get installed from the
> Debian/Devuan binary package, before building anything a bit different.
>
> Incidentally, this is for Asterisk 16.28.0 under Beowulf.
>
> I used the following commands to build from source:
>
> - apt-get install dpkg-dev build-essentials
> - apt-get source asterisk
> - apt build-dep asterisk
> - dpkg-buildpackage -b -uc -us
>
> The result was a binary file *14398296* bytes in size, whereas the file
> installed by a standard "apt-get install asterisk" is *3057784* bytes.
>
> The "file" command shows me the difference:
>
> Standard binary install: ELF 64-bit LSB shared object, x86-64, version 1
> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for
> GNU/Linux 3.2.0, BuildID[sha1]=bca5c23ab46cabfba3829bd2e9e4c775b3adc502,
> stripped
>
> Result of building from source: ELF 64-bit LSB shared object, x86-64, version
> 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for
> GNU/Linux 3.2.0, BuildID[sha1]=34c3e31098866fcf1c5591eeb193f5efe77ff704, with
> debug_info, not stripped
>
> So, does anyone know where to find the build options that were used by the
> binary package maintainer, so that I can apply the same ones myself and create
> a binary that resembles the "standard" one?
>
>
> Thanks,
>
> Antony.

Obvious first step would be try running strip on the above executable.
That would
strip out all the symbolic info, which is normally done in the the
distros. If that doesn't
get a match, then you'd need to download source code from the distros
and compile that.
Compiling that should (though I can't guarantee) and exact match. There
are usually a host
of options which can be specified when running ./configure (or whatever
the package uses)
and this can only be determined if you can establish contact with
whoever handled the package
for that distro. I've never felt a real need to pursue things to this
extent. If I can track
down a bug and fix it myself, I'd submit it, but continue using my fixed
version, rather than
wait for the fix to percolate through.

Bill

--
+----------------------------------------+
| Bill Purvis                            |
| email: bill@???                  |

+----------------------------------------+