[haiku-development] Re: libtool .la files contain package names and versions
- From: François Revol <revol@xxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Sat, 02 May 2015 03:52:00 +0200
Hi,
On 23/09/2014 00:23, Jérôme Duval wrote:
Hi Ingo,
2014-09-05 20:57 GMT+02:00 Ingo Weinhold <ingo_weinhold@xxxxxx>:
Yes, the problem is known in principle. The porter needs to check the
resulting *.la, *.pc, etc. files and possibly add code to the recipe to fix
them.(*) In such a case the dependency link should be used instead:
/packages/freetype_devel-<version>/devel-libpng/lib
Interestingly the dependency seems to be missing (at least in hrev47705
gcc4h).
I'm not even sure where the above path stems from. It's probably already
incorrect in the libpng_devel package. But even if the correct path
(/packages/libpng_devel-1.5.12-3/.self/develop/lib) was used there, it would
still have to be adjusted in freetype_devel.
I did the necessary adjustment on the freetype recipe. It's very error
prone btw.
(*) I guess haikuporter could provide some helper functionality. It knows
the dependencies and it knows what paths should be used.
I'm digging this old thread since I still have an issue with it when
porting Gambas3.
For example, the sdl_mixer_x86 .la file had libsdl_x86-1.2.15-5
hardcoded while sdl was at revision 7...
I tried to write a helper function, wasn't easy as the devel~ symlink
are missing when handling indirect dependencies (like, libpng from
freetype from sdl_ttf), and the lib~ names aren't always exactly
matching the .la filenames either (case or extra number like libSDL or
libpng16...).
I managed to get fixLibtoolArchives working with sdl_ttf and sdl_mixer.
It leaves incorrect -L args but they don't seem to be useful anyway.
For ex. this:
dependency_libs=' -L/packages/freetype_x86-2.5.5-1/.self/lib/x86
/packages/libsdl_x86-1.2.15-7/.self/develop/lib/x86/libfreetype.la
-L/packages/freetype_x86_devel-2.5.5-1/devel~libpng16_x86/develop/lib/x86
-lpng16
-lbz2
/packages/freetype_x86_devel-2.5.5-1/devel~libpng16_x86/develop/lib/x86/libpng16.la
/packages/freetype_x86-2.5.5-1/.self/develop/lib/x86/libpng16.la -lz
-L/packages/libsdl_x86-1.2.15-7/.self/develop/lib/x86
/packages/libsdl_x86-1.2.15-7/.self/develop/lib/x86/libSDL.la -lGL
-lroot -lbe -lmedia -lgame -ldevice -ltextencoding'
gives:
dependency_libs=' -L/packages/freetype_x86-2.5.5-1/.self/lib/x86
/packages/sdl_ttf_x86-2.0.11-1/lib~libfreetype_x86/develop/lib/x86/libfreetype.la
-L/packages/freetype_x86_devel-2.5.5-1/devel~libpng16_x86/develop/lib/x86
-lpng16
-lbz2
/packages/sdl_ttf_x86-2.0.11-1/lib~libpng_x86/develop/lib/x86/libpng16.la
/packages/sdl_ttf_x86-2.0.11-1/lib~libpng_x86/develop/lib/x86/libpng16.la
-lz -L/packages/libsdl_x86-1.2.15-7/.self/develop/lib/x86
/packages/sdl_ttf_x86-2.0.11-1/lib~libsdl_x86/develop/lib/x86/libSDL.la
-lGL -lroot -lbe -lmedia -lgame -ldevice -ltextencoding'
I'm still not sure we can safely drop all of them though, but it'd be nice.
cf.
https://autotools.io/libtool/lafiles.html
François.
Other related posts: