[Click] linking issues

Joonwoo Park joonwpark81 at gmail.com
Tue Sep 18 12:52:59 EDT 2007


It works!! (at least for me)
Thanks.

Joonwoo Park (Jason Park)

2007/9/19, Eddie Kohler <kohler at cs.ucla.edu>:
> Ugh... this diff seems to fix the problem.  It is checked in.  Sorry guys!
>
>
> diff --git a/include/click/fixconfig.h b/include/click/fixconfig.h
> index 298101a..e979d75 100644 (file)
> --- a/include/click/fixconfig.h
> +++ b/include/click/fixconfig.h
> @@ -1,7 +1,7 @@
>  #ifndef CLICK_FIXCONFIG_H
>  #define CLICK_FIXCONFIG_H 1
>
> -#if CLICK_LINUXMODULE && HAVE_ASM_ALTERNATIVE_H
> +#if CLICK_LINUXMODULE && HAVE_LINUX_ASM_ALTERNATIVE_H
>  // The .smp_locks section and C++-style weak linkage interact badly.
>  # if CONFIG_SMP && (defined(__i386__) || defined(__x86_64__))
>  #  include <asm/alternative.h>
>
>
> Eddie
>
> Adam Greenhalgh wrote:
> > On 9/18/07, Joonwoo Park <joonwpark81 at gmail.com> wrote:
> >> Hi, Adam
> >> Would you like to try configure with -fno-implicit-templates?
> >> (CPPFLAGS="-fno-implicit-templates" CXXFLAGS="-fno-implicit-templates"
> >> ./configure )
> >>
> >> Joonwoo Park (Jason Park)
> >
> > Nope, sorry,
> >
> >
> > LINUX_SRC="/root/eddie/linux-2.6.19.2-latest_click-dell1950.SMP/"
> > NUM_THREADS="8"
> > PREFIX="$PWD/install-dell1950-smp"
> > OPTIONS="--enable-multithread=$NUM_THREADS --disable-userlevel "
> > mkdir -p $PREFIX
> > make clean
> > CPPFLAGS="-fno-implicit-templates" CXXFLAGS="-fno-implicit-templates"
> > ./configure --with-linux=$LINUX_SRC --prefix=$PREFIX $OPTIONS
> > make -j8
> >
> >
> >  CC [M] ksyms.o
> >   LD [M]  /root/click/linuxmodule/proclikefs.o
> >   LD [M]  /root/click/linuxmodule/click.o
> > make[3]: warning:  Clock skew detected.  Your build may be incomplete.
> >   Building modules, stage 2.
> > make[3]: Warning: File `/root/click/linuxmodule/click.o' has
> > modification time 42 s in the future
> >   MODPOST 2 modules
> > WARNING: "_ZN23_HashMap_const_iteratorI8IPFlowIDbEC2EPK7HashMapIS0_bEb"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDiEC1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvE6insertERKS0_S1_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteEC1ERKS1_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvE6removeERKS0_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDiE6insertERKS0_RKi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteE5eraseEPS0_S2_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN11DirectEWMAXI19RateEWMAXParametersILj4ELj10EjiEE8update_nEjj"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN12ARPResponder5EntryEEaSERKS2_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvE4swapERS2_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN23_HashMap_const_iteratorI8IPFlowIDPvEC1EPK7HashMapIS0_S1_Eb"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN12ARPResponder5EntryEED1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDiED1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteE6resizeEiRKS0_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvEC2ES1_P20HashMap_ArenaFactory"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteE4swapERS1_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvE9set_arenaEP20HashMap_ArenaFactory"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvED2Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN11DirectEWMAXI24StabilityEWMAXParametersILj10EyxEE8update_nEyj"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN23_HashMap_const_iteratorI8IPFlowIDPvEppEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN23_HashMap_const_iteratorI9IPAddressjEC1EPK7HashMapIS0_jEb"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN12ARPResponder5EntryEE7reserveEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteE7reserveEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN4IPRw9InputSpecEE7reserveEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN23_HashMap_const_iteratorI8IPFlowIDbEC1EPK7HashMapIS0_bEb"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN5Lexer11ElementTypeEED1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN10Classifier4ExprEE5eraseEPS1_S3_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZNK7HashMapI8IPFlowIDiE9find_pairERKS0_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZNK7HashMapI8IPFlowIDPvE9find_pairERKS0_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN10Classifier4ExprEE7reserveEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN4IPRw9InputSpecEE5eraseEPS1_S3_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN12ARPResponder5EntryEE5eraseEPS1_S3_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN10Classifier4ExprEED1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN4IPRw9InputSpecEED1Ev"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorIN12ARPResponder5EntryEEC1ERKS2_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN7HashMapI8IPFlowIDPvE5clearEv"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_Z6jvcompI12chash_node_tIiEiXadL_ZNS1_3keyEEEEiPKvS3_"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN6VectorI7IPRouteED1Ev" [/root/click/linuxmodule/click.ko]
> > undefined!
> > WARNING: "_ZN6VectorIN5Lexer11ElementTypeEE7reserveEi"
> > [/root/click/linuxmodule/click.ko] undefined!
> > WARNING: "_ZN23_HashMap_const_iteratorI9IPAddressjEC2EPK7HashMapIS0_jEb"
> > [/root/click/linuxmodule/click.ko] undefined!
> >   CC      /root/click/linuxmodule/click.mod.o
> >   CC      /root/click/linuxmodule/proclikefs.mod.o
> >   LD [M]  /root/click/linuxmodule/click.ko
> >   LD [M]  /root/click/linuxmodule/proclikefs.ko
> > make[3]: warning:  Clock skew detected.  Your build may be incomplete.
> > make[2]: Leaving directory
> > `/root/eddie/linux-2.6.19.2-latest_click-dell1950.SMP'
> > make[1]: warning:  Clock skew detected.  Your build may be incomplete.
> > make[1]: Leaving directory `/root/click/linuxmodule'
> >
> >
> >
> >
> >
> >> 2007/9/18, Adam Greenhalgh <a.greenhalgh at cs.ucl.ac.uk>:
> >>> Eddie,
> >>>
> >>> I am seeing this too, I just checked a clean click tree out this
> >>> morning and compiled it on the machine i gave you access too.
> >>>
> >>> Adam
> >>>
> >>> On 9/17/07, Roman Chertov <rchertov at purdue.edu> wrote:
> >>>> Yes, it is set to 1
> >>>>
> >>>> #define HAVE_LINUX_ASM_ALTERNATIVE_H 1
> >>>>
> >>>> Just in case this matters I have Xeon CPUs
> >>>>
> >>>> Roman
> >>>>
> >>>>
> >>>>
> >>>> Eddie Kohler wrote:
> >>>>> Does your include/click/config-linuxmodule.h define
> >>>>> HAVE_LINUX_ASM_ALTERNATIVE_H ?
> >>>>>
> >>>>> Eddie
> >>>>>
> >>>>>
> >>>>> Roman Chertov wrote:
> >>>>>> Hello,
> >>>>>>  I just did git pull, make clean, configure opts, make and got same
> >>>>>> warnings as before.
> >>>>>>
> >>>>>> Roman
> >>>>>>
> >>>>>> Eddie Kohler wrote:
> >>>>>>> I have checked in a potential fix to this linking issue.  Can people
> >>>>>>> test it to see if it works?  Also please test a package, such as
> >>>>>>> etc/samplepackage, to see if that compiles.
> >>>>>>>
> >>>>>>> Thanks Adam especially.
> >>>>>>> Eddie
> >>>>>>>
> >>>>>>>
> >>>>>>> Eddie Kohler wrote:
> >>>>>>>> Later versions of Linux appear to apply some funky code rewriting to
> >>>>>>>> SMP locks.  The SMP LOCK_PREFIX compiles to not only the "lock"
> >>>>>>>> instruction, but also a special reference in the ".smp_locks"
> >>>>>>>> section that points to that instruction.  When running on a
> >>>>>>>> uniprocessor, Linux will dynamically replace that "lock" byte with
> >>>>>>>> some sort of noop.
> >>>>>>>>
> >>>>>>>> Probably the solution is for Click to replace Linux's LOCK_PREFIX
> >>>>>>>> with its own version for its own code.
> >>>>>>>>
> >>>>>>>> Eddie
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Adam Greenhalgh wrote:
> >>>>>>>>> linux-2.6.19.2/include/asm-x86_64/alternative.h line 120 ish... is
> >>>>>>>>> what we think is causing this . I think there is an i386 version too.
> >>>>>>>>>
> >>>>>>>>> Adam
> >>>>>>>>>
> >>>>>>>>> On 9/14/07, Eddie Kohler <kohler at cs.ucla.edu> wrote:
> >>>>>>>>>> I just do not get this message ever.
> >>>>>>>>>>
> >>>>>>>>>> Help!!
> >>>>>>>>>>
> >>>>>>>>>> Eddie
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Roman Chertov wrote:
> >>>>>>>>>>> Hi Eddie,
> >>>>>>>>>>>     I now seem to get the warning all the time.  I also tried to
> >>>>>>>>>>> build
> >>>>>>>>>>> with --with-linux=/lib/modules/2.6.19/build and I got the same
> >>>>>>>>>>> result. I
> >>>>>>>>>>> did the usual ./configure opts, make clean, make sequence.
> >>>>>>>>>>>
> >>>>>>>>>>> Roman
> >>>>>>>>>>>
> >>>>>>>>>>> Eddie Kohler wrote:
> >>>>>>>>>>>> Hi Roman,
> >>>>>>>>>>>>
> >>>>>>>>>>>> How frustrating that you only get the warnings sometimes!
> >>>>>>>>>>>>
> >>>>>>>>>>>> So my ./configure line refers to a Linux build tree under
> >>>>>>>>>>>> /lib/modules.  Have you tried a --with-linux line like that?  e.g.
> >>>>>>>>>>>> --with-linux=/lib/modules/2.6.19.2-whatever/build ?
> >>>>>>>>>>>>
> >>>>>>>>>>>> Eddie
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> rchertov at purdue.edu wrote:
> >>>>>>>>>>>>> Quoting Eddie Kohler <kohler at cs.ucla.edu>:
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> Hi Roman,
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I should have resolved this last night by adding Linux's
> >>>>>>>>>>>>>> $(CPPFLAGS)
> >>>>>>>>>>>>>> to the link line; at least it worked for Adam.  Are you at HEAD?
> >>>>>>>>>>>>>> (git pull)  Have you "make clean"ed?
> >>>>>>>>>>>>> Just did the git pull, make clean, and make and got the warnings.
> >>>>>>>>>>>>> Although
> >>>>>>>>>>>>> sometimes I don't get them.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> This is my config line just in case.
> >>>>>>>>>>>>> ./configure --prefix=/home/rchertov/ \
> >>>>>>>>>>>>> --with-linux=/scratch/rchertov/linux-2.6.19.2/ \
> >>>>>>>>>>>>> --enable-intel-cpu --enable-multithread=8 \
> >>>>>>>>>>>>> --disable-userlevel --enable-experimental
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> Roman
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>> E
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> rchertov at purdue.edu wrote:
> >>>>>>>>>>>>>>> Hello,
> >>>>>>>>>>>>>>>    I got the latest Click with git today and I am having some
> >>>>>>>>>>>>>>> interesting
> >>>>>>>>>>>>>>> messages during linking.  I am not too strong on linking but
> >>>>>>>>>>>>>>> these
> >>>>>>>>>>>>>> messages
> >>>>>>>>>>>>>>> imply that not all is well in the linking land.  Any idea
> >>>>>>>>>>>>>>> what this
> >>>>>>>>>>>>>>> could
> >>>>>>>>>>>>>> be?
> >>>>>>>>>>>>>>>   CC [M] ksyms.o
> >>>>>>>>>>>>>>>   LD [M]  /home/rchertov/click-1.6/linuxmodule/click.o
> >>>>>>>>>>>>>>>   LD [M]  /home/rchertov/click-1.6/linuxmodule/proclikefs.o
> >>>>>>>>>>>>>>> ld: `.gnu.linkonce.t._ZN19ContextErrorHandlerD1Ev' referenced in
> >>>>>>>>>>>>>>> section
> >>>>>>>>>>>>>>> `.smp_locks' of
> >>>>>>>>>>>>>>> /home/rchertov/click-1.6/linuxmodule/confparse.o:
> >>>>>>>>>>>>>>> defined
> >>>>>>>>>>>>>> in
> >>>>>>>>>>>>>>> discarded section
> >>>>>>>>>>>>>>> `.gnu.linkonce.t._ZN19ContextErrorHandlerD1Ev' of
> >>>>>>>>>>>>>>> /home/rchertov/click-1.6/linuxmodule/confparse.o
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> ld: `.gnu.linkonce.t._ZN6VectorI6StringED1Ev' referenced in
> >>>>>>>>>>>>>>> section
> >>>>>>>>>>>>>> `.smp_locks'
> >>>>>>>>>>>>>>> of /home/rchertov/click-1.6/linuxmodule/lexer.o: defined in
> >>>>>>>>>>>>>>> discarded
> >>>>>>>>>>>>>> section
> >>>>>>>>>>>>>>> `.gnu.linkonce.t._ZN6VectorI6StringED1Ev' of
> >>>>>>>>>>>>>>> /home/rchertov/click-1.6/linuxmodule/lexer.o
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Thanks,
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> Roman
> >>>>>>>>>>>>>>> _______________________________________________
> >>>>>>>>>>>>>>> click mailing list
> >>>>>>>>>>>>>>> click at amsterdam.lcs.mit.edu
> >>>>>>>>>>>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>>>>>>>> _______________________________________________
> >>>>>>>>>> click mailing list
> >>>>>>>>>> click at amsterdam.lcs.mit.edu
> >>>>>>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>>>>>>>>
> >>>>>>>> _______________________________________________
> >>>>>>>> click mailing list
> >>>>>>>> click at amsterdam.lcs.mit.edu
> >>>>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>>>>> _______________________________________________
> >>>>>>> click mailing list
> >>>>>>> click at amsterdam.lcs.mit.edu
> >>>>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>>>>>
> >>>> _______________________________________________
> >>>> click mailing list
> >>>> click at amsterdam.lcs.mit.edu
> >>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>>
> >>> _______________________________________________
> >>> click mailing list
> >>> click at amsterdam.lcs.mit.edu
> >>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >>>
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list