[okl4-developer] build system cannot find defs of L4_Notify() and L4_WaitNotify() -- short term fix found
Sergio Ruocco
sergio.ruocco at gmail.com
Tue Jun 23 18:39:59 EST 2009
I found a short-term fix: I ripped out some python code from:
okl4_3.0/libs/okl4/SConscript
which adds the relevant "okl4_3.0/arch/..." directories to the source
path sued to build my own Iguana 'example' application, as it is shown
below:
#-------------- this is my foobar app SConscript ------------
Import("*")
#-------------- start ripped code
import os
# Get SRC directory
src_root = Dir('#').srcnode().abspath
# Check architecture exists
arch = env.machine.arch
arch_path = os.path.join('arch', arch, args['package'])
possible_arch_path = os.path.join("cust", args["cust"], "arch", arch,
args["package"])
if os.path.exists(os.path.join(src_root, possible_arch_path)):
arch_path = possible_arch_path
if not os.path.exists(os.path.join(src_root, arch_path)):
print "demotr: architecture %s is not yet supported by libokl4." %
(arch)
arch_path = "#" + arch_path
source = [ arch_path + "/src/*.c", arch_path + "/src/*.spp" ]
#-------------- end ripped code
obj = env.KengeProgram("foobar", source=source, LIBS=["mutex", "c",
"iguana", "gcc"])
cell.add_program(obj)
env.expect_test_data = []
Return("obj")
#--------------
and now the build finds the two functions (although it breaks shortly
afterward because other 'missing' functions, but that should be fixable
in a similar way...).
Anyway, I think that the two L4 functions:
L4_Notify() and L4_WaitNotify()
should be made available to normal programs even without specifying the
machine-specific "arch/" include directory in the build script.
Sergio
Sergio Ruocco wrote:
> I am adapting an old (pre-1.0) Iguana application which uses L4_Notify()
> and L4_WaitNotify().
>
> When I build my project for gumstix (ARM-based) platform using:
>
> $ tools/build.py machine=gumstix project=iguana PYFREEZE=False
> example=demotr-hg
>
> the OKL4 v3.0 build system complains that it cannot find the definitions
> of the two functions anywhere:
>
> ....
> iguana/example/demotr-hg/src/action.c:370: undefined reference to
> `L4_Notify'
> iguana/example/demotr-hg/src/strategist.h:76: undefined reference to
> `L4_WaitNotify'
> ....
>
>
> Thus, in the relevant source file(s) of my project I included a
> subset/all of these:
>
> #include <l4/ipc.h>
> #include <l4/thread.h>
> #include <syscalls.h>
> #include <arch/syscalls.h>
> #include <l4/arch/syscalls.h>
>
> which refer directly or indirectly to:
>
> arch/arm/libs/l4/include/syscalls.h
>
> where the two "missing" functions are declared, but the build still
> fails with the errors above.
>
> Any suggestions ?
>
> Thanks,
>
> Sergio
>
>
>
More information about the Developer
mailing list