Re: Final versions of ncurses libs detection patches

2013-03-07 Thread justin
On 06/03/13 22:23, Yann E. MORIN wrote:
> On Ubuntu Quantal, ncurses is indeed compiled with tinfo as a separate
> lib, but these two patches are not needed, because libncurses has proper
> (NEEDED) on libtinfo:
> 
>   $ readelf -d /lib/x86_64-linux-gnu/libncurses.so.5.9 |grep tinfo
>   0x0001 (NEEDED) Shared library: [libtinfo.so.5]

Hi Yann,

Same here

$ scanelf -n /lib//libncurses.so.5.9
 TYPE   NEEDED FILE
ET_DYN libc.so.6,libdl.so.2,libtinfo.so.5 /lib//libncurses.so.5.9


But why it works on ubuntu and debian is that

/lib/lib/x86_64-linux-gnu/libncurses.so.5.9

is a ld script with following content

INPUT(libncurses.so.9 -ltinfo)

It instructs the linker at link time to add additionally -ltinfo.

On Gentoo, the base-system maintainers refuse to do this (I would agree
if you call it a bug on our side), but I am not allowed to touch those
packages.

Luckily ncurses provides the config scripts and the pkg-config modules
to do sane linking. This should be done if possible regardless the
situation on a single distributions.

> 
> If I just configure ncurses with:
>   $ ./configure --with-termlib --with-shared --without-normal && make
>   $ readelf -d lib/libncurses.so.5.9 |grep tinfo
>   0x0001 (NEEDED) Shared library: [libtinfo.so.5]
> 
> I wonder how you configured your ncurses.

./configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --libdir=/usr/lib64
--with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --with-shared
--without-hashed-db --without-ada --with-cxx --with-cxx-binding
--without-debug --without-profile --with-gpm --disable-termcap
--enable-symlinks --with-rcs-ids --with-manpage-format=normal
--enable-const --enable-colorfgbg --enable-echo --enable-pc-files
--enable-warnings --without-assertions --disable-leaks
--without-expanded --with-macros --without-trace --with-termlib
--with-chtype=long --with-mmask-t=long --disable-ext-colors
--disable-ext-mouse --without-pthread --without-reentrant

> 
> Thanks for staying around during the iterations.

No problem, this is how it works. Thanks for your suggestions,

Justin




signature.asc
Description: OpenPGP digital signature


Re: Final versions of ncurses libs detection patches

2013-03-07 Thread justin
On 06/03/13 22:23, Yann E. MORIN wrote:
 On Ubuntu Quantal, ncurses is indeed compiled with tinfo as a separate
 lib, but these two patches are not needed, because libncurses has proper
 (NEEDED) on libtinfo:
 
   $ readelf -d /lib/x86_64-linux-gnu/libncurses.so.5.9 |grep tinfo
   0x0001 (NEEDED) Shared library: [libtinfo.so.5]

Hi Yann,

Same here

$ scanelf -n /lib//libncurses.so.5.9
 TYPE   NEEDED FILE
ET_DYN libc.so.6,libdl.so.2,libtinfo.so.5 /lib//libncurses.so.5.9


But why it works on ubuntu and debian is that

/lib/lib/x86_64-linux-gnu/libncurses.so.5.9

is a ld script with following content

INPUT(libncurses.so.9 -ltinfo)

It instructs the linker at link time to add additionally -ltinfo.

On Gentoo, the base-system maintainers refuse to do this (I would agree
if you call it a bug on our side), but I am not allowed to touch those
packages.

Luckily ncurses provides the config scripts and the pkg-config modules
to do sane linking. This should be done if possible regardless the
situation on a single distributions.

 
 If I just configure ncurses with:
   $ ./configure --with-termlib --with-shared --without-normal  make
   $ readelf -d lib/libncurses.so.5.9 |grep tinfo
   0x0001 (NEEDED) Shared library: [libtinfo.so.5]
 
 I wonder how you configured your ncurses.

./configure --prefix=/usr --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --mandir=/usr/share/man
--infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --libdir=/usr/lib64
--with-terminfo-dirs=/etc/terminfo:/usr/share/terminfo --with-shared
--without-hashed-db --without-ada --with-cxx --with-cxx-binding
--without-debug --without-profile --with-gpm --disable-termcap
--enable-symlinks --with-rcs-ids --with-manpage-format=normal
--enable-const --enable-colorfgbg --enable-echo --enable-pc-files
--enable-warnings --without-assertions --disable-leaks
--without-expanded --with-macros --without-trace --with-termlib
--with-chtype=long --with-mmask-t=long --disable-ext-colors
--disable-ext-mouse --without-pthread --without-reentrant

 
 Thanks for staying around during the iterations.

No problem, this is how it works. Thanks for your suggestions,

Justin




signature.asc
Description: OpenPGP digital signature


Re: Final versions of ncurses libs detection patches

2013-03-06 Thread Yann E. MORIN
Justin, All,

On Wednesday 06 March 2013 j...@gentoo.org wrote:
> I am sorry for the long delay.
> Final versions of the patches which are reduced to the usage of pkg-config. 
> And
> if unavailable we use the old code.

On Ubuntu Quantal, ncurses is indeed compiled with tinfo as a separate
lib, but these two patches are not needed, because libncurses has proper
(NEEDED) on libtinfo:

  $ readelf -d /lib/x86_64-linux-gnu/libncurses.so.5.9 |grep tinfo
  0x0001 (NEEDED) Shared library: [libtinfo.so.5]

If I just configure ncurses with:
  $ ./configure --with-termlib --with-shared --without-normal && make
  $ readelf -d lib/libncurses.so.5.9 |grep tinfo
  0x0001 (NEEDED) Shared library: [libtinfo.so.5]

I wonder how you configured your ncurses.

But anyway, even in that cse, using pkg-config when available is better
than using our previous legacy checks.

I'm still doing a few more tests on my side before queuing.

> Thanks for all suggestions,

Thanks for staying around during the iterations.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Final versions of ncurses libs detection patches

2013-03-06 Thread jlec

Hello,

I am sorry for the long delay.
Final versions of the patches which are reduced to the usage of pkg-config. And
if unavailable we use the old code.

Thanks for all suggestions,
Justin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Final versions of ncurses libs detection patches

2013-03-06 Thread jlec

Hello,

I am sorry for the long delay.
Final versions of the patches which are reduced to the usage of pkg-config. And
if unavailable we use the old code.

Thanks for all suggestions,
Justin
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Final versions of ncurses libs detection patches

2013-03-06 Thread Yann E. MORIN
Justin, All,

On Wednesday 06 March 2013 j...@gentoo.org wrote:
 I am sorry for the long delay.
 Final versions of the patches which are reduced to the usage of pkg-config. 
 And
 if unavailable we use the old code.

On Ubuntu Quantal, ncurses is indeed compiled with tinfo as a separate
lib, but these two patches are not needed, because libncurses has proper
(NEEDED) on libtinfo:

  $ readelf -d /lib/x86_64-linux-gnu/libncurses.so.5.9 |grep tinfo
  0x0001 (NEEDED) Shared library: [libtinfo.so.5]

If I just configure ncurses with:
  $ ./configure --with-termlib --with-shared --without-normal  make
  $ readelf -d lib/libncurses.so.5.9 |grep tinfo
  0x0001 (NEEDED) Shared library: [libtinfo.so.5]

I wonder how you configured your ncurses.

But anyway, even in that cse, using pkg-config when available is better
than using our previous legacy checks.

I'm still doing a few more tests on my side before queuing.

 Thanks for all suggestions,

Thanks for staying around during the iterations.

Regards,
Yann E. MORIN.

-- 
.-..--..
|  Yann E. MORIN  | Real-Time Embedded | /\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN |  ___   |
| +33 223 225 172 `.---:  X  AGAINST  |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL|   v   conspiracy.  |
'--^---^--^'
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/