Skip to contentSkip to conversation

RFC: Library file extensions

DISCUSSION Richard Purdie 2 participants 3 messages Feb 21, 2008 – Feb 22, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

As some may have gathered I made some experiments with using Poky to cross compile things to run on the iPodTouch which is arm-apple-darwin. THe good news is they were successful however Darwin creates some interesting challenges for OE, one of them is the dynamic libraries being called *.dylib, not *.so.

I've had the following patch in Poky to assist with this problem. It would need to be rolled out over all .bb files with custom FILES eventually but it has the advantage that can happen over time so the question is more whether this is a good idea and whether the approach is acceptable?

We would probably hit the same issue with windows .dll files and this solution would solve that too.

Comments welcome...

Cheers,

Richard

#

# old_revision [5fb8cfe19138b98226fe92044d302c9379dad84d]
#
# patch "conf/bitbake.conf"
#  from [a605bd5d4d48054b72d21c74a922a9a0a2d12a76]
#    to [1655c26111af10134f07eafd1e29ef00d8cd8f5f]
#
============================================================
--- conf/bitbake.conf	a605bd5d4d48054b72d21c74a922a9a0a2d12a76
+++ conf/bitbake.conf	1655c26111af10134f07eafd1e29ef00d8cd8f5f
@@ -157,12 +157,17 @@ MULTI_PROVIDER_WHITELIST = "virtual/libi

MULTI_PROVIDER_WHITELIST = "virtual/libintl"

+SOLIBS = ".so.*"
+SOLIBS_darwin = ".*.dylib"
+SOLIBSDEV = ".so"
+SOLIBSDEV_darwin = ".dylib"
+
PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale" FILES = ""

-FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \

+FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
-            ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} ${libdir}/${PN}/* \
+            ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/${SOLIBS} ${datadir}/${PN} ${libdir}/${PN}/* \
             ${datadir}/pixmaps ${datadir}/applications \
             ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
             ${libdir}/bonobo/servers"
@@ -171,7 +176,7 @@ SECTION_${PN}-doc = "doc"
             ${datadir}/gnome/help"

SECTION_${PN}-doc = "doc"

-FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \

+FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
                 ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \
                 ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal"

SECTION_${PN}-dev = "devel"

#1 lore raw

Hello,

Quoted 7 lines · On Thu, 21 Feb 2008 10:21:16 +0000 Richard Purdie <[email protected]> wrote:

Hi,

As some may have gathered I made some experiments with using Poky to cross compile things to run on the iPodTouch which is arm-apple-darwin. THe good news is they were successful however Darwin creates some interesting challenges for OE, one of them is the dynamic libraries being called *.dylib, not *.so.

The easiest way to account for would be to introduce something short like:

SO ?= "so"

But if, as look at the patch below shows, we need to actually account for cases like .so.<ver> vs .<ver>.dylib, then apparently it's the way to go.

Quoted 9 lines

I've had the following patch in Poky to assist with this problem. It would need to be rolled out over all .bb files with custom FILES eventually but it has the advantage that can happen over time so the question is more whether this is a good idea and whether the approach is acceptable?

We would probably hit the same issue with windows .dll files and this solution would solve that too.

Yes, I actually hit that when doing win32 mini-port, and thought what chore it would be to get such configurable support upstream, and update all cases .so is used ;-). So, I just used native unix scheme for DLLs.

Quoted 54 lines

Comments welcome...

Cheers,

Richard

#

# old_revision [5fb8cfe19138b98226fe92044d302c9379dad84d]
#
# patch "conf/bitbake.conf"
#  from [a605bd5d4d48054b72d21c74a922a9a0a2d12a76]
#    to [1655c26111af10134f07eafd1e29ef00d8cd8f5f]
#
============================================================
bitbake.conf +5 -1
@@ -157,12 +157,17 @@ MULTI_PROVIDER_WHITELIST = "virtual/libi
 
 MULTI_PROVIDER_WHITELIST = "virtual/libintl"
 
+SOLIBS = ".so.*"
+SOLIBS_darwin = ".*.dylib"
+SOLIBSDEV = ".so"
+SOLIBSDEV_darwin = ".dylib"
+
 PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-locale"
 FILES = ""
 
-FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/*

${libdir}/lib*.so.* \ +FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \ ${sysconfdir} ${sharedstatedir} ${localstatedir} \
- ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so*
${datadir}/${PN} ${libdir}/${PN}/* \
+ ${base_bindir}/* ${base_sbindir}/*
${base_libdir}/${SOLIBS} ${datadir}/${PN} ${libdir}/${PN}/* \
${datadir}/pixmaps ${datadir}/applications \ ${datadir}/idl ${datadir}/omf ${datadir}/sounds \ ${libdir}/bonobo/servers"

bitbake.conf +1 -1
@@ -171,7 +176,7 @@ SECTION_${PN}-doc = "doc"
             ${datadir}/gnome/help"
 SECTION_${PN}-doc = "doc"
 
-FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \
+FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}
 ${libdir}/*.la \ ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig \
                 ${base_libdir}/*.a ${base_libdir}/*.o

${datadir}/aclocal" SECTION_${PN}-dev = "devel"

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 2 lines
Best regards,
 Paul                          mailto:[email protected]
#2 lore raw

Hi,

Quoted 7 lines · Paul Sokolovsky
Quoted 5 lines · On Thu, 21 Feb 2008 10:21:16 +0000 Richard Purdie <[email protected]> wrote:

As some may have gathered I made some experiments with using Poky to cross compile things to run on the iPodTouch which is arm-apple-darwin. THe good news is they were successful however Darwin creates some interesting challenges for OE, one of them is the dynamic libraries being called *.dylib, not *.so.

Quoted 8 lines

The easiest way to account for would be to introduce something short like:

SO ?= "so"

But if, as look at the patch below shows, we need to actually account for cases like .so.<ver> vs .<ver>.dylib, then apparently it's the way to go.

Right, thats exactly the problem...

Cheers,

Richard