|
Hi all,
I am currently following the instructions for building new signal processing block. I have downloaded complete folder as it was stated. The problem is when I enter folder topdir/src.python and run make check I have the following error: [savi_ne@ts python]$ make check make: *** No rule to make target `check'. Stop. Thanks in advance |
|
Hi nexy_sm,
read again: http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules The command 'make check' is nowhere in the instructions for building a new signal processing block. M On Tue, Oct 09, 2012 at 12:50:38AM -0700, nexy_sm wrote: > Hi all, > > I am currently following the instructions for building new signal processing > block. I have downloaded complete folder as it was stated. The problem is > when I enter folder topdir/src.python and run make check I have the > following error: > > [savi_ne@ts python]$ make check > make: *** No rule to make target `check'. Stop. > > Thanks in advance > > > > -- > View this message in context: http://gnuradio.4.n7.nabble.com/cannot-make-new-signal-processing-block-tp37924.html > Sent from the GnuRadio mailing list archive at Nabble.com. > > _______________________________________________ > Discuss-gnuradio mailing list > [hidden email] > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstraße 12 Building 05.01 76131 Karlsruhe Phone: +49 721 608-43790 Fax: +49 721 608-46071 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Hi all,
in fact, I was following instructions from http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html And the problem was bad reference to the PKG_CONFIG_PATH. I see that in the instructions you sent me and inistructions that I was following, building folders are different. _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
On Tue, Oct 09, 2012 at 12:28:57PM +0200, Nemanja Savic wrote:
> http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html > > And the problem was bad reference to the PKG_CONFIG_PATH. > > I see that in the instructions you sent me and inistructions that I was > following, building folders are different. That's ancient docs... didn't you read the sell-by date? :) Just go to gnuradio.org and follow the instructions. They're really impossible to miss. Johnathan/Tom, can you take that old stuff down? Outdated docs are poison, if you ask me. MB -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstraße 12 Building 05.01 76131 Karlsruhe Phone: +49 721 608-43790 Fax: +49 721 608-46071 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
On Wed, Oct 10, 2012 at 3:55 AM, Martin Braun (CEL)
<[hidden email]> wrote: > On Tue, Oct 09, 2012 at 12:28:57PM +0200, Nemanja Savic wrote: >> http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html >> >> And the problem was bad reference to the PKG_CONFIG_PATH. >> >> I see that in the instructions you sent me and inistructions that I was >> following, building folders are different. > > That's ancient docs... didn't you read the sell-by date? :) > Just go to gnuradio.org and follow the instructions. They're really > impossible to miss. > > Johnathan/Tom, can you take that old stuff down? Outdated docs are > poison, if you ask me. > > MB It's hosted on gnu.org, and I don't have access to edit it. I'll have to contact the FSF webmaster and ask him to remove it. Tom _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Hallo again guys,
I followed instructions on the proposed website. Everything "was fine" until I had to run test. Even when I run make test from gr-how-to-write-block folder which comes with the installation tets fail. Running tests... Start processing tests Test project /home/savi_ne/work/gnuradio/gr-howto/build 1/ 1 Testing qa_howto ***Failed 0% tests passed, 1 tests failed out of 1 The following tests FAILED: 1 - qa_howto (Failed) Errors while running CTest make: *** [test] Error 8 Any suggestions? |
|
On Thu, Oct 11, 2012 at 10:11 AM, nexy_sm <[hidden email]> wrote:
> Hallo again guys, > > I followed instructions on the proposed website. Everything "was fine" until > I had to run test. Even when I run make test from gr-how-to-write-block > folder which comes with the installation tets fail. > > Running tests... > Start processing tests > Test project /home/savi_ne/work/gnuradio/gr-howto/build > 1/ 1 Testing qa_howto ***Failed > > 0% tests passed, 1 tests failed out of 1 > > The following tests FAILED: > 1 - qa_howto (Failed) > Errors while running CTest > make: *** [test] Error 8 > > Any suggestions? Can you run this instead of 'make test': ctest -V That will give more output information about what's happening during the test. Tom _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Ok, I run the suggested command. And the problem is in importing module:
UpdateCTestConfiguration from :/home/savi_ne/work/gnuradio/gr-howto/build/DartConfiguration.tcl Start processing tests UpdateCTestConfiguration from :/home/savi_ne/work/gnuradio/gr-howto/build/DartConfiguration.tcl Test project /home/savi_ne/work/gnuradio/gr-howto/build Constructing a list of tests Done constructing a list of tests Changing directory into /home/savi_ne/work/gnuradio/gr-howto/build/python 1/ 1 Testing qa_howto Test command: /bin/sh /home/savi_ne/work/gnuradio/gr-howto/build/python/qa_howto_test.sh Test timeout computed to be: 9.99988e+06 Traceback (most recent call last): File "/home/savi_ne/work/gnuradio/gr-howto/python/qa_howto.py", line 24, in <module> import howto_swig ImportError: No module named howto_swig -- Process completed ***Failed 0% tests passed, 1 tests failed out of 1 The following tests FAILED: 1 - qa_howto (Failed) Errors while running CTest Any suggestions? In the line that causes the error is written following: import howto_swig # Can't import howto because that module does not yet exist Regards |
|
On Fri, Oct 12, 2012 at 3:47 AM, nexy_sm <[hidden email]> wrote:
> Ok, I run the suggested command. And the problem is in importing module: > > > UpdateCTestConfiguration from > :/home/savi_ne/work/gnuradio/gr-howto/build/DartConfiguration.tcl > Start processing tests > UpdateCTestConfiguration from > :/home/savi_ne/work/gnuradio/gr-howto/build/DartConfiguration.tcl > Test project /home/savi_ne/work/gnuradio/gr-howto/build > Constructing a list of tests > Done constructing a list of tests > Changing directory into /home/savi_ne/work/gnuradio/gr-howto/build/python > 1/ 1 Testing qa_howto > Test command: /bin/sh > /home/savi_ne/work/gnuradio/gr-howto/build/python/qa_howto_test.sh > Test timeout computed to be: 9.99988e+06 > Traceback (most recent call last): > File "/home/savi_ne/work/gnuradio/gr-howto/python/qa_howto.py", line 24, > in <module> > import howto_swig > ImportError: No module named howto_swig > -- Process completed > ***Failed > > 0% tests passed, 1 tests failed out of 1 > > The following tests FAILED: > 1 - qa_howto (Failed) > Errors while running CTest > > Any suggestions? > In the line that causes the error is written following: > import howto_swig # Can't import howto because that module does not yet > exist > > Regards Looks like you haven't done the installation properly. Is the SWIG interface file correct? All of the CMakeLists.txt files updated? What's your install path? If it's not a standard path (/usr, /usr/local) you'll have to make sure Python knows where to find it (PYTHONPATH=...). Have you looked at using gr_modtool.py (https://github.com/mbant/gr-modtool)? It helps make sure the setup is done correctly to install everything properly. Tom _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Python path is OK. Gnuradio works fine, I have tried some examples using GRC, etc.
I also used gr-modtool like it was explained on the website. I haven't looked at swig interface file since it was not part of the tutorial, but I think it should have been generated correctly by gr-modtool. How can I check installation of the SWIG? Anyway I will not have chance to try anything until monday. Regards and thanks |
|
Any suggestions how to make this thing working?
|
|
In reply to this post by nexy_sm
On Fri, Oct 12, 2012 at 2:04 PM, nexy_sm <[hidden email]> wrote:
> Python path is OK. Gnuradio works fine, I have tried some examples using GRC, > etc. Have you verified that that module is actually installed where you think it is? If you are just building the gr-howto-write-a-block like this: cmake -DCMAKE_INSTALL_PREFIX=/opt/howto [path to source]/gr-howto-write-a-block make && sudo make install When you look in /opt/howto/lib/python2.7/dist-packages, you will find a 'howto' directory. Under that, you'll find: howto_swig.py howto_swig.pyc howto_swig.pyo _howto_swig.so __init__.py __init__.pyc __init__.pyo All of those files have to be there. Then, if PYTHONPATH=/opt/howto/lib/python2.7/dist-packages, you can 'import howto' from inside Python. Tom > I also used gr-modtool like it was explained on the website. > I haven't looked at swig interface file since it was not part of the > tutorial, but I think it should have been generated correctly by gr-modtool. > > How can I check installation of the SWIG? > > Anyway I will not have chance to try anything until monday. > > Regards and thanks > > > > -- > View this message in context: http://gnuradio.4.n7.nabble.com/cannot-make-new-signal-processing-block-tp37924p37982.html > Sent from the GnuRadio mailing list archive at Nabble.com. > > _______________________________________________ > Discuss-gnuradio mailing list > [hidden email] > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Finaly it works.
Thanks!!!!!!!!!!!!!!!!!!!!!!! |
|
On Mon, Oct 15, 2012 at 11:24 AM, nexy_sm <[hidden email]> wrote:
> Finaly it works. > Thanks!!!!!!!!!!!!!!!!!!!!!!! That's great! Can you say a few words about what you did to get it working for the benefit of others that might be having problems? Tom _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Of course, that's at least what I can do.
First of all, I would like to say that the biggest problem was lack of my knowledge in Linux. I was strictly following instructions from gnuradio.org about making out of tree signal processing block, and there is not stated that i have to do make install before testing module. Also, nowhere is stated stest -V, for getting more error information, and also using -DCMAKE_INSTALL_PREFIX, whish is used for setting base address or whatever. Maybe somebody should make detailed tutorials, for the people that knows only signal processing, not Linux, just for smooth start, unti they get used. Regards Nemanja |
|
On Tue, Oct 16, 2012 at 02:08:42AM -0700, nexy_sm wrote:
> First of all, I would like to say that the biggest problem was lack of my > knowledge in Linux. > I was strictly following instructions from gnuradio.org about making out of > tree signal processing block, and there is not stated that i have to do > /make install/ before testing module. Hm, you shouldn't need to do that. (That's why it's not in the instructions.) > Also, nowhere is stated stest -V, for getting more error information, and > also using -DCMAKE_INSTALL_PREFIX, whish is used for setting base address or > whatever. That's already what I'd consider 'advanced' usage, which is why it's not in the tutorial, either. Although I guess 'ctest -V' could be in there. > Maybe somebody should make detailed tutorials, for the people that knows > only signal processing, not Linux, just for smooth start, unti they get > used. Since you just went through the process, how about writing something while the knowledge is still fresh? MB -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstraße 12 Building 05.01 76131 Karlsruhe Phone: +49 721 608-43790 Fax: +49 721 608-46071 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Do you mean some kind of tutorial or what?
Well, that means that my test don't work, since you said that make install isn't necesary. So, let's start again, what might be a problem? |
|
On Tue, Oct 16, 2012 at 03:14:31AM -0700, nexy_sm wrote:
> Do you mean some kind of tutorial or what? > > Well, that means that my test don't work, since you said that make install > isn't necesary. > > So, let's start again, what might be a problem? That's still impossible to tell from what you've written. I've just checked that gr_modtool and the tutorial are correct. Here's what I did: 1) Create an out-of-tree module ~/tmp % gr_modtool.py create test Module directory is "./gr-test". Creating directory... Copying howto example... Unpacking... Replacing occurences of 'howto' to 'test'... Done. Use 'gr_modtool add' to add a new block to this currently empty module. 2) Then, I add a sync-block: ~/tmp% cd gr-test tmp/gr-test % gr_modtool.py add -t sync square_ff Operating in directory . GNU Radio module name identified: test Code is of type: sync Block/code identifier: square_ff Enter valid argument list, including default arguments: Add Python QA code? [Y/n] Add C++ QA code? [Y/n] n Traversing lib... Adding file 'square_ff_impl.h'... Adding file 'square_ff_impl.cc'... Adding file 'square_ff.h'... Traversing swig... Editing swig/test_swig.i... Traversing python... Adding file 'qa_square_ff.py'... Editing python/CMakeLists.txt... Traversing grc... Adding file 'test_square_ff.xml'... Editing grc/CMakeLists.txt... 3) Next, I edit the work() function of the block (this only needs one line to be changed) to look like this: Before this is done, the 'make' command won't work! { const float *in = (const float *) input_items[0]; float *out = (float *) output_items[0]; for (int i = 0; i < noutput_items; i++) { out[i] = in[i] * in[i]; } // Tell runtime system how many output items we produced. return noutput_items; } 4) Finally, I edit the file python/qa_square_ff.py such that the test case contains this: Before this is done, the 'make test' or 'ctest' commands won't work! def test_001_t (self): test_data = (1, 2, 3, 4) correct_res = (1, 4, 9, 16) sink = gr.vector_sink_f() self.tb.connect(gr.vector_source_f(test_data), test.square_ff(), sink) self.tb.run() self.assertEqual(sink.data(), correct_res) Then, I go to the build directory and invoke the make process: gr-test/build % cmake .. # Output omitted gr-test/build % make # Output omitted gr-test/build % make test Running tests... Test project /home/braun/tmp/gr-test/build Start 1: test_test 1/2 Test #1: test_test ........................ Passed 0.02 sec Start 2: qa_square_ff 2/2 Test #2: qa_square_ff ..................... Passed 0.23 sec 100% tests passed, 0 tests failed out of 2 The End. This entire process took me less than 10 minutes. If you're taking longer, you're wasting time. Other notes: * I never installed * The only editing necessary was three lines in the work() function and the test case in qa_square_ff So go through your module once again, start from scratch and it will work. MB -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstraße 12 Building 05.01 76131 Karlsruhe Phone: +49 721 608-43790 Fax: +49 721 608-46071 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
In reply to this post by nexy_sm
On Tue, Oct 16, 2012 at 5:08 AM, nexy_sm <[hidden email]> wrote:
> Of course, that's at least what I can do. > > First of all, I would like to say that the biggest problem was lack of my > knowledge in Linux. > I was strictly following instructions from gnuradio.org about making out of > tree signal processing block, and there is not stated that i have to do > /make install/ before testing module. > Also, nowhere is stated stest -V, for getting more error information, and > also using -DCMAKE_INSTALL_PREFIX, whish is used for setting base address or > whatever. > > Maybe somebody should make detailed tutorials, for the people that knows > only signal processing, not Linux, just for smooth start, unti they get > used. > > Regards > Nemanja Unfortunately, you cannot separate the signal processing of SDR from the operating system. You need to understand a bit of each if you're going to do anything really, truly useful. So while you're struggling to get some of this stuff started, you are also learning a lot about Linux and the build tools. This will serve you immeasurably well in the future. I am right now struggling through similar issues with OSX. That having been said, we are slowly producing more information to help people out. Look at the Doxygen manual that get's generated when you install GNU Radio. There's a lot more information in there to help people understand some features of GNU Radio and of the build system. The -V 'trick' for ctest is kind of outside of the scope of GNU Radio. That's something that's documented with ctest. I learned about this myself by just searching for help on getting information out of 'make test.' One of the biggest problems we can have as developers is that we are probably the worst people to document the code, especially features like what you are talking about. It's hard to know what others don't know. A lot of what is on the instructions and manuals that I've put in are because I was just learning something, like using cmake properly, and thought, "oh, this is something that should be documented." We have to rely on people to help us put this together. Tom _______________________________________________ Discuss-gnuradio mailing list [hidden email] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio |
|
Ok, I suppose the best and fastest way to learn gnuradio is by exploring simple existing blocks, like adder for example.
I was first thinking about adder and the opened gr_add_cc.h. I was immediately stuck in the constructor part gr_add_cc::gr_add_cc (size_t vlen) : gr_sync_block ("add_cc", gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen), gr_make_io_signature (1, 1, sizeof (gr_complex)*vlen)), d_vlen (vlen) { } I was expecting something like: gr_add_cc::gr_add_cc (size_t vlen) : gr_sync_block ("add_cc", gr_make_io_signature (1, vlen, sizeof (gr_complex)), gr_make_io_signature (1, 1, sizeof (gr_complex))), d_vlen (vlen) { } I don't really understand this line: gr_make_io_signature (1, -1, sizeof (gr_complex)*vlen) Can you just explain breafly what is idea behind, cause i was expecting something more simpler. Thanks |
| Powered by Nabble | Edit this page |
