Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make error on osx #1

Open
cn0xroot opened this issue May 12, 2020 · 10 comments
Open

make error on osx #1

cn0xroot opened this issue May 12, 2020 · 10 comments

Comments

@cn0xroot
Copy link

Hi,this project is cool,I try to use it on mac,but can't build it:

make

Scanning dependencies of target gnuradio-tempest
[  4%] Building CXX object lib/CMakeFiles/gnuradio-tempest.dir/Hsync_impl.cc.o
[  8%] Building CXX object lib/CMakeFiles/gnuradio-tempest.dir/sampling_synchronization_impl.cc.o
/Users/x/sdr/gr-tempest/lib/sampling_synchronization_impl.cc:53:39: error: expected '(' for function-style cast or type construction
              d_gen(std::random_device{}())
                    ~~~~~~~~~~~~~~~~~~^
1 error generated.
make[2]: *** [lib/CMakeFiles/gnuradio-tempest.dir/sampling_synchronization_impl.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-tempest.dir/all] Error 2
make: *** [all] Error 2
info:
osx 10.14.6
gnuradio 3.7.13.5

any ideal to fix it? thanks.

@git-artes
Copy link
Owner

Mmmm I see that the random number generation is giving more problems than I expected. I will look up for a more "universal" replacement.
best and thanks for the feedback.

@06opoTeHb
Copy link

I have almost the same
make && sudo make install
Scanning dependencies of target gnuradio-tempest
[ 4%] Building CXX object lib/CMakeFiles/gnuradio-tempest.dir/Hsync_impl.cc.o
[ 8%] Building CXX object lib/CMakeFiles/gnuradio-tempest.dir/sampling_synchronization_impl.cc.o
/Users/06/Downloads/gr-tempest/lib/sampling_synchronization_impl.cc:53:39: error: expected '(' for function-style
cast or type construction
d_gen(std::random_device{}())
~~~~~~~~~~~~~~~~~~^
1 error generated.
make[2]: *** [lib/CMakeFiles/gnuradio-tempest.dir/sampling_synchronization_impl.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-tempest.dir/all] Error 2
make: *** [all] Error 2

OS X 10.15.4
GNU Radio Companion 3.7.13.5
Any idea?
Thank you.

@git-artes
Copy link
Owner

Hi. Did you try using the -std=c++11 when compiling?

@06opoTeHb
Copy link

Hi. Did you try using the -std=c++11 when compiling?

Thanks for the answer. No, I haven't tried it. Where can I try to add this parameter?

@git-artes
Copy link
Owner

You should remove at least CMakeCache.txt (or the whole build directory) and re-run cmake with the flag, like so (from the build directory):
cmake -std=gnu++11 ..
let me know if that works. I should probably add this to the cmake files...

@06opoTeHb
Copy link

Unfortunately, this did not lead to a positive result. I hope you can help with fix this error.
Thank you.

cmake -std=gnu++11 ..txt
make.txt

@git-artes
Copy link
Owner

I don't have a mac to check, but I've used a pull request from another OOT of mine (git-artes/gr-isdbt#22), which I now integrated into gr-tempest. Let me know if it works.
Make sure to uninstall gr-tempest, delete the whole build folder, update your local files and then re-compile.

@06opoTeHb
Copy link

Thank you very much! All components are installed perfectly! But now a new problem has appeared. After starting gnuradio, the program does not see the gr-tempest blocks. Can you help with this?
cmake ..:.txt
make && sudo make install.txt

gnuradio-companion
(process:9003): Gtk-WARNING **: 09:47:40.236: Locale not supported by C library.
Using the fallback 'C' locale.
<<< Welcome to GNU Radio Companion 3.7.13.5 >>
Block paths:
/opt/local/share/gnuradio/grc/blocks
Loading: "/Users/06/Downloads/gr-tempest/examples/semi_automatic_tempest_hdmi_example.grc"
Block key "tempest_framing" not found
Block key "tempest_normalize_flow" not found
Block key "tempest_sampling_synchronization" not found
'>>> Done
Снимок экрана 2020-06-03 в 9 58 25 AM

@06opoTeHb
Copy link

06opoTeHb commented Jun 3, 2020

To fix this error, I found that NTGTC installs its blocks along this path: /usr/local/share/gnuradio/grc/blocks
I edited file /opt/local/etc/gnuradio/conf.d/grc.conf as follows:

This file contains system wide configuration data for GNU Radio.
You may override any setting on a per-user basis by editing
~/.gnuradio/config.conf

[grc]
global_blocks_path = /opt/local/share/gnuradio/grc/blocks
local_blocks_path = /usr/local/share/gnuradio/grc/blocks
default_flow_graph =
xterm_executable =
canvas_font_size = 8
canvas_default_size = 1280, 1024

and launched gnuradio-companion

The program started correctly. But now at startup I have new error: No module named tempest

gnuradio-companion
<<< Welcome to GNU Radio Companion 3.7.13.5 >>>

Block paths:
/usr/local/share/gnuradio/grc/blocks
/opt/local/share/gnuradio/grc/blocks
Loading: "/Users/06/Downloads/gr-tempest/examples/semi_automatic_tempest_hdmi_example.grc"

Done

Generating: '/Users/06/Downloads/gr-tempest/examples/semi_automatic_tempest_example.py'
Executing: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u /Users/06/Downloads/gr-tempest/examples/semi_automatic_tempest_example.py

Traceback (most recent call last):
File "/Users/06/Downloads/gr-tempest/examples/semi_automatic_tempest_example.py", line 31, in
import tempest
ImportError: No module named tempest

Done (return code 1)

Do you have any ideas how to fix this?

@git-artes
Copy link
Owner

Hi,
Glad it worked. Now you're having trouble with your python installation. Did you check that you have PYTHONPATH set correctly (though I'm not sure how the python path is set on OSX)? It should point to /usr/local/lib/python2.7/dist-packages (though again, it depends on the system, so I'm not sure where it is located OSX).
best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants