[Click] click package - linking with non-click library

Eddie Kohler kohler at cs.ucla.edu
Mon Mar 27 15:44:23 EST 2006


Hi Gesly,

It looks like you got beyond this problem.  Are you using an up-to-date 
CVS-based Click installation?  We are currently working on the package 
compiling and linking system, and it no longer uses click-compile.

Eddie


Ges wrote:
> Hi,
> 
> I realised that those g++ warnings were due to the -c option of g++.
> 
> As far as I understand, the Makefile eventually creates a .uo file for each of the files. Even though the linkage options are there as part of the g++ options, when I do an "nm filename.uo", I see that the symbols related to the external library are all undefined. 
> 
> All the final "package.uo" created does not seem to have any of the symbols of the element and non-element classes, which is quite surprising to me. I checked the sample.uo created when you run "make install" in the samplepackgae directory given and I saw that all the symbols in the sampleelement is defined in the sample.uo object file. I am not sure what I am messing up for this to happen. 
> 
> Is there any particular place in the Makefile where I can add linkage options so that when the Element n Element classes in my package are compiled they link to the required external libraries. 
> 
> Another issue is with the .ud or .d files. I dont see any .ud or .d files being created. Is this a problem? 
> 
> Some insight into this would be really really helpful. Been trying to figure this out for the last 2 days. 
> 
> Thanks,
> Gesly
> 
> P.S. Another thing I noticed is that, when I copied the package.uo file into /usr0/local/lib, the click program found the object file. This was the case with the samplepackage as well. My install directory for click is /usr0/local/click/. So this problem was there even though the package.uo file was present in /usr0/local/click/lib. 
> 
> 
> 
> 
> -------------------------------------------------------------------------------------------------------------------
>  Hi,
>  I am trying to install my own click package. This package needs to link with another package - gnuradio.
>  
>  I am able to compile the package successfully. But when I try to a configuation using click that uses this package, I face problems. 
>  
>  I noticed a few things in my compliation output that I am posting below:
>  
>  /usr0/local/click/bin/click-compile -t userlevel -DHAVE_CONFIG_H -I. -I. -I. -I/usr0/local/gr/include/gnuradio -pthread -L/usr0/local/gr/lib -lgnuradio-core -lfftw3f -lm -c basicflowgraph.cc -o basicflowgraph.uo
>  g++ -W -Wall -DHAVE_CONFIG_H -DCLICK_USERLEVEL -I/usr0/local/click/share/click/src -I/usr0/local/click/include -g -O2 -MD '-DHAVE_CONFIG_H' '-I.' '-I.' '-I.' '-I/usr0/local/gr/include/gnuradio' '-L/usr0/local/gr/lib' '-lgnuradio-core' '-lfftw3f' '-lm' -c -DCLICK_PACKAGE basicflowgraph.cc -o basicflowgraph3534.o
>  g++: -lgnuradio-core: linker input file unused because linking not done
>  g++: -lfftw3f: linker input file unused because linking not done
>  g++: -lm: linker input file unused because linking not done
>  g++ -W -Wall -shared -o thread '-DHAVE_CONFIG_H' '-I.' '-I.' '-I.' '-I/usr0/local/gr/include/gnuradio' '-L/usr0/local/gr/lib' '-lgnuradio-core' '-lfftw3f' '-lm' basicflowgraph3534.o -o basicflowgraph.uo
>  /bin/sh: line 1: basicflowgraph.d: No such file or directory
>  
>  The above message is just for one of the compiled files. This repeats for everyother compiled file as well. I compiled the package by doing the following:
>  
>  ./configure --prefix=/usr0/local/click --disable-linuxmodule
>  make install
>  
>  I had modified the Makefile to add the linking options, that is being displayed in the output messages. 
>  Since I havent written any element docs, click-elem2man does not find any class definitions. 
>  
>  Now, when I try to run a configuration, the following happens:
>  
>  [root at capri gnuradio]# click simple-rx-test.click
>  While loading package 'gnuradio':
>    can't find required package 'gnuradio.uo'
>    in CLICKPATH or '/usr0/local/lib'
>  requirement 'gnuradio' not available
>  simple-rx-test.click:3: unknown element class 'FromUsrpDevice'
>  simple-rx-test.click:5: unknown element class 'DemodModule'
>  
>  I am not sure how I can get this to run. The .click file has a requires(gnuradio) statement, which is the package I compiled. It looks like the pakage did not get installed. Any ideas on how to fix this? 
>  
>  Thanks,
>  Gesly
>  
> 
> 		
> ---------------------------------
> Yahoo! Travel
>  Find  great deals to the top 10 hottest destinations!
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list