Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593766 - qt5-build.eclass: handle .la files
Summary: qt5-build.eclass: handle .la files
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-14 14:36 UTC by Pacho Ramos
Modified: 2016-09-17 12:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2016-09-14 14:36:18 UTC
I was seeing that qtcore package (and probably others) are installing .la files

As the way of packaging qt is a bit different than in Fedora, I have failed to know if they are able to live without .la files... but I have found this:
http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtbase.git/tree/qt5-qtbase.spec

It seems they are running "some magic" with .la files and .prl files... I am not sure if that logic could be useful for us... but for letting you to know :/ (and also for me learning a bit more about how QT is built...)

## .prl/.la file love
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
pushd %{buildroot}%{_qt5_libdir}
for prl_file in libQt5*.prl ; do
  sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}
  if [ -f "$(basename ${prl_file} .prl).so" ]; then
    rm -fv "$(basename ${prl_file} .prl).la"
    sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}
  fi
done
popd


Thanks
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2016-09-14 15:23:17 UTC
(In reply to Pacho Ramos from comment #0)
> I was seeing that qtcore package (and probably others) are installing .la
> files

Only for a subset of static archives (on my system I have only 3 .la files installed by qt5), the rest are removed by prune_libtool_files.

> As the way of packaging qt is a bit different than in Fedora, I have failed
> to know if they are able to live without .la files... but I have found this:
> http://pkgs.fedoraproject.org/cgit/rpms/qt5-qtbase.git/tree/qt5-qtbase.spec
> 
> It seems they are running "some magic" with .la files and .prl files... I am
> not sure if that logic could be useful for us... but for letting you to know
> :/ (and also for me learning a bit more about how QT is built...)
> 
> ## .prl/.la file love
> # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
> pushd %{buildroot}%{_qt5_libdir}
> for prl_file in libQt5*.prl ; do
>   sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}

That has been there forever and never caused any problems, so I don't see a reason to sed it out...

>   if [ -f "$(basename ${prl_file} .prl).so" ]; then
>     rm -fv "$(basename ${prl_file} .prl).la"

This is handled by prune_libtool_files in qt5-build.eclass.

>     sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}

I have no idea why they're doing this.

>   fi
> done
> popd
> 
> 
> Thanks

Are you experiencing any issues from .la files?
Comment 2 Pacho Ramos gentoo-dev 2016-09-17 11:03:00 UTC
No, I was having issues with other .la files, then, I tried to get them solved and, additionally, I was checking all the pending .la files to ensure they weren't forgotten (in most cases that .la files were present because people forget to call prune_libtool_files as, sadly, that needs to be done manually :/)

Feel free to close if the present .la files are expected :)