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

shmat: Invalid argument #9

Open
digitalhuman opened this issue Dec 30, 2016 · 9 comments
Open

shmat: Invalid argument #9

digitalhuman opened this issue Dec 30, 2016 · 9 comments

Comments

@digitalhuman
Copy link

When running on my Raspberry Pi3 (Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux) with a BladeRF x115 I get this error:

kal -s GSM850 -v -D
debug: FPGA Master Clock Freq: 52000000
debug: decimation : 192
debug: RX Subdev Spec : B
debug: Antenna : RX2
debug: Gain : 0.450000
shmat: Invalid argument
terminate called after throwing an instance of 'std::runtime_error'
what(): circular_buffer: shmat
Aborted

What to do next?

@mikerbts
Copy link

mikerbts commented Jan 4, 2017

Having the same issue here, is it possible this error is being thrown due to us using the applicaiton on an ARM based processor?

@mikerbts
Copy link

mikerbts commented Jan 4, 2017

Any work arounds would be greatly appreciated

@bdheeman
Copy link

bdheeman commented Mar 9, 2017

Same problem here, on Raspberry Pi 3 Model B, (Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux) with bladeRF 40X, I also get the following error:

./kal -s GSM850 -v -D
debug: FPGA Master Clock Freq: 52000000
debug: decimation : 192
debug: RX Subdev Spec : B
debug: Antenna : RX2
debug: Gain : 0.450000
shmat: Invalid argument
terminate called after throwing an instance of 'std::runtime_error'
what(): circular_buffer: shmat
Aborted

@m-zbik
Copy link

m-zbik commented Apr 20, 2017

hi, has anyone manage to solve this issue?

@elcdrue
Copy link

elcdrue commented Aug 27, 2017

For Raspbian use this patch (like branch arm_memory in kalibrate-rtl)

diff --git a/configure.ac b/configure.ac
index 5f4f19a..003bbf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,11 +32,7 @@ AC_SUBST(BLADERF_CFLAGS)
 
 # OSX doesn't support System V shared memory
 AC_CANONICAL_HOST
-case "$host_os" in
-	darwin*)
-		AC_DEFINE([D_HOST_OSX], [], [building for OSX])
-		;;
-esac
+AC_DEFINE([D_HOST_OSX], [], [building for OSX])
 
 AC_CONFIG_FILES([Makefile
                  src/Makefile])
diff --git a/src/Makefile.am b/src/Makefile.am
index 98bc1ef..43fe52e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -21,4 +21,4 @@ kal_SOURCES = \
    version.h
 
 kal_CXXFLAGS = $(FFTW3_CFLAGS) $(USRP_CFLAGS)
-kal_LDADD = $(FFTW3_LIBS) $(USRP_LIBS)
+kal_LDADD = $(FFTW3_LIBS) $(USRP_LIBS) -lrt

@0julio0
Copy link

0julio0 commented Aug 26, 2018

hi @elcdrue could you be more specific? i couldn`t solve this problem.
tks a lot

@decadenza
Copy link

decadenza commented Sep 11, 2018

Same issue here. I've been looking for a solution for 3 days now...
I tried to apply the elcdrue patch, and I got this error:

Error setting RX sampling rate
error: bladeRF_source::open

Any guess?

@x2q
Copy link

x2q commented Nov 6, 2018

+1

@Twilight-Logic
Copy link

Twilight-Logic commented May 8, 2019

Just downloaded and compiled this today on my Raspberry Pi. I am getting the same output as the original poster. Is there a fix yet?

I added the following line to version.h and did a make clean and ran ./configure again:

kal_LDADD = $(FFTW3_LIBS) $(USRP_LIBS) -lrt

However this generates further errors:

In file included from kal.cc:63:0:
version.h:30:1: error: ‘kal_LDADD’ does not name a type
kal_LDADD = $(FFTW3_LIBS) $(USRP_LIBS) -lrt
^~~~~~~~~
kal.cc: In function ‘int main(int, char**)’:
kal.cc:198:5: error: ‘g_verbosity’ was not declared in this scope
g_verbosity++;
^~~~~~~~~~~
Makefile:483: recipe for target 'kal-kal.o' failed
make[2]: *** [kal-kal.o] Error 1
make[2]: Leaving directory '/home/pi/src/kalibrate-rtl/src'
Makefile:376: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/pi/src/kalibrate-rtl'
Makefile:317: recipe for target 'all' failed
make: *** [all] Error 2

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

9 participants