rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Error building sample modules
@ 2021-05-25 17:46 Thomas Thanner
  2021-05-25 18:52 ` Miguel Ojeda
  2021-05-26  2:21 ` Miguel Ojeda
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Thanner @ 2021-05-25 17:46 UTC (permalink / raw)
  To: rust-for-linux

Hi,

I get the ERROR below building the rust sample modules.

Has somebody an idea, what I make wrong ?

Thanks

Thomas


make LLVM=1 -j4

...

...

OBJCOPY arch/x86/boot/setup.bin
BUILD   arch/x86/boot/bzImage
Kernel: arch/x86/boot/bzImage is ready  (#1)
ERROR: modpost: too long symbol 
"_RNvXsp_NtCsbDqzXfLQacH_6kernel12module_paramjNtB5_11ModuleParam5value" 
[samples/rust/rust_module_parameters.ko]
ERROR: modpost: too long symbol 
"_RNvXs0_NtCsbDqzXfLQacH_6kernel5printNtB5_13LogLineWriterNtNtCsbDqzXfLQacH_4core3fmt5Write9write_str" 
[samples/rust/rust_minimal.ko]
scripts/Makefile.modpost:132: recipe for target 'Module.symvers' failed
make[1]: *** [Module.symvers] Error 1
make[1]: *** Deleting file 'Module.symvers'


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

* Re: Error building sample modules
  2021-05-25 17:46 Error building sample modules Thomas Thanner
@ 2021-05-25 18:52 ` Miguel Ojeda
  2021-05-26  2:21 ` Miguel Ojeda
  1 sibling, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2021-05-25 18:52 UTC (permalink / raw)
  To: Thomas Thanner; +Cc: rust-for-linux

Hi Thomas,

On Tue, May 25, 2021 at 8:24 PM Thomas Thanner <e580@thomasthanner.de> wrote:
>
> Has somebody an idea, what I make wrong ?

A few general questions for reproducing your issue:
  - Which Git tree/commit are you compiling?
  - What is your kernel configuration?
  - What is your version of GCC, LLVM/Clang, rustc and bindgen?

Thank you!

Cheers,
Miguel

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

* Re: Error building sample modules
  2021-05-25 17:46 Error building sample modules Thomas Thanner
  2021-05-25 18:52 ` Miguel Ojeda
@ 2021-05-26  2:21 ` Miguel Ojeda
  2021-05-26 18:22   ` Thomas Thanner
  1 sibling, 1 reply; 5+ messages in thread
From: Miguel Ojeda @ 2021-05-26  2:21 UTC (permalink / raw)
  To: Thomas Thanner; +Cc: rust-for-linux

On Tue, May 25, 2021 at 8:24 PM Thomas Thanner <e580@thomasthanner.de> wrote:
>
> ERROR: modpost: too long symbol
> "_RNvXsp_NtCsbDqzXfLQacH_6kernel12module_paramjNtB5_11ModuleParam5value"
> [samples/rust/rust_module_parameters.ko]

Sven privately told me he recalls this being CONFIG_MODVERSIONS (thanks!).

Thomas, can you try disabling:

    Enable loadable module support  --->
        Module versioning support

(Ref: https://github.com/Rust-for-Linux/linux/issues/59)

Cheers,
Miguel

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

* Re: Error building sample modules
  2021-05-26  2:21 ` Miguel Ojeda
@ 2021-05-26 18:22   ` Thomas Thanner
  2021-05-26 18:38     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Thanner @ 2021-05-26 18:22 UTC (permalink / raw)
  To: rust-for-linux

Hi Miguel,

yes, thanks, that worked.

Now I have two built-in rust modules. And two loadable modules.

I have to compare that to normal linux modules. The built-in 
rust_minimal doesn't show up in /sys/module. If I do insmod 
rust_minimal.ko then it shows up. I have to do that a bit more 
systematically with the four modules.

Thanks for the moment

Thomas


On 26.05.21 04:21, Miguel Ojeda wrote:
> On Tue, May 25, 2021 at 8:24 PM Thomas Thanner <e580@thomasthanner.de> 
> wrote:
>> ERROR: modpost: too long symbol
>> "_RNvXsp_NtCsbDqzXfLQacH_6kernel12module_paramjNtB5_11ModuleParam5value"
>> [samples/rust/rust_module_parameters.ko]
> Sven privately told me he recalls this being CONFIG_MODVERSIONS (thanks!).
>
> Thomas, can you try disabling:
>
> Enable loadable module support --->
> Module versioning support
>
> (Ref: https://github.com/Rust-for-Linux/linux/issues/59)
>
> Cheers,
> Miguel

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

* Re: Error building sample modules
  2021-05-26 18:22   ` Thomas Thanner
@ 2021-05-26 18:38     ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2021-05-26 18:38 UTC (permalink / raw)
  To: Thomas Thanner; +Cc: rust-for-linux

On Wed, May 26, 2021 at 08:22:22PM +0200, Thomas Thanner wrote:
> Hi Miguel,
> 
> yes, thanks, that worked.
> 
> Now I have two built-in rust modules. And two loadable modules.
> 
> I have to compare that to normal linux modules. The built-in rust_minimal
> doesn't show up in /sys/module. If I do insmod rust_minimal.ko then it shows
> up. I have to do that a bit more systematically with the four modules.

If you module has no parameters or options, then building it into the
kernel will not cause it to show up in /sys/modules/ as what is there to
show in that location for it?

If you load it as a module, there is stuff to show (memory maps and the
like), so it makes sense it shows up then.

Try it with a .c module to see if it does the same thing.

thanks,

greg k-h

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

end of thread, other threads:[~2021-05-26 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 17:46 Error building sample modules Thomas Thanner
2021-05-25 18:52 ` Miguel Ojeda
2021-05-26  2:21 ` Miguel Ojeda
2021-05-26 18:22   ` Thomas Thanner
2021-05-26 18:38     ` Greg KH

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox