Bugs item #3077238, was opened at 2010-09-28 15:01
Message generated for change (Comment added) made by wschnitker
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106744&aid=3077238&group_id=6744

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build System
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wolfgang Schnitker (wschnitker)
Assigned to: Alex Joni (alex_joni)
Summary: comp compiles with errors

Initial Comment:
Building a module out of dualbipod.c from step4linux results in some errors.

On my system I have to change following:

COMP is wrong in this line

ifeq ($(BUILDSYS),kbuild)
modules:
$(MAKE) -C $(KERNELDIR) SUBDIRS=$(shell pwd) CC=$(CC) V=0 -o 
$(KERNELDIR)/Module.symvers modules

Error 1: originally there is a $(KDIR)/Module.symvers must be KERNELDIR

Error 2: SUBDIRS needs $(shell pwd) not $('pwd') but this results in nonsense.

After doing this, I still have warnings.

sudo comp --install dualbipod.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=/tmp/tmp625dVT CC=gcc 
V=0 -o /usr/src/linux-headers-2.6.32-122-rtai/Module.symvers modules
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-2.6.32-122-rtai'
CC [M] /tmp/tmp625dVT/dualbipod.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "hal_init" [/tmp/tmp625dVT/dualbipod.ko] undefined!
WARNING: "hal_exit" [/tmp/tmp625dVT/dualbipod.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmp625dVT/dualbipod.ko] undefined!
WARNING: "hal_param_float_new" [/tmp/tmp625dVT/dualbipod.ko] undefined!
WARNING: "hal_ready" [/tmp/tmp625dVT/dualbipod.ko] undefined!
CC /tmp/tmp625dVT/dualbipod.mod.o
LD [M] /tmp/tmp625dVT/dualbipod.ko
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.32-122-rtai'
cp dualbipod.ko /usr/realtime-2.6.32-122-rtai/modules/emc2/

The resulting .ko file is useable and works, but there should be no warnings in 
compilation of a emc2 Module.





----------------------------------------------------------------------

>Comment By: Wolfgang Schnitker (wschnitker)
Date: 2010-09-30 15:27

Message:
Like mentioned in the forum I want to propose following:

Hi there,

after heavy googleing and testing.

My proposal for getting out of this sandpit ist following:

1.) the emc2 modules do not have a Modules.symvers file. This file holds
the dependencies of extern defined functions.
2.) the rtai modules do have this file.

So to get it work to check dependencies to avoid the above mentioned
warnings, we must have a Modules.symvers file too for emc modules.

This is a little more work to do. And when we want to do it, then we
should correct the whole things for modules, like not living in standard
kernel trees.

Advice from kernel.org is to use 

/lib/modules/kernel-vers/extra/rtai and ../emc

My proposal is to use 

/lib/modules/kernel-vers/extra/emc
/lib/modules/kernel-vers/extra/rtai

The next point is, if we do so:

The kernel Makefile syntax for external modules was changed, this is not
dramatically but we can write it shorter in our template.

New line for rtai modules would be:

$(MAKE) -C $(KERNELDIR) M=$(RTAIMOD)  O=$(RTAIMOD) 

with

RTAIMOD := /lib/modules/linux-2.6.32-122-rtai/modules/extra/rtai
KERNELDIR := /usr/src/linux-headers-2-6-32-rtai

and for emc modules:

$(MAKE) -C $(KERNELDIR) M=$(EMCMOD)  O=$(EMCMOD) 

with

EMCMOD := /lib/modules/linux-2.6.32-122-rtai/modules/extra/emc
KERNELDIR := /usr/src/linux-headers-2-6-32-rtai

If we do it in this way, the O=.... can be omitted.

In former times you have to use KERNEL_EXTMOD Variable for something like
that.

Or, if do NOT want this, we should generate at least the Modules.symvers
file for emc modules.
   


----------------------------------------------------------------------

Comment By: step4linux (gleixner)
Date: 2010-09-29 09:24

Message:
I think it would be wise to split it.
The first part about makefiles is eventually related to
installation/upgrade procedures for 10.04/2.4
On a fresh 10.04/2.4 installation it appears to work.

The second part (warnings from comp): I have seen the same in 8.04/2.3. 
Is that normal behaviour of comp ?


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106744&aid=3077238&group_id=6744

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to