Skip to contentSkip to conversation

Issues regarding fixing error generated during compiling changes.

DISCUSSION Mitali Borkar 2 participants 2 messages Apr 1, 2021

lore
Share & tools
lore
#0 lore raw

Hello, I am Mitali from India. I am newbie. I am using Linux 2021.1 in VirtualBox. In first patch tutorial under "Compile your changes section" after running "make -j2" command, I am getting these errors:
In file included from ./include/linux/printk.h:7,

                 from ./include/linux/kernel.h:16,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from drivers/net/ethernet/intel/e1000/e1000.h:10,
                 from drivers/net/ethernet/intel/e1000/e1000_main.c:4:

./include/linux/kern_levels.h:5:18: error: expected declaration specifiers or ‘...’ before string constant
5 | #define KERN_SOH "\001" /* ASCII Start Of Header */
| ^~~~~~
./include/linux/kern_levels.h:15:20: note: in expansion of macro ‘KERN_SOH’
15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */

      |                   ^~~~~~~~
drivers/net/ethernet/intel/e1000/e1000_main.c:90:10: note: in expansion of 
macro ‘KERN_DEBUG’
   90 |   printk(KERN_DEBUG "I can modify the Linux kernel!\n");
      |                  ^~~~~~~~~~

make[5]: *** [scripts/Makefile.build:271:
drivers/net/ethernet/intel/e1000/e1000_main.o] Error 1
make[4]: *** [scripts/Makefile.build:514: drivers/net/ethernet/intel/e1000] Error 2
make[3]: *** [scripts/Makefile.build:514: drivers/net/ethernet/intel] Error 2
make[2]: *** [scripts/Makefile.build:514: drivers/net/ethernet] Error 2 make[1]: *** [scripts/Makefile.build:514: drivers/net] Error 2
make: *** [Makefile:1851: drivers] Error 2
make: *** Waiting for unfinished jobs....

I am not sure how to fix this error. Please help me out.

Thanks

#1 lore raw
Quoted 1 line · Mitali Borkar

Hello, I am Mitali from India. I am newbie. I am using Linux 2021.1 in

What is Linux 2021.1?

Quoted 2 lines

VirtualBox. In first patch tutorial under "Compile your changes section" after running "make -j2" command,

In my experience, until you have good confidence that your code is correct, it can be helpful not to use -j when you are first compiling the files that you have just changed.

I don't see anything obviously wrong in your code below. Perhaps also send the change that you have made (git diff), in case there is actually some problem in the context.

julia

Quoted 42 lines

I am getting these errors:In file included
from ./include/linux/printk.h:7,
                 from ./include/linux/kernel.h:16,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from drivers/net/ethernet/intel/e1000/e1000.h:10, from drivers/net/ethernet/intel/e1000/e1000_main.c:4:
./include/linux/kern_levels.h:5:18: error: expected declaration specifiers or ‘...’ before string constant
    5 | #define KERN_SOH "\001"  /* ASCII Start Of Header */
      |                  ^~~~~~ ./include/linux/kern_levels.h:15:20: note: in expansion of macro ‘KERN_SOH’ 15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ |                   ^~~~~~~~ drivers/net/ethernet/intel/e1000/e1000_main.c:90:10: note: in expansion of macro ‘KERN_DEBUG’
   90 |   printk(KERN_DEBUG "I can modify the Linux kernel!\n"); |                  ^~~~~~~~~~
make[5]: *** [scripts/Makefile.build:271:
drivers/net/ethernet/intel/e1000/e1000_main.o] Error 1
make[4]: *** [scripts/Makefile.build:514: drivers/net/ethernet/intel/e1000] Error 2
make[3]: *** [scripts/Makefile.build:514: drivers/net/ethernet/intel] Error 2
make[2]: *** [scripts/Makefile.build:514: drivers/net/ethernet] Error 2 make[1]: *** [scripts/Makefile.build:514: drivers/net] Error 2
make: *** [Makefile:1851: drivers] Error 2
make: *** Waiting for unfinished jobs....

I am not sure how to fix this error. Please help me out.

Thanks

--
You received this message because you are subscribed to the Google Groups
"outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To view this discussion on the web visithttps://groups.google.com/d/msgid/outreachy-kernel/bfc3ac12-e9c3-4b16-b53a- fdf1aeee5e97n%40googlegroups.com.