[jitsi-dev] Upgrade libopus in libjitsi


#1

HI all,

I tried to upgrade libopus used by libjitsi to the 1.1.4 version (https://opus-codec.org/release/stable/2017/01/20/libopus-1_1_4.html).

These are the steps I followed (I'm using Ubuntu 14.04):

  * checked out the Opus source code and switched to the 1.1.4 branch;
  * compiled & installed libopus on the local machine;
  * rebuilt libjnopus with the following command:
     * ant -d -Dopus= -lib ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 opus
  * to make this command working I had to change the include path because on Ubuntu Opus is installed in /usr/local/include instead of /usr/include;

The new libjnopus.so is working but the size of the library is slightly different: the new one is around 19K while the libjnopus.so on master is around 300K

New:
19320 May 2 17:10 libjnopus.so

Master:
300653 May 2 17:04 libjnopus.so

Did you use a different procedure to update libopus last time you did it?
Of course the opus version is different because on master was updated last time two years ago, but I wonder why the filesize is so different, maybe I'm missing something.

Regards,
Matteo


#2

Hi Matteo,

HI all,

I tried to upgrade libopus used by libjitsi to the 1.1.4 version
(https://opus-codec.org/release/stable/2017/01/20/libopus-1_1_4.html).

These are the steps I followed (I'm using Ubuntu 14.04):

  * checked out the Opus source code and switched to the 1.1.4 branch;
  * compiled & installed libopus on the local machine;
  * rebuilt libjnopus with the following command:
      o ant -d -Dopus= -lib
        ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 opus
  * to make this command working I had to change the include path
    because on Ubuntu Opus is installed in /usr/local/include instead of
    /usr/include;

The new libjnopus.so is working but the size of the library is slightly
different: the new one is around 19K while the libjnopus.so on master is
around 300K

New:
/19320 May 2 17:10 libjnopus.so/

Master:
/300653 May 2 17:04 libjnopus.so/

I would guess that your version links dynamically to libopus, while ours includes it. You can check by running "ldd -v" on the .so

Did you use a different procedure to update libopus last time you did it?
Of course the opus version is different because on master was updated
last time two years ago, but I wonder why the filesize is so different,
maybe I'm missing something.

I'm not sure. I think we might have done something different specifically to statically link.

Regards,
Boris

···

On 02/05/2017 10:22, Matteo Campana wrote:


#3
···

From: dev dev-bounces@jitsi.org on behalf of Boris Grozev boris@jitsi.org

Sent: Tuesday, May 2, 2017 5:35 PM

To: Jitsi Developers

Subject: Re: [jitsi-dev] Upgrade libopus in libjitsi.

Hi Matteo,

On 02/05/2017 10:22, Matteo Campana wrote:

HI all,

I tried to upgrade libopus used by libjitsi to the 1.1.4 version

(https://opus-codec.org/release/stable/2017/01/20/libopus-1_1_4.html).

These are the steps I followed (I’m using Ubuntu 14.04):

  • checked out the Opus source code and switched to the 1.1.4 branch;
  • compiled & installed libopus on the local machine;
  • rebuilt libjnopus with the following command:
  o ant -d -Dopus= -lib
    ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 opus
  • to make this command working I had to change the include path
because on Ubuntu Opus is installed in /usr/local/include instead of
/usr/include;

The new libjnopus.so is working but the size of the library is slightly

different: the new one is around 19K while the libjnopus.so on master is

around 300K

New:

/19320 May 2 17:10 libjnopus.so/

Master:

/300653 May 2 17:04 libjnopus.so/

I would guess that your version links dynamically to libopus, while ours

includes it. You can check by running “ldd -v” on the .so

Hi Boris,

yes this should be the cause:

ldd -v lib/native/linux-x86-64/libjnopus.so

linux-vdso.so.1 => (0x00007ffff0cc2000)

libopus.so.0 => /usr/local/lib/libopus.so.0 (0x00007f68943bc000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6893fcc000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6893cc5000)

/lib64/ld-linux-x86-64.so.2 (0x0000561e79901000)

Version information:

lib/native/linux-x86-64/libjnopus.so:

libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

/usr/local/lib/libopus.so.0:

libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6

/lib/x86_64-linux-gnu/libc.so.6:

ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2

/lib/x86_64-linux-gnu/libm.so.6:

libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

Did you use a different procedure to update libopus last time you did it?

Of course the opus version is different because on master was updated

last time two years ago, but I wonder why the filesize is so different,

maybe I’m missing something.

I’m not sure. I think we might have done something different

specifically to statically link.

If I recompile opus adding -fPIC to CFLAGS in the Makefile, and then modify the build.xml ant script in this way:

  •        <linkerarg value="-lopus" location="end" if="is.running.unix" />
    
  •        <linkerarg value="/usr/local/lib/libopus.a" location="end" if="is.running.unix" />
    

I manage to link Opus statically:

ldd -v lib/native/linux-x86-64/libjnopus.so

linux-vdso.so.1 => (0x00007ffd127c8000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0e7f664000)

/lib64/ld-linux-x86-64.so.2 (0x000055b324595000)

Version information:

lib/native/linux-x86-64/libjnopus.so:

libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6

libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

/lib/x86_64-linux-gnu/libc.so.6:

ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2

ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2

However now the resulting
libjnopus.so with symbols is bigger than master:

1780550 May 3 10:07 lib/native/linux-x86-64/libjnopus.so

and is quite similar to master if I strip the symbols (with strip -x):

312979 May 3 10:13 lib/native/linux-x86-64/libjnopus.so

So probably more or less this was also your procedure, sounds reasonable for you?

The only thing I notice is that with the build.xml currently on master libjnopus is dynamically linked to libopus.

Regards,

Matteo

Regards,

Boris


dev mailing list

dev@jitsi.org

Unsubscribe instructions and other list options:

http://lists.jitsi.org/mailman/listinfo/dev


#4

Hi,

Yeah I see some commented lines about static linking:
https://github.com/jitsi/libjitsi/blob/0d513568c6f6bdbb8efef50d116368cff6a79786/src/native/build.xml#L711-L711

Regards
damencho

···

On Wed, May 3, 2017 at 3:26 AM, Matteo Campana <matteo.campana@qnective.com> wrote:

________________________________
From: dev <dev-bounces@jitsi.org> on behalf of Boris Grozev
<boris@jitsi.org>
Sent: Tuesday, May 2, 2017 5:35 PM
To: Jitsi Developers
Subject: Re: [jitsi-dev] Upgrade libopus in libjitsi.

Hi Matteo,

On 02/05/2017 10:22, Matteo Campana wrote:

HI all,

I tried to upgrade libopus used by libjitsi to the 1.1.4 version
(https://opus-codec.org/release/stable/2017/01/20/libopus-1_1_4.html).

These are the steps I followed (I'm using Ubuntu 14.04):

  * checked out the Opus source code and switched to the 1.1.4 branch;
  * compiled & installed libopus on the local machine;
  * rebuilt libjnopus with the following command:
      o ant -d -Dopus= -lib
        ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 opus
  * to make this command working I had to change the include path
    because on Ubuntu Opus is installed in /usr/local/include instead of
    /usr/include;

The new libjnopus.so is working but the size of the library is slightly
different: the new one is around 19K while the libjnopus.so on master is
around 300K

New:
/19320 May 2 17:10 libjnopus.so/

Master:
/300653 May 2 17:04 libjnopus.so/

I would guess that your version links dynamically to libopus, while ours
includes it. You can check by running "ldd -v" on the .so

Hi Boris,
yes this should be the cause:

ldd -v lib/native/linux-x86-64/libjnopus.so
        linux-vdso.so.1 => (0x00007ffff0cc2000)
        libopus.so.0 => /usr/local/lib/libopus.so.0 (0x00007f68943bc000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6893fcc000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6893cc5000)
        /lib64/ld-linux-x86-64.so.2 (0x0000561e79901000)

        Version information:
        lib/native/linux-x86-64/libjnopus.so:
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        /usr/local/lib/libopus.so.0:
                libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
                libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
        /lib/x86_64-linux-gnu/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) =>
/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
/lib64/ld-linux-x86-64.so.2
        /lib/x86_64-linux-gnu/libm.so.6:
                libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

Did you use a different procedure to update libopus last time you did it?
Of course the opus version is different because on master was updated
last time two years ago, but I wonder why the filesize is so different,
maybe I'm missing something.

I'm not sure. I think we might have done something different
specifically to statically link.

If I recompile opus adding -fPIC to CFLAGS in the Makefile, and then modify
the build.xml ant script in this way:

- <linkerarg value="-lopus" location="end" if="is.running.unix"
/>
+ <linkerarg value="/usr/local/lib/libopus.a" location="end"
if="is.running.unix" />

I manage to link Opus statically:

ldd -v lib/native/linux-x86-64/libjnopus.so
        linux-vdso.so.1 => (0x00007ffd127c8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0e7f664000)
        /lib64/ld-linux-x86-64.so.2 (0x000055b324595000)

        Version information:
        lib/native/linux-x86-64/libjnopus.so:
                libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        /lib/x86_64-linux-gnu/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) =>
/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
/lib64/ld-linux-x86-64.so.2

However now the resulting libjnopus.so with symbols is bigger than master:

1780550 May 3 10:07 lib/native/linux-x86-64/libjnopus.so

and is quite similar to master if I strip the symbols (with strip -x):

312979 May 3 10:13 lib/native/linux-x86-64/libjnopus.so

So probably more or less this was also your procedure, sounds reasonable for
you?

The only thing I notice is that with the build.xml currently on master
libjnopus is dynamically linked to libopus.

Regards,
Matteo

Regards,
Boris

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#5

Yes, I'm pretty sure that's exactly what we did.

Boris

···

On 03/05/2017 03:26, Matteo Campana wrote:

------------------------------------------------------------------------
*From:* dev <dev-bounces@jitsi.org> on behalf of Boris Grozev
<boris@jitsi.org>
*Sent:* Tuesday, May 2, 2017 5:35 PM
*To:* Jitsi Developers
*Subject:* Re: [jitsi-dev] Upgrade libopus in libjitsi.

Hi Matteo,

On 02/05/2017 10:22, Matteo Campana wrote:

HI all,

I tried to upgrade libopus used by libjitsi to the 1.1.4 version
(https://opus-codec.org/release/stable/2017/01/20/libopus-1_1_4.html).

These are the steps I followed (I'm using Ubuntu 14.04):

  * checked out the Opus source code and switched to the 1.1.4 branch;
  * compiled & installed libopus on the local machine;
  * rebuilt libjnopus with the following command:
      o ant -d -Dopus= -lib
        ~/.m2/repository/org/apache/maven/maven-ant-tasks/2.1.3 opus
  * to make this command working I had to change the include path
    because on Ubuntu Opus is installed in /usr/local/include instead of
    /usr/include;

The new libjnopus.so is working but the size of the library is slightly
different: the new one is around 19K while the libjnopus.so on master is
around 300K

New:
/19320 May 2 17:10 libjnopus.so/

Master:
/300653 May 2 17:04 libjnopus.so/

I would guess that your version links dynamically to libopus, while ours
includes it. You can check by running "ldd -v" on the .so

Hi Boris,
yes this should be the cause:

ldd -v lib/native/linux-x86-64/libjnopus.so
        linux-vdso.so.1 => (0x00007ffff0cc2000)
        libopus.so.0 => /usr/local/lib/libopus.so.0 (0x00007f68943bc000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6893fcc000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f6893cc5000)
        /lib64/ld-linux-x86-64.so.2 (0x0000561e79901000)

        Version information:
        lib/native/linux-x86-64/libjnopus.so:
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        /usr/local/lib/libopus.so.0:
                libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
                libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6
        /lib/x86_64-linux-gnu/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) =>
/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
/lib64/ld-linux-x86-64.so.2
        /lib/x86_64-linux-gnu/libm.so.6:
                libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6

Did you use a different procedure to update libopus last time you did it?
Of course the opus version is different because on master was updated
last time two years ago, but I wonder why the filesize is so different,
maybe I'm missing something.

I'm not sure. I think we might have done something different
specifically to statically link.

If I recompile opus adding -fPIC to CFLAGS in the Makefile, and then
modify the build.xml ant script in this way:

- <linkerarg value="-lopus" location="end"
if="is.running.unix" />
+ <linkerarg value="/usr/local/lib/libopus.a" location="end"
if="is.running.unix" />

I manage to link Opus statically:

ldd -v lib/native/linux-x86-64/libjnopus.so
        linux-vdso.so.1 => (0x00007ffd127c8000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0e7f664000)
        /lib64/ld-linux-x86-64.so.2 (0x000055b324595000)

        Version information:
        lib/native/linux-x86-64/libjnopus.so:
                libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
        /lib/x86_64-linux-gnu/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) =>
/lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =>
/lib64/ld-linux-x86-64.so.2

However now the resulting libjnopus.so with symbols is bigger than master:

1780550 May 3 10:07 lib/native/linux-x86-64/libjnopus.so

and is quite similar to master if I strip the symbols (with strip -x):

312979 May 3 10:13 lib/native/linux-x86-64/libjnopus.so

So probably more or less this was also your procedure, sounds reasonable
for you?