package/musl-fts: always build static library
PATCH 1/1 package/musl-fts: always build static library
musl-fts provides features left out of musl that are included in other libc's.
This patch always enables building the static library so that it is always present with musl's libc.a when enabled.
For those that are using buildroot for toolchain creation and want to static link, then libfts.a is available.
--- package/musl-fts/musl-fts.mk | 1 + 1 file changed, 1 insertion(+)
package/musl-fts/musl-fts.mk +1 -0
@@ -12,5 +12,6 @@ MUSL_FTS_LICENSE_FILES = COPYING # pkg-config needed for autoreconf MUSL_FTS_DEPENDENCIES = host-pkgconf MUSL_FTS_INSTALL_STAGING = YES +MUSL_FTS_CONF_OPTS += --enable-static $(eval $(autotools-package))
Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Lance, All,
Please, be sure that the From header matches your SoB line; evne though your email matches, the From lacks your real name.
On 2022-08-24 14:26 -0600, lancethepants spake thusly:
Quoted 7 lines
musl-fts provides features left out of musl that are included in other libc's.
This patch always enables building the static library so that it is always present with musl's libc.a when enabled.
For those that are using buildroot for toolchain creation and want to static link, then libfts.a is available.
Sorry, I am not sure I totally understood what you meant here.
If I understood correctly, you want to use Buildroot, to generate a musl-based toolchain, that you can distribute. You want that that toolchain be usable to do both shared and static linking. Right?
Then you want to be able to use that toolchain to build some software that uses fts(3). And so, since you want to allow static-only linking, you want that toolchain to also include the fts library as a static library.
However, this is, in my opinion, problematic for a few reasons.
First, including musl-ftx under the toolchain denomination is wrong; it no longer is a toolchain, but more of an SDK. Including musl-fts will for example mean that that toolchain will not be reusable as an external toolchain for Buildroot, because then musl-fts in the toolchain will come conflicting with musl-fts the package in Buildroot.
Second, if you need both static and shared libraries, why don't you build your SDK with BR2_SHARED_STATIC_LIBS to begin with? With that, we pass both --enable-static --enable-shared when building autotools packages (and musl-fts is an autotools package); see package/Makefile.in lines 423-424.
Third, what makes musl-fts different from other libraries that may be included in the SDK? If your external software needs other libraries, and you do not have them in the SDK, then you'll have to build those libraries first, and point your software buildsystem to use them; why can't you do the same for musl-fts?
Quoted 2 lines
Signed-off-by Lance Fredrickson <[email protected]>Signed-off-by lancethepants <[email protected]>
That second SoB line is incorrect, as it has no real-name part; it is also superfluous, because it is the same email part.
Regards,
Yann E. MORIN.
Quoted 22 lines
--- package/musl-fts/musl-fts.mk | 1 + 1 file changed, 1 insertion(+)package/musl-fts/musl-fts.mk +1
-0@@ -12,5 +12,6 @@ MUSL_FTS_LICENSE_FILES = COPYING # pkg-config needed for autoreconf MUSL_FTS_DEPENDENCIES = host-pkgconf MUSL_FTS_INSTALL_STAGING = YES +MUSL_FTS_CONF_OPTS += --enable-static $(eval $(autotools-package))Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
On 8/27/2022 7:38 AM, Yann E. MORIN spake thusly:
Quoted 15 lines
Lance, All,
Please, be sure that the From header matches your SoB line; evne though your email matches, the From lacks your real name.
On 2022-08-24 14:26 -0600, lancethepants spake thusly:
Quoted 7 lines
musl-fts provides features left out of musl that are included in other libc's.
This patch always enables building the static library so that it is always present with musl's libc.a when enabled.
For those that are using buildroot for toolchain creation and want to static link, then libfts.a is available.
Sorry, I am not sure I totally understood what you meant here.
Quoted 8 lines
If I understood correctly, you want to use Buildroot, to generate a musl-based toolchain, that you can distribute. You want that that toolchain be usable to do both shared and static linking. Right?
Then you want to be able to use that toolchain to build some software that uses fts(3). And so, since you want to allow static-only linking, you want that toolchain to also include the fts library as a static library.
Yes, that is correct.
Quoted 7 lines
However, this is, in my opinion, problematic for a few reasons.
First, including musl-ftx under the toolchain denomination is wrong; it no longer is a toolchain, but more of an SDK. Including musl-fts will for example mean that that toolchain will not be reusable as an external toolchain for Buildroot, because then musl-fts in the toolchain will come conflicting with musl-fts the package in Buildroot.
I see the issue you're saying here.
Quoted 5 lines
Second, if you need both static and shared libraries, why don't you build your SDK with
BR2_SHARED_STATIC_LIBSto begin with? With that, we pass both --enable-static --enable-shared when building autotools packages (and musl-fts is an autotools package); see package/Makefile.in lines 423-424.
This is a good solution.
Quoted 5 lines
Third, what makes musl-fts different from other libraries that may be included in the SDK? If your external software needs other libraries, and you do not have them in the SDK, then you'll have to build those libraries first, and point your software buildsystem to use them; why can't you do the same for musl-fts?
This is also a good solution.
"what makes musl-fts different from other libraries....?"
Well it is a library that has libc functionality. I can compile a glibc or uclibc toolchain and fts is included. Buildroot's musl toolchain includes musl-compat-headers to complete some of it's functionality, and musl-fts would be the same. For that reason I see it as a core toolchain component and not as something additional as an sdk. I do know that the musl developers are very intentional on what is included and on correctness, and fts didn't make the cut in their estimation. If fts were to be included as part of the musl toolchain in buildroot I now understand that solution would look different from my submission.
However, after grepping through the source I see that barely any packages in buildroot are dependent on it. Perhaps other toolchain makers omit it as well and so the current fts strategy would be necessary if using those as an external toolchain. Thanks for your response, you've given me some good workable solutions and I'll run with one of those.
Quoted 2 lines
Quoted 2 lines
Signed-off-by Lance Fredrickson <[email protected]>Signed-off-by lancethepants <[email protected]>
Oopsie on my part. I manually added the first line but then I didn't catch that... git format-patch -M -n -s -o outgoing origin/master
adds one as well using my git config.
Quoted 20 lines
That second SoB line is incorrect, as it has no real-name part; it is also superfluous, because it is the same email part.
Regards,
Yann E. MORIN.Quoted 14 lines
--- package/musl-fts/musl-fts.mk | 1 + 1 file changed, 1 insertion(+)package/musl-fts/musl-fts.mk +1
-0@@ -12,5 +12,6 @@ MUSL_FTS_LICENSE_FILES = COPYING # pkg-config needed for autoreconf MUSL_FTS_DEPENDENCIES = host-pkgconf MUSL_FTS_INSTALL_STAGING = YES +MUSL_FTS_CONF_OPTS += --enable-static
Quoted 8 lines
Quoted 8 lines
package/musl-fts/musl-fts.mk +0
-0$(eval $(autotools-package))Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Lance, All,
On 2022-08-29 08:52 -0600, Lance Fredrickson spake thusly:
Quoted 5 lines
On 8/27/2022 7:38 AM, Yann E. MORIN spake thusly:
Quoted 4 lines
On 2022-08-24 14:26 -0600, lancethepants spake thusly:
Quoted 3 lines
musl-fts provides features left out of musl that are included in other libc's. This patch always enables building the static library so
that it is always present with musl's libc.a when enabled.
[--SNIP--]
Quoted 10 lines
"what makes musl-fts different from other libraries....?"
Well it is a library that has libc functionality. I can compile a glibc or uclibc toolchain and fts is included. Buildroot's musl toolchain includes musl-compat-headers to complete some of it's functionality, and musl-fts would be the same. For that reason I see it as a core toolchain component and not as something additional as an sdk. I do know that the musl developers are very intentional on what is included and on correctness, and fts didn't make the cut in their estimation. If fts were to be included as part of the musl toolchain in buildroot I now understand that solution would look different from my submission.
There would still be a difference anyway. With glibc, fts is built-in to the C library, while with musl and uclibc, and thus with musl-fts, they are in a separate library, so your packages still need to know the difference as they would need to explicitly link to that library.
Quoted 2 lines
Thanks for your response, you've given me some good workable solutions and I'll run with one of those.
Great! :-) I've thus marked your patch as rejected in Patchwork.
Thanks for the feedback.
Regards,
Yann E. MORIN.
Quoted 34 lines
Quoted 2 lines
Quoted 2 lines
Signed-off-by Lance Fredrickson <[email protected]>Signed-off-by lancethepants <[email protected]>Oopsie on my part. I manually added the first line but then I didn't catch that...
git format-patch -M -n -s -o outgoing origin/master
adds one as well using my git config.Quoted 27 lines
That second SoB line is incorrect, as it has no real-name part; it is also superfluous, because it is the same email part.
Regards,
Yann E. MORIN.Quoted 21 lines
--- package/musl-fts/musl-fts.mk | 1 + 1 file changed, 1 insertion(+)package/musl-fts/musl-fts.mk +1
-0@@ -12,5 +12,6 @@ MUSL_FTS_LICENSE_FILES = COPYING # pkg-config needed for autoreconf MUSL_FTS_DEPENDENCIES = host-pkgconf MUSL_FTS_INSTALL_STAGING = YES +MUSL_FTS_CONF_OPTS += --enable-static $(eval $(autotools-package))Signature · 6 lines
2.20.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot