* Compile on recipe works the second time
@ 2013-11-19 13:57 Bryan Evenson
2013-11-19 15:47 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Bryan Evenson @ 2013-11-19 13:57 UTC (permalink / raw)
To: yocto@yoctoproject.org
All,
I'm on poky/dylan-9.0.1 and I've created a layer for a separate open source project to include in my image. The layer is at https://github.com/evensonbryan/meta-bacnet for those of you who want to try and duplicate my results. Just add this layer to your setup and build the recipe "bacnet-stack".
I have a very odd build issue. The first time I build the recipe, the build fails during the compile step. However, if I then build the recipe again, the compile completes without errors. For example:
1. bitbake -c clean bacnet-stack
2. bitbake bacnet-stack (compile fails)
3. bitbake bacnet-stack (compile succeeds, rest of image packaging works)
Additionally, the following order compiles without error:
1. bitbake -c clean bacnet-stack
2. bitbake -c devshell bacnet-stack
3. (from devshell) make all (compile succeeds)
This project is divided into a static library and multiple demo applications. The static library needs to be built first, and then the demo applications include the static library in their build. I suspect I have an issue with either populating the static library or the related include files in the sysroot which causes the demo applications to fail to build the first time but work the second. However, I can't figure out how to fix the issue. Any pointers on what is setup wrong with this recipe?
Thanks,
Bryan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compile on recipe works the second time
2013-11-19 13:57 Compile on recipe works the second time Bryan Evenson
@ 2013-11-19 15:47 ` Paul Eggleton
2013-11-19 16:19 ` Bryan Evenson
0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggleton @ 2013-11-19 15:47 UTC (permalink / raw)
To: Bryan Evenson; +Cc: yocto
Hi Bryan,
On Tuesday 19 November 2013 08:57:40 Bryan Evenson wrote:
> I'm on poky/dylan-9.0.1 and I've created a layer for a separate open source
> project to include in my image. The layer is at
> https://github.com/evensonbryan/meta-bacnet for those of you who want to
> try and duplicate my results. Just add this layer to your setup and build
> the recipe "bacnet-stack".
>
> I have a very odd build issue. The first time I build the recipe, the build
> fails during the compile step. However, if I then build the recipe again,
> the compile completes without errors. For example:
>
> 1. bitbake -c clean bacnet-stack
> 2. bitbake bacnet-stack (compile fails)
> 3. bitbake bacnet-stack (compile succeeds, rest of image packaging works)
>
> Additionally, the following order compiles without error:
> 1. bitbake -c clean bacnet-stack
> 2. bitbake -c devshell bacnet-stack
> 3. (from devshell) make all (compile succeeds)
>
> This project is divided into a static library and multiple demo
> applications. The static library needs to be built first, and then the
> demo applications include the static library in their build. I suspect I
> have an issue with either populating the static library or the related
> include files in the sysroot which causes the demo applications to fail to
> build the first time but work the second. However, I can't figure out how
> to fix the issue. Any pointers on what is setup wrong with this recipe?
From bacnet-stack.inc:
> do_install () {
> install -d ${D}${bindir} ${D}${datadir} ${D}${libdir} >
${STAGING_INCDIR}/${PN}
> ...
> install -m 0644 ${S}/include/* ${STAGING_INCDIR}/${PN}
> }
Don't poke files directly into the sysroot like this. Install the headers to
${D}${incdir} instead, and they will be staged to the sysroot for you.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compile on recipe works the second time
2013-11-19 15:47 ` Paul Eggleton
@ 2013-11-19 16:19 ` Bryan Evenson
2013-11-21 15:33 ` Michael Fainstein
0 siblings, 1 reply; 5+ messages in thread
From: Bryan Evenson @ 2013-11-19 16:19 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
Paul,
> -----Original Message-----
> From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> Sent: Tuesday, November 19, 2013 10:47 AM
> To: Bryan Evenson
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Compile on recipe works the second time
>
> Hi Bryan,
>
> On Tuesday 19 November 2013 08:57:40 Bryan Evenson wrote:
> > I'm on poky/dylan-9.0.1 and I've created a layer for a separate open
> > source project to include in my image. The layer is at
> > https://github.com/evensonbryan/meta-bacnet for those of you who want
> > to try and duplicate my results. Just add this layer to your setup
> > and build the recipe "bacnet-stack".
> >
> > I have a very odd build issue. The first time I build the recipe,
> the
> > build fails during the compile step. However, if I then build the
> > recipe again, the compile completes without errors. For example:
> >
> > 1. bitbake -c clean bacnet-stack
> > 2. bitbake bacnet-stack (compile fails) 3. bitbake bacnet-stack
> > (compile succeeds, rest of image packaging works)
> >
> > Additionally, the following order compiles without error:
> > 1. bitbake -c clean bacnet-stack
> > 2. bitbake -c devshell bacnet-stack
> > 3. (from devshell) make all (compile succeeds)
> >
> > This project is divided into a static library and multiple demo
> > applications. The static library needs to be built first, and then
> > the demo applications include the static library in their build. I
> > suspect I have an issue with either populating the static library or
> > the related include files in the sysroot which causes the demo
> > applications to fail to build the first time but work the second.
> > However, I can't figure out how to fix the issue. Any pointers on
> what is setup wrong with this recipe?
>
> From bacnet-stack.inc:
> > do_install () {
> > install -d ${D}${bindir} ${D}${datadir} ${D}${libdir} >
> ${STAGING_INCDIR}/${PN}
> > ...
> > install -m 0644 ${S}/include/* ${STAGING_INCDIR}/${PN} }
>
> Don't poke files directly into the sysroot like this. Install the
> headers to ${D}${incdir} instead, and they will be staged to the
> sysroot for you.
I made the suggested change and I'm still having the same build issue. I pulled the applicable lines from the compile log when I get the failure.
...
make[3]: *** No rule to make target `../../ports/linux/bip-init.o', needed by `libbacnet.a'. Stop.
make[3]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/lib'
make[2]: *** [../../lib/libbacnet.a] Error 2
make[2]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/readprop'
make[1]: *** [readprop.all] Error 2
make[1]: Leaving directory `/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo'
make: *** [demos] Error 2
make: *** Waiting for unfinished jobs....
arm-poky-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --sysroot=/media/sda3/poky/poky-build/tmp/sysroots/at91sam9x5ek -c -Wall -Wmissing-prototypes -Os -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/object -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/demo/handler -Iusr/include/glib-2.0 -I/media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/include `pkg-config --cflags --libs glib-2.0 uuid` -DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -DBAC_ROUTING -DBACDL_BIP=1 -DBBMD_ENABLED=1 -DWEAK_FUNC= -O2 -pipe -g -feliminate-unused-debug-types /media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux/bip-init.c -o /media/sda3/poky/poky-build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-stack-0-7-1/ports/linux/bip-init.o
...
If I'm reading this right, the build of the static library fails because it doesn't know how to build bip-init.o, but immediately after the static library build fails then bip-init.o gets built. Any thoughts on what could be wrong?
Thanks,
Bryan
>
> Cheers,
> Paul
>
> --
>
> Paul Eggleton
> Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compile on recipe works the second time
2013-11-19 16:19 ` Bryan Evenson
@ 2013-11-21 15:33 ` Michael Fainstein
2013-11-25 13:48 ` Bryan Evenson
0 siblings, 1 reply; 5+ messages in thread
From: Michael Fainstein @ 2013-11-21 15:33 UTC (permalink / raw)
To: Bryan Evenson; +Cc: yocto@yoctoproject.org
See below
Michael
> -----Original Message-----
> From: yocto-bounces@yoctoproject.org [mailto:yocto-
> bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> Sent: יום ג 19 נובמבר 2013 18:19
> To: Paul Eggleton
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] Compile on recipe works the second time
>
> Paul,
>
> > -----Original Message-----
> > From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> > Sent: Tuesday, November 19, 2013 10:47 AM
> > To: Bryan Evenson
> > Cc: yocto@yoctoproject.org
> > Subject: Re: [yocto] Compile on recipe works the second time
> >
> > Hi Bryan,
> >
> > On Tuesday 19 November 2013 08:57:40 Bryan Evenson wrote:
> > > I'm on poky/dylan-9.0.1 and I've created a layer for a separate open
> > > source project to include in my image. The layer is at
> > > https://github.com/evensonbryan/meta-bacnet for those of you who
> want
> > > to try and duplicate my results. Just add this layer to your setup
> > > and build the recipe "bacnet-stack".
> > >
> > > I have a very odd build issue. The first time I build the recipe,
> > the
> > > build fails during the compile step. However, if I then build the
> > > recipe again, the compile completes without errors. For example:
> > >
> > > 1. bitbake -c clean bacnet-stack
> > > 2. bitbake bacnet-stack (compile fails) 3. bitbake bacnet-stack
> > > (compile succeeds, rest of image packaging works)
> > >
> > > Additionally, the following order compiles without error:
> > > 1. bitbake -c clean bacnet-stack
> > > 2. bitbake -c devshell bacnet-stack
> > > 3. (from devshell) make all (compile succeeds)
> > >
> > > This project is divided into a static library and multiple demo
> > > applications. The static library needs to be built first, and then
> > > the demo applications include the static library in their build. I
> > > suspect I have an issue with either populating the static library or
> > > the related include files in the sysroot which causes the demo
> > > applications to fail to build the first time but work the second.
> > > However, I can't figure out how to fix the issue. Any pointers on
> > what is setup wrong with this recipe?
> >
> > From bacnet-stack.inc:
> > > do_install () {
> > > install -d ${D}${bindir} ${D}${datadir} ${D}${libdir} >
> > ${STAGING_INCDIR}/${PN}
> > > ...
> > > install -m 0644 ${S}/include/* ${STAGING_INCDIR}/${PN} }
> >
> > Don't poke files directly into the sysroot like this. Install the
> > headers to ${D}${incdir} instead, and they will be staged to the
> > sysroot for you.
>
> I made the suggested change and I'm still having the same build issue. I
> pulled the applicable lines from the compile log when I get the failure.
>
> ...
> make[3]: *** No rule to make target `../../ports/linux/bip-init.o', needed by
> `libbacnet.a'. Stop.
> make[3]: Leaving directory `/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/lib'
> make[2]: *** [../../lib/libbacnet.a] Error 2
> make[2]: Leaving directory `/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/demo/readprop'
> make[1]: *** [readprop.all] Error 2
> make[1]: Leaving directory `/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/demo'
> make: *** [demos] Error 2
> make: *** Waiting for unfinished jobs....
> arm-poky-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork -
> mtune=arm926ej-s -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --
> sysroot=/media/sda3/poky/poky-build/tmp/sysroots/at91sam9x5ek -c -Wall
> -Wmissing-prototypes -Os -I/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/ports/linux -I/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/demo/object -I/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/demo/handler -Iusr/include/glib-2.0 -I/media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/include `pkg-config --cflags --libs glib-2.0 uuid` -
> DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -
> DBAC_ROUTING -DBACDL_BIP=1 -DBBMD_ENABLED=1 -DWEAK_FUNC= -O2
> -pipe -g -feliminate-unused-debug-types /media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-
> stack/bacnet-stack-0-7-1/ports/linux/bip-init.c -o /media/sda3/poky/poky-
> build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> stack-0-7-1/ports/linux/bip-init.o
> ...
>
> If I'm reading this right, the build of the static library fails because it doesn't
> know how to build bip-init.o, but immediately after the static library build
> fails then bip-init.o gets built. Any thoughts on what could be wrong?
>
> Thanks,
> Bryan
>
Try disabling parallel build : add to your recipe
PARALLEL_MAKE = ""
Another option: create 2 recipes: one to build and install library and another to build demo application. Make demo application dependent on library.
Cheers,
Michael
> >
> > Cheers,
> > Paul
> >
> > --
> >
> > Paul Eggleton
> > Intel Open Source Technology Centre
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
This e-mail message is intended for the recipient only and contains information which is CONFIDENTIAL and which may be proprietary to ECI Telecom. If you have received this transmission in error, please inform us by e-mail, phone or fax, and then delete the original and all copies thereof.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Compile on recipe works the second time
2013-11-21 15:33 ` Michael Fainstein
@ 2013-11-25 13:48 ` Bryan Evenson
0 siblings, 0 replies; 5+ messages in thread
From: Bryan Evenson @ 2013-11-25 13:48 UTC (permalink / raw)
To: Michael Fainstein; +Cc: yocto@yoctoproject.org
Michael,
Sorry for the delayed response; was distracted with another task and wasn't able to try things out for the last few days. Response below.
> -----Original Message-----
> From: Michael Fainstein [mailto:Michael.Fainstein@ecitele.com]
> Sent: Thursday, November 21, 2013 10:33 AM
> To: Bryan Evenson
> Cc: yocto@yoctoproject.org
> Subject: RE: [yocto] Compile on recipe works the second time
>
>
>
> See below
>
> Michael
>
>
> > -----Original Message-----
> > From: yocto-bounces@yoctoproject.org [mailto:yocto-
> > bounces@yoctoproject.org] On Behalf Of Bryan Evenson
> > Sent: יום ג 19 נובמבר 2013 18:19
> > To: Paul Eggleton
> > Cc: yocto@yoctoproject.org
> > Subject: Re: [yocto] Compile on recipe works the second time
> >
> > Paul,
> >
> > > -----Original Message-----
> > > From: Paul Eggleton [mailto:paul.eggleton@linux.intel.com]
> > > Sent: Tuesday, November 19, 2013 10:47 AM
> > > To: Bryan Evenson
> > > Cc: yocto@yoctoproject.org
> > > Subject: Re: [yocto] Compile on recipe works the second time
> > >
> > > Hi Bryan,
> > >
> > > On Tuesday 19 November 2013 08:57:40 Bryan Evenson wrote:
> > > > I'm on poky/dylan-9.0.1 and I've created a layer for a separate
> > > > open source project to include in my image. The layer is at
> > > > https://github.com/evensonbryan/meta-bacnet for those of you who
> > want
> > > > to try and duplicate my results. Just add this layer to your
> > > > setup and build the recipe "bacnet-stack".
> > > >
> > > > I have a very odd build issue. The first time I build the
> recipe,
> > > the
> > > > build fails during the compile step. However, if I then build
> the
> > > > recipe again, the compile completes without errors. For example:
> > > >
> > > > 1. bitbake -c clean bacnet-stack
> > > > 2. bitbake bacnet-stack (compile fails) 3. bitbake bacnet-stack
> > > > (compile succeeds, rest of image packaging works)
> > > >
> > > > Additionally, the following order compiles without error:
> > > > 1. bitbake -c clean bacnet-stack
> > > > 2. bitbake -c devshell bacnet-stack 3. (from devshell) make all
> > > > (compile succeeds)
> > > >
> > > > This project is divided into a static library and multiple demo
> > > > applications. The static library needs to be built first, and
> > > > then the demo applications include the static library in their
> > > > build. I suspect I have an issue with either populating the
> > > > static library or the related include files in the sysroot which
> > > > causes the demo applications to fail to build the first time but
> work the second.
> > > > However, I can't figure out how to fix the issue. Any pointers
> on
> > > what is setup wrong with this recipe?
> > >
> > > From bacnet-stack.inc:
> > > > do_install () {
> > > > install -d ${D}${bindir} ${D}${datadir} ${D}${libdir} >
> > > ${STAGING_INCDIR}/${PN}
> > > > ...
> > > > install -m 0644 ${S}/include/* ${STAGING_INCDIR}/${PN} }
> > >
> > > Don't poke files directly into the sysroot like this. Install the
> > > headers to ${D}${incdir} instead, and they will be staged to the
> > > sysroot for you.
> >
> > I made the suggested change and I'm still having the same build
> issue.
> > I pulled the applicable lines from the compile log when I get the
> failure.
> >
> > ...
> > make[3]: *** No rule to make target `../../ports/linux/bip-init.o',
> > needed by `libbacnet.a'. Stop.
> > make[3]: Leaving directory `/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/lib'
> > make[2]: *** [../../lib/libbacnet.a] Error 2
> > make[2]: Leaving directory `/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/demo/readprop'
> > make[1]: *** [readprop.all] Error 2
> > make[1]: Leaving directory `/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/demo'
> > make: *** [demos] Error 2
> > make: *** Waiting for unfinished jobs....
> > arm-poky-linux-gnueabi-gcc -march=armv5te -marm -mthumb-interwork -
> > mtune=arm926ej-s -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed --
> > sysroot=/media/sda3/poky/poky-build/tmp/sysroots/at91sam9x5ek -c -
> Wall
> > -Wmissing-prototypes -Os -I/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/ports/linux -I/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/demo/object -I/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/demo/handler -Iusr/include/glib-2.0
> > -I/media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/include `pkg-config --cflags --libs glib-2.0 uuid` -
> > DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -
> > DBAC_ROUTING -DBACDL_BIP=1 -DBBMD_ENABLED=1 -DWEAK_FUNC= -O2 -pipe -
> g
> > -feliminate-unused-debug-types /media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-
> > stack/bacnet-stack-0-7-1/ports/linux/bip-init.c -o
> > /media/sda3/poky/poky-
> > build/tmp/work/arm926ejste-poky-linux-gnueabi/bacnet-stack/bacnet-
> > stack-0-7-1/ports/linux/bip-init.o
> > ...
> >
> > If I'm reading this right, the build of the static library fails
> > because it doesn't know how to build bip-init.o, but immediately
> after
> > the static library build fails then bip-init.o gets built. Any
> thoughts on what could be wrong?
> >
> > Thanks,
> > Bryan
> >
>
> Try disabling parallel build : add to your recipe PARALLEL_MAKE = ""
>
That worked! I'm able to build the clean package the first time now. Although I am getting a QA warning about all the include files being installed but not shipped. This is one part that has always confused me to no end on how to handle static libraries. I know the include files need to make it to sysroot for other applications which use the static library to build properly. However, they don't need to be in the final device image. So do the include files need to be included in the FILES_${PN}-staticdev list and in do_install, or should they be listed in a separate step?
Thanks,
Bryan
> Another option: create 2 recipes: one to build and install library and
> another to build demo application. Make demo application dependent on
> library.
>
> Cheers,
> Michael
>
> > >
> > > Cheers,
> > > Paul
> > >
> > > --
> > >
> > > Paul Eggleton
> > > Intel Open Source Technology Centre
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
>
>
> This e-mail message is intended for the recipient only and contains
> information which is CONFIDENTIAL and which may be proprietary to ECI
> Telecom. If you have received this transmission in error, please inform
> us by e-mail, phone or fax, and then delete the original and all copies
> thereof.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-11-25 13:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-19 13:57 Compile on recipe works the second time Bryan Evenson
2013-11-19 15:47 ` Paul Eggleton
2013-11-19 16:19 ` Bryan Evenson
2013-11-21 15:33 ` Michael Fainstein
2013-11-25 13:48 ` Bryan Evenson
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.