alexlee188 / ghpsdr3-alex

Modifications of John Melton's ghpsdr3
GNU General Public License v3.0
63 stars 38 forks source link

Unable to build under Ubuntu 20 #57

Open sq2jul opened 3 years ago

sq2jul commented 3 years ago

I'm trying to build ghpsdr3-alex under Ubuntu 20 and got following error:

g++ -DHAVE_CONFIG_H -I.  -g -O3 -Wall  -ffast-math -fopenmp  -march=native    -g -O2 -MT usrp_server-usrp.o -MD -MP -MF .deps/usrp_server-usrp.Tpo -c -o usrp_server-usrp.o `test -f 'usrp.c' || echo './'`usrp.c
usrp.c: In function ‘bool usrp_init(const char*, const char*)’:
usrp.c:181:40: error: ‘class uhd::device’ has no member named ‘get_max_recv_samps_per_packet’
  181 |         MAX_USRP_RX_BUFFER = usrp.dev->get_max_recv_samps_per_packet();
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usrp.c:182:40: error: ‘class uhd::device’ has no member named ‘get_max_send_samps_per_packet’
  182 |         MAX_USRP_TX_BUFFER = usrp.dev->get_max_send_samps_per_packet();
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usrp.c: In function ‘void* usrp_receiver_thread(void*)’:
usrp.c:339:41: error: ‘class uhd::device’ has no member named ‘recv’
  339 |         size_t num_rx_samps = usrp.dev->recv(
      |                                         ^~~~
usrp.c:342:58: error: ‘RECV_MODE_ONE_PACKET’ is not a member of ‘uhd::device’
  342 |                                             uhd::device::RECV_MODE_ONE_PACKET
      |                                                          ^~~~~~~~~~~~~~~~~~~~
usrp.c:333:9: warning: unused variable ‘elapsed_usec’ [-Wunused-variable]
  333 |     int elapsed_usec = 0, diff_usec = 0;
      |         ^~~~~~~~~~~~
usrp.c:333:27: warning: unused variable ‘diff_usec’ [-Wunused-variable]
  333 |     int elapsed_usec = 0, diff_usec = 0;
      |                           ^~~~~~~~~
usrp.c: In function ‘void* usrp_transmitter_thread(void*)’:
usrp.c:597:23: error: ‘class uhd::device’ has no member named ‘send’
  597 |             usrp.dev->send(&buff->front(), num_tx_samples, md,
      |                       ^~~~
usrp.c:599:30: error: ‘SEND_MODE_ONE_PACKET’ is not a member of ‘uhd::device’
  599 |                 uhd::device::SEND_MODE_ONE_PACKET
      |                              ^~~~~~~~~~~~~~~~~~~~
usrp.c: In function ‘int usrp_process_tx_modulation(float*, int)’:
usrp.c:742:25: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
  742 |             for (i=0; (i<MAX_USRP_TX_BUFFER) && (acc_tx_samples<output_frames_gen); ++i) {
      |                        ~^~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:599: usrp_server-usrp.o] Error 1
make[3]: Leaving directory '/home/sq2jul/projects/ghpsdr3-alex/trunk/src/usrp'
make[2]: *** [Makefile:364: all] Error 2
make[2]: Leaving directory '/home/sq2jul/projects/ghpsdr3-alex/trunk/src/usrp'
make[1]: *** [Makefile:432: all-recursive] Error 1
make[1]: Leaving directory '/home/sq2jul/projects/ghpsdr3-alex'
make: *** [Makefile:364: all] Error 2

I'm assuming that 'uhd' version is incompatible. Currently in my system it is libuhd3.15.0. Any ideas which version is compatible?

frohro commented 3 years ago

Hi Juliusz,

I had a little time to play with this, this evening, and I didn't get as far as you did.  I'm using Ubuntu 20.10.  Are you using 20.04?  I ran into a problem duo to moving to GCC 10.  The new default to -fno-common is causing a lot of problems with the softrock directory at least.  Here is a link to some data on that. https://gcc.gnu.org/gcc-10/porting_to.html  I haven't fixed the issue.  I'm not enough of a C expert to say if the best fix is to add -fcommon or to add externs to the definitions in the header files.  I lean toward the latter.   Here is a sample of the issues I'm getting.

/usr/bin/ld: softrock-listener.o:/home/frohro/Projects/ghpsdr3-alex/trunk/src/softrock/receiver.h:60: multiple definition of `receiver'; softrock-client.o:/home/frohro/Projects/ghpsdr3-alex/trunk/src/softrock/receiver.h:60: first defined here

I was able to fix the errors in the softrock directory by putting "extern" in the .h files and then declaring them in a .c file. There are a whole bunch more similar errors in the dspserver directory, but it's bedtime, so I won't have time to do those fixes tonight.

It looks like most of the developers of this system are no longer using it.  Even I haven't tried to compile it since Ubuntu 18.04.

73,

Rob

KL7NA

On 10/31/20 5:48 PM, sq2jul wrote:

CAUTION: This email originated from outside the Walla Walla University email system.

I'm trying to build ghpsdr3-alex under Ubuntu 20 and got following error:


-march=native -g -O2 -MT usrp_server-usrp.o -MD -MP -MF 
.deps/usrp_server-usrp.Tpo -c -o usrp_server-usrp.o |test -f 'usrp.c' 
|| echo './'|usrp.c
usrp.c: In function ‘bool usrp_init(const char*, const char*)’:
usrp.c:181:40: error: ‘class uhd::device’ has no member named 
‘get_max_recv_samps_per_packet’
181 | MAX_USRP_RX_BUFFER = usrp.dev->get_max_recv_samps_per_packet();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usrp.c:182:40: error: ‘class uhd::device’ has no member named 
‘get_max_send_samps_per_packet’
182 | MAX_USRP_TX_BUFFER = usrp.dev->get_max_send_samps_per_packet();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
usrp.c: In function ‘void* usrp_receiver_thread(void*)’:
usrp.c:339:41: error: ‘class uhd::device’ has no member named ‘recv’
339 | size_t num_rx_samps = usrp.dev->recv(
| ^~~~
usrp.c:342:58: error: ‘RECV_MODE_ONE_PACKET’ is not a member of 
‘uhd::device’
342 | uhd::device::RECV_MODE_ONE_PACKET
| ^~~~~~~~~~~~~~~~~~~~
usrp.c:333:9: warning: unused variable ‘elapsed_usec’ [-Wunused-variable]
333 | int elapsed_usec = 0, diff_usec = 0;
| ^~~~~~~~~~~~
usrp.c:333:27: warning: unused variable ‘diff_usec’ [-Wunused-variable]
333 | int elapsed_usec = 0, diff_usec = 0;
| ^~~~~~~~~
usrp.c: In function ‘void* usrp_transmitter_thread(void*)’:
usrp.c:597:23: error: ‘class uhd::device’ has no member named ‘send’
597 | usrp.dev->send(&buff->front(), num_tx_samples, md,
| ^~~~
usrp.c:599:30: error: ‘SEND_MODE_ONE_PACKET’ is not a member of 
‘uhd::device’
599 | uhd::device::SEND_MODE_ONE_PACKET
| ^~~~~~~~~~~~~~~~~~~~
usrp.c: In function ‘int usrp_process_tx_modulation(float*, int)’:
usrp.c:742:25: warning: comparison of integer expressions of different 
signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]
742 | for (i=0; (i<MAX_USRP_TX_BUFFER) && 
(acc_tx_samples<output_frames_gen); ++i) {
| ~^~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:599: usrp_server-usrp.o] Error 1
make[3]: Leaving directory 
'/home/sq2jul/projects/ghpsdr3-alex/trunk/src/usrp'
make[2]: *** [Makefile:364: all] Error 2
make[2]: Leaving directory 
'/home/sq2jul/projects/ghpsdr3-alex/trunk/src/usrp'
make[1]: *** [Makefile:432: all-recursive] Error 1
make[1]: Leaving directory '/home/sq2jul/projects/ghpsdr3-alex'
make: *** [Makefile:364: all] Error 2

|I'm assuming that 'uhd' version is incompatible. Currently in my 
system it is libuhd3.15.0. Any ideas which version is compatible? |

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub 
<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falexlee188%2Fghpsdr3-alex%2Fissues%2F57&data=04%7C01%7Crob.frohne%40wallawalla.edu%7C4712c2c5a0d746712fdd08d87dffdcff%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637397885184667806%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Od9tuvHTF0Qk1TiIBVeybv2pInmu%2BTQXey%2BdNehxe%2Bo%3D&reserved=0>, 
or unsubscribe 
<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHS2BKWIBQUQWBMJH3M3NTSNSV6DANCNFSM4TGGISHA&data=04%7C01%7Crob.frohne%40wallawalla.edu%7C4712c2c5a0d746712fdd08d87dffdcff%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637397885184677800%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=YbvOB2WuqfdOvddI6DgfTZDhdC8WR9LFWmMaEFOVvxA%3D&reserved=0>.

-- 
Rob Frohne, Ph.D. P.E.
E. F. Cross School of Engineering
Walla Walla University
100 SW 4th Street
College Place, WA 99362
(509) 527-2075
sq2jul commented 3 years ago

Hi Rob!

Yeah... I'm using Ubuntu 20.04 so did not encountered problems with gcc which you have described. Gcc version here is 9.3.0. The only issue I've experienced was (besides one described here ;)) this one -> https://github.com/alexlee188/ghpsdr3-alex/issues/55.

I'm sad because I had hope to use ghpsdr3 under Linux with Apache Labs Anan 10 SDR, but it looks like that whether you are not a Windows user It is only expensive paper clip...

73 Juliusz SQ2JUL

kd0oss commented 3 years ago

Hi Juliusz,

I am working on my version of ghpsdr to get my ANAN10-E working. I have got it mostly working with firmware version 1.50.  It's not ready for release yet due to some bugs I need to track down.  I do however recommend John Melton's G0ORX latest software for Linux LINHPSDR and PIHPSDR available on GitHub.

73

Rick KD0OSS

On 11/1/20 6:51 AM, sq2jul wrote:

Hi Rob!

Yeah... I'm using Ubuntu 20.04 so did not encountered problems with gcc which you have described. Gcc version here is 9.3.0. The only issue I've experienced was (besides one described here ;)) this one ->

55 https://github.com/alexlee188/ghpsdr3-alex/issues/55.

I'm sad because I had hope to use ghpsdr3 under Linux with Apache Labs Anan 10 SDR, but it looks like that whether you are not a Windows user It is only expensive paper clip...

73 Juliusz SQ2JUL

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/alexlee188/ghpsdr3-alex/issues/57#issuecomment-720083377, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7UIGQFH7JPS2EZWX7G733SNVKVNANCNFSM4TGGISHA.

frohro commented 3 years ago

Hi Juliusz,

I finished fixing all the -fno-common problems, and it builds fine for me now.  I'm not having your trouble with my new install of Ubuntu 20.10.  I committed the changes to the repository https://github.com/alexlee188/ghpsdr3-alex. Perhaps you could tell me the process you went through to build it.

73,

Rob

KL7NA

On 11/1/20 4:51 AM, sq2jul wrote:

CAUTION: This email originated from outside the Walla Walla University email system.

Hi Rob!

Yeah... I'm using Ubuntu 20.04 so did not encountered problems with gcc which you have described. Gcc version here is 9.3.0. The only issue I've experienced was (besides one described here ;)) this one ->

55

https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falexlee188%2Fghpsdr3-alex%2Fissues%2F55&data=04%7C01%7Crob.frohne%40wallawalla.edu%7C9fd4325f4fd84785548708d87e64dd46%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637398318957980751%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hmGbByIL2ifmfNrEISnfDnVGopiwzBdeqSw1xcxbZAw%3D&reserved=0.

I'm sad because I had hope to use ghpsdr3 under Linux with Apache Labs Anan 10 SDR, but it looks like that whether you are not a Windows user It is only expensive paper clip...

73 Juliusz SQ2JUL

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Falexlee188%2Fghpsdr3-alex%2Fissues%2F57%23issuecomment-720083377&data=04%7C01%7Crob.frohne%40wallawalla.edu%7C9fd4325f4fd84785548708d87e64dd46%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637398318957990750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=n0wyI2Q1TD5JJjb8%2BGoNfgA4l5MWRZvbqXyOb8v%2FyvA%3D&reserved=0, or unsubscribe https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHS2BIONVJTKQHLHODGC33SNVKVLANCNFSM4TGGISHA&data=04%7C01%7Crob.frohne%40wallawalla.edu%7C9fd4325f4fd84785548708d87e64dd46%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637398318957990750%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=6ILLyXeDis3ta0xpfwfQZL1AMIPR5ufa%2F4LwLgiovZw%3D&reserved=0.

-- Rob Frohne, Ph.D. P.E. E. F. Cross School of Engineering Walla Walla University 100 SW 4th Street College Place, WA 99362 (509) 527-2075