Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Remove .la files generated by autotools #670
Conversation
snappy-m-o
commented
Jul 19, 2016
|
Can one of the admins verify this patch? |
snappy-m-o
commented
Jul 19, 2016
|
Can one of the admins verify this patch? |
|
I'm not sure if we should allow the user to keep the .la files or not. The current patch makes it impossible to keep them. I think they should be removed by default though as this is what most people will want and it avoids the original issue with building against them. |
|
|
The above file shows a generated .la file with the absolute /lib paths that don't work. |
|
Didier pointed out this can be achieved using:
However this PR is probably still worth considering as this is tedious to add everywhere and it's unlikely the .la files will be useful / work anyway. |
|
Actually, now I'm not sure that the stage filter is working.. |
sergiusens
reviewed
Jul 20, 2016
| @@ -117,3 +118,6 @@ def build(self): | ||
| self.run(configure_command + self.options.configflags) | ||
| self.run(['make', '-j{}'.format(self.project.parallel_build_count)]) | ||
| self.run(make_install_command) | ||
| + | ||
| + # Remove .la files which don't work when they are moved around | ||
| + subprocess.check_call("find . -name '*.la' | xargs rm", shell=True, cwd=self.installdir) |
robert-ancell
added some commits
Jul 20, 2016
|
ok to test |
|
@robert-ancell so bad luck:
|
|
maybe just separate the new code into a helper method of the class or private method of the module or in
|
robert-ancell
added some commits
Aug 17, 2016
|
snapcraft/plugins/autotools.py:128:30: E211 whitespace before '(' |
|
retest this please |
robert-ancell commentedJul 19, 2016
If you build a part that depends on a library part, e.g.
parts:
glib:
plugin: autotools
source: https://download.gnome.org/core/3.20/3.20.2/sources/glib-2.48.1.tar.xz
glib-networking:
plugin: autotools
source: https://download.gnome.org/core/3.20/3.20.2/sources/glib-networking-2.48.2.tar.xz
after:
- glib
Then the dependant part fails to link due to the .la files being moved around:
CCLD glib-pacrunner
libtool: warning: library '/home/bob/bzr/gnome-3-20-snap/stage/lib/libgio-2.0.la' was moved.
libtool: error: cannot find the library '/lib/libgobject-2.0.la' or unhandled argument '/lib/libgobject-2.0.la'
.la files aren't commonly used (they are removed in Debian) and removing them fixes this issue. See discussion http://stackoverflow.com/questions/7104494/building-so-module-with-autotools-libtool-without-la-and-a-variants-being-ins