All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gang He <GHe@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] Cannot compile ocfs2 kernel module directory
Date: Wed, 25 Dec 2019 07:00:19 +0000	[thread overview]
Message-ID: <CH2PR18MB3206BAD26F3F4C6BD962426ECF280@CH2PR18MB3206.namprd18.prod.outlook.com> (raw)
In-Reply-To: <2967264abe074c74be8e01f0a3fa04da@SOC-EX01V.e01.socionext.com>

Hello Yamada,

Thank for your reply,
I applied your patch, but still have some compile error.

sp2b1-nd1:/usr/src/linux/fs/ocfs2 # make -C /lib/modules/`uname -r`/build M=`pwd` modules
make: Entering directory '/usr/src/linux-5.3.13-1-obj/x86_64/default'
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/heartbeat.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/masklog.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/sys.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/nodemanager.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/quorum.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/tcp.o
  CC [M]  /usr/src/linux/fs/ocfs2/cluster/netdebug.o
  LD [M]  /usr/src/linux/fs/ocfs2/cluster/ocfs2_nodemanager.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmdomain.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmdebug.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmthread.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmrecovery.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmmaster.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmast.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmconvert.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmlock.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmunlock.o
  LD [M]  /usr/src/linux/fs/ocfs2/dlm/ocfs2_dlm.o
  CC [M]  /usr/src/linux/fs/ocfs2/dlmfs/userdlm.o
/usr/src/linux/fs/ocfs2/dlmfs/userdlm.c:24:10: fatal error: ocfs2_lockingver.h: No such file or directory
 #include "ocfs2_lockingver.h"
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [/usr/src/linux-5.3.13-1/scripts/Makefile.build:282: /usr/src/linux/fs/ocfs2/dlmfs/userdlm.o] Error 1
make[2]: *** [/usr/src/linux-5.3.13-1/scripts/Makefile.build:498: /usr/src/linux/fs/ocfs2/dlmfs] Error 2
make[1]: *** [/usr/src/linux-5.3.13-1/Makefile:1641: _module_/usr/src/linux/fs/ocfs2] Error 2
make: *** [/usr/src/linux-5.3.13-1/Makefile:179: sub-make] Error 2
make: Leaving directory '/usr/src/linux-5.3.13-1-obj/x86_64/default'


Thanks
Gang

> -----Original Message-----
> From: yamada.masahiro at socionext.com
> [mailto:yamada.masahiro at socionext.com]
> Sent: 2019?12?25? 11:46
> To: Gang He <GHe@suse.com>; ocfs2-devel at oss.oracle.com
> Cc: masahiroy at kernel.org
> Subject: RE: Cannot compile ocfs2 kernel module directory
> 
> Hi Gang,
> 
> I think the reason is Kbuild tries to search the headers under
> /lib/modules/`uname -r`/build.
> 
> I'd like to recommend to make header paths really relative if you want to keep
> your previous way for building this module.
> 
> I attached a patch.
> 
> Thanks.
> 
> 
> 
> -----Original Message-----
> From: Gang He <GHe@suse.com>
> Sent: Tuesday, December 24, 2019 1:55 PM
> To: ocfs2-devel at oss.oracle.com
> Cc: Yamada, Masahiro/?? ?? <yamada.masahiro@socionext.com>
> Subject: Cannot compile ocfs2 kernel module directory
> 
> Hi List,
> 
> I cannot compile ocfs2 kernel module directory with the below command,
> sles15sp2b1-nd2:/usr/src/linux/fs/ocfs2 # make -C /lib/modules/`uname
> -r`/build M=`pwd` modules
> make: Entering directory '/usr/src/linux-5.3.13-1-obj/x86_64/default'
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/heartbeat.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/masklog.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/sys.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/nodemanager.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/quorum.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/tcp.o
>   CC [M]  /usr/src/linux/fs/ocfs2/cluster/netdebug.o
>   LD [M]  /usr/src/linux/fs/ocfs2/cluster/ocfs2_nodemanager.o
>   CC [M]  /usr/src/linux/fs/ocfs2/dlm/dlmdomain.o
> /usr/src/linux/fs/ocfs2/dlm/dlmdomain.c:23:10: fatal error:
> cluster/heartbeat.h: No such file or directory  #include "cluster/heartbeat.h"
>           ^~~~~~~~~~~~~~~~~~~~~
> compilation terminated.
> make[3]: *** [/usr/src/linux-5.3.13-1/scripts/Makefile.build:282:
> /usr/src/linux/fs/ocfs2/dlm/dlmdomain.o] Error 1
> make[2]: *** [/usr/src/linux-5.3.13-1/scripts/Makefile.build:498:
> /usr/src/linux/fs/ocfs2/dlm] Error 2
> make[1]: *** [/usr/src/linux-5.3.13-1/Makefile:1641:
> _module_/usr/src/linux/fs/ocfs2] Error 2
> make: *** [../../../linux-5.3.13-1/Makefile:179: sub-make] Error 2
> make: Leaving directory '/usr/src/linux-5.3.13-1-obj/x86_64/default'
> 
> If I remove the kernel commit
> 9cc342f6c4a06ea613ddef1bcaa25409260aec63/
> 9cc342f6c4a06ea613ddef1bcaa25409260aec63,
> the above command can works again.
> In the past, that command line is always OK.
> 
> Thanks
> Gang

  parent reply	other threads:[~2019-12-25  7:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24  4:55 [Ocfs2-devel] Cannot compile ocfs2 kernel module directory Gang He
     [not found] ` <2967264abe074c74be8e01f0a3fa04da@SOC-EX01V.e01.socionext.com>
2019-12-25  7:00   ` Gang He [this message]
     [not found]     ` <CAK7LNAR+_8kgmNBDETJB-AXuLAtmiuPMLN_iKLfHKBVPqwV=Dw@mail.gmail.com>
2019-12-26  8:08       ` Gang He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH2PR18MB3206BAD26F3F4C6BD962426ECF280@CH2PR18MB3206.namprd18.prod.outlook.com \
    --to=ghe@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.