linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Static build of kmod
@ 2020-03-19 14:31 Rolf Eike Beer
  2020-03-20 16:41 ` Lucas De Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Rolf Eike Beer @ 2020-03-19 14:31 UTC (permalink / raw)
  To: linux-modules

[-- Attachment #1: Type: text/plain, Size: 1194 bytes --]

Greetings,

since commit b7016153ec87dba2b0f0d182cc8f1e3b12f4dfaf building static kmod is 
disabled. I would like to question that decision.

My use case is as follows: I build a custom BSP and would like to provide 
statically linked host tools. That makes it easy to deploy them at any 
location, and that these tools do not pick up random shared libraries of the 
underlying Linux system when executed. Currently kmod is one of the few 
packages that are not able to build in that way.

I understand that you may want to prevent other tools (e.g. sytemd was 
mentioned in that commit) to link against a static libkmod, and that is fine 
with me. What I would like to get is static kmod tools. For the BSP host tools 
case I don't mind if a libkmod does not exist at all, only the tools are of 
interest.

What do you think?

Regards,

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Static build of kmod
  2020-03-19 14:31 Static build of kmod Rolf Eike Beer
@ 2020-03-20 16:41 ` Lucas De Marchi
  2020-03-23  8:35   ` Rolf Eike Beer
  0 siblings, 1 reply; 3+ messages in thread
From: Lucas De Marchi @ 2020-03-20 16:41 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: linux-modules

On Thu, Mar 19, 2020 at 7:40 AM Rolf Eike Beer <eb@emlix.com> wrote:
>
> Greetings,
>
> since commit b7016153ec87dba2b0f0d182cc8f1e3b12f4dfaf building static kmod is
> disabled. I would like to question that decision.
>
> My use case is as follows: I build a custom BSP and would like to provide
> statically linked host tools. That makes it easy to deploy them at any
> location, and that these tools do not pick up random shared libraries of the
> underlying Linux system when executed. Currently kmod is one of the few
> packages that are not able to build in that way.
>
> I understand that you may want to prevent other tools (e.g. sytemd was
> mentioned in that commit) to link against a static libkmod, and that is fine
> with me. What I would like to get is static kmod tools. For the BSP host tools
> case I don't mind if a libkmod does not exist at all, only the tools are of
> interest.
>
> What do you think?

It's a build system limitation:

./configure -h| grep static
  --enable-static[=PKGS]  build static libraries [default=no]

The --enable-static switch is about building static libraries, and as
a consequence linking the binaries statically.
We don't want libkmod to be built statically because its symbols will
conflict with other libraries
as you mentioned.

If we had a --enable-static-tools switch that made only the tools
static (default false), I think it would be acceptable.

And since you are going to mess with the build system, if you want to
convert kmod to meson it would be very
appreciated :)

thanks
Lucas De Marchi

>
> Regards,
>
> Eike
> --
> Rolf Eike Beer, emlix GmbH, http://www.emlix.com
> Fon +49 551 30664-0, Fax +49 551 30664-11
> Gothaer Platz 3, 37083 Göttingen, Germany
> Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
> Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055
>
> emlix - smart embedded open source



-- 
Lucas De Marchi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Static build of kmod
  2020-03-20 16:41 ` Lucas De Marchi
@ 2020-03-23  8:35   ` Rolf Eike Beer
  0 siblings, 0 replies; 3+ messages in thread
From: Rolf Eike Beer @ 2020-03-23  8:35 UTC (permalink / raw)
  To: linux-modules

[-- Attachment #1: Type: text/plain, Size: 2150 bytes --]

Am Freitag, 20. März 2020, 17:41:18 CET schrieb Lucas De Marchi:
> On Thu, Mar 19, 2020 at 7:40 AM Rolf Eike Beer <eb@emlix.com> wrote:
> > Greetings,
> > 
> > since commit b7016153ec87dba2b0f0d182cc8f1e3b12f4dfaf building static kmod
> > is disabled. I would like to question that decision.
> > 
> > My use case is as follows: I build a custom BSP and would like to provide
> > statically linked host tools. That makes it easy to deploy them at any
> > location, and that these tools do not pick up random shared libraries of
> > the underlying Linux system when executed. Currently kmod is one of the
> > few packages that are not able to build in that way.
> > 
> > I understand that you may want to prevent other tools (e.g. sytemd was
> > mentioned in that commit) to link against a static libkmod, and that is
> > fine with me. What I would like to get is static kmod tools. For the BSP
> > host tools case I don't mind if a libkmod does not exist at all, only the
> > tools are of interest.
> > 
> > What do you think?
> 
> It's a build system limitation:
> 
> ./configure -h| grep static
>   --enable-static[=PKGS]  build static libraries [default=no]
> 
> The --enable-static switch is about building static libraries, and as
> a consequence linking the binaries statically.
> We don't want libkmod to be built statically because its symbols will
> conflict with other libraries
> as you mentioned.

Yes, for now I simply patch that check out there.

> If we had a --enable-static-tools switch that made only the tools
> static (default false), I think it would be acceptable.
> 
> And since you are going to mess with the build system, if you want to
> convert kmod to meson it would be very
> appreciated :)

If I change any build system the target is CMake.

Eike
-- 
Rolf Eike Beer, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 313 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-23  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-19 14:31 Static build of kmod Rolf Eike Beer
2020-03-20 16:41 ` Lucas De Marchi
2020-03-23  8:35   ` Rolf Eike Beer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).