From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnout Vandecappelle Date: Wed, 19 Feb 2014 22:16:25 +0100 Subject: [Buildroot] Open bug analysis In-Reply-To: References: <20140213195254.0b17b5bf@skate> <53024B08.1040709@mind.be> Message-ID: <53051F29.2000809@mind.be> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net On 19/02/14 17:02, Thomas De Schampheleire wrote: > Hi, > > On Mon, Feb 17, 2014 at 6:46 PM, Arnout Vandecappelle wrote: > [..] >>> As mentioned on IRC, I'm currently using a slightly modified version >>> of the above .la fixing: >>> >>> - $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \ >>> + $$(SED) "s:\(['= >>> ]\)/usr/lib:\\1$(STAGING_DIR)/usr/lib:g" $$$$i; \ >>> + $$(SED) "s:\(['= >>> ]\)/usr/local/lib:\\1$(STAGING_DIR)/usr/local/lib:g" $$$$i; \ >>> >>> I.e. instead of searching for /usr/something, only search for /usr/lib >>> as this is where all .la files are put. >>> I actually don't think we need the /usr/local/lib line. >> >> Just brainstorming here, but I think a more complete solution could be >> something like: >> >> $$(SED) -e "s:\(['= ]\)$(STAGING_DIR):\\1 at STAGING_DIR@:g" \ >> -e "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" \ >> -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ >> $$$$i; >> > > I have yet to try this alternate proposal, but in the meantime I have > done several randpackage tests with the mentioned code, and this works > without problem apparently. I have changes in pkg-autotools.mk (fixup > of .la files), pkg-generic (fixup of .pc files), and qt5. > > There is one wrong path that remains (but seems to cause no problem), > but this same problem is present in 'normal' buildroot builds outside > of /usr: several .la files contain strings of the form: > -L /path/to/buildroot/sysroot/path/to/buildroot/sysroot/usr/lib > > I tracked down this issue: when asking pkgconf for the libs > corresponding to a certain dependency expression, it will add the > sysroot to those strings it thinks need it. This works fine when the > paths are /usr /usr/lib etc, but not in case the library dependency is > already a full path. For example, when gcrypt and gnutls are enabled, > libecore is compiled with: --with-libgcrypt-prefix=$(STAGING_DIR)/usr, > causing an absolute path to be present. This is later prefixed by > pkgconf with another instance of STAGING_DIR. Seems to me that this should be solved in pkgconf itself, not by hacking the .la files... Regards, Arnout > > We could fix that by doing a SED on / too, and > replace it with just one . This would seem 'hacky' but > actually would fix incorrect paths. > > Best regards, > Thomas > > -- Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F