Skip to contentSkip to conversation

Wrong pathnames in libtool and pkgconfig files

Buildroot Andrew E. Mileski 3 participants 3 messages Oct 2, 2006 – Jan 21, 2007

lore
Share & tools
lore
#0 lore raw

I'm repeatedly having problems with pathnames in *.la and *.pc files, since packages are built for / but installed in $(STAGING_DIR). This breaks packages that rely on these files being accurate.

So far I've resorted to sed'in them, which mostly works:

    sed -i filename -e 's#/usr#$(STAGING_DIR)/usr#g'

but is sure to cause problems if not prevented from being repeated.

This effects all packages built using libtool and pkgconfig.

Is there a more correct way to handle this?

Signature · 1 line
Andrew E. Mileski
#1 lore raw
Quoted 11 lines · Andrew E. Mileski

I'm repeatedly having problems with pathnames in *.la and *.pc files, since packages are built for / but installed in $(STAGING_DIR). This breaks packages that rely on these files being accurate.

So far I've resorted to sed'in them, which mostly works:

    sed -i filename -e 's#/usr#$(STAGING_DIR)/usr#g'

but is sure to cause problems if not prevented from being repeated.

This effects all packages built using libtool and pkgconfig.

Is there a more correct way to handle this?

Ugh. I'd never considered this, but yeah you are right. I do not know of any way to teach libtool about a cross compiling setup, so unless someone else has a better idea I think your idea to use sed is the best thing we have going.

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

#2 lore raw
Quoted 9 lines · Erik Andersen
Quoted 8 lines · Andrew E. Mileski

I'm repeatedly having problems with pathnames in *.la and *.pc files, since packages are built for / but installed in $(STAGING_DIR). This breaks packages that rely on these files being accurate.

So far I've resorted to sed'in them, which mostly works:

    sed -i filename -e 's#/usr#$(STAGING_DIR)/usr#g'

but is sure to cause problems if not prevented from being repeated.

Quoted 8 lines
Quoted 3 lines

This effects all packages built using libtool and pkgconfig.

Is there a more correct way to handle this?

Ugh. I'd never considered this, but yeah you are right. I do not know of any way to teach libtool about a cross compiling setup, so unless someone else has a better idea I think your idea to use sed is the best thing we have going.

In the meantime Erik did fix those up, so if you experience trouble with individual packages that still get this wrong, please let us know.

cheers,