airprobe/gsm-receiver$ make ..........Fix swig 'unrecognized option -pthread' compile error

459 views
Skip to first unread message

Victor Sorokin

unread,
Apr 22, 2020, 10:10:31 PM4/22/20
to gr-gsm

  1. Installed a clean UBUNTU 16.04 64 bit

  2. installed libosmocore

3.sudo apt install gnu radio 3.7.9

  1. installed gr-gsm

5.git clone https://github.com/velichkov/gr-gsm.git

6 vic @ vic: ~ / airprobe / gsm-receiver $ make
(https://github.com/iamckn/airprobe)

  Mistake:
swig error: Unrecognized option -pthread
Use 'swig -help' for available options.
Makefile: 1217: recipe for target '.deps / gsm-generate-stamp' failed
make [5]: *** [.deps / gsm-generate-stamp] Error 1
make [5]: Leaving directory '/ home / vic / airprobe / gsm-receiver / src / lib'
/ bin / bash ../../libtool --tag = CXX --mode = compile g ++ -DHAVE_CONFIG_H -I. -I ../ .. -I -I -I / usr / include -I / usr / include / gnuradio / swig -pthread -I / usr / local / include / -I ../../ src / lib / decoder / openbtsstuff -I / usr / include / python2.7 -g -O1 -Wno-strict-aliasing -Wno-parentheses -g -O2 -Wall -Woverloaded-virtual -MT _gsm_la-gsm.lo -MD -MP -MF .deps / _gsm_la-gsm.Tpo -c -o _gsm_la-gsm.lo test -f 'gsm.cc' || echo './'gsm.cc
libtool: compile: g ++ -DHAVE_CONFIG_H -I. -I ../ .. -I -I -I / usr / include -I / usr / include / gnuradio / swig -pthread -I / usr / local / include / -I ../../ src / lib / decoder / openbtsstuff -I / usr / include / python2.7 -g -O1 -Wno-strict-aliasing -Wno-parentheses -g -O2 -Wall -Woverloaded-virtual -MT _gsm_la-gsm.lo -MD -MP -MF .deps / _gsm_la-gsm.Tpo -c ./gsm.cc -fPIC -DPIC -o .libs / _gsm_la-gsm.o
g ++: error: ./gsm.cc: No such file or directory
g ++: fatal error: no input files
compilation terminated.
Makefile: 750: recipe for target '_gsm_la-gsm.lo' failed
make [4]: ​​*** [_gsm_la-gsm.lo] Error 1
make [4]: ​​Leaving directory '/ home / vic / airprobe / gsm-receiver / src / lib'
Makefile: 880: recipe for target 'all-recursive' failed
make [3]: *** [all-recursive] Error 1
make [3]: Leaving directory '/ home / vic / airprobe / gsm-receiver / src / lib'
Makefile: 421: recipe for target 'all-recursive' failed
make [2]: *** [all-recursive] Error 1
make [2]: Leaving directory '/ home / vic / airprobe / gsm-receiver / src'
Makefile: 576: recipe for target 'all-recursive' failed
make [1]: *** [all-recursive] Error 1
make [1]: Leaving directory '/ home / vic / airprobe / gsm-receiver'
Makefile: 484: recipe for target 'all' failed
make: *** [all] Error 2
vic @ vic: ~ / airprobe / gsm-receiver $

I can’t solve this problem for about two months, I searched the network for solutions periodically. Many have such an error. I somehow managed to install the airprobe package on UBUNTU 16.04 36 bit three times. Now to use go.sh I am converting a file on another computer with 32 bit. But under 32bit Kraken does not work. As I understand it on 64 bit, is that so?
But lately, airprobe has not been put on 16.04 32 bit.
I have suspicions that there is a mandatory installation sequence and I do not follow this.

The error swig error: Unrecognized option -pthread has been fixed long ago -https://github.com/iamckn/airprobe/commits/master
Commits on May 13, 2011

Fix swig 'unrecognized option -pthread' compile error
GNURADIO_CORE_CFLAGS may set '-pthread' which is not parseable by swig,
so we need to explicitly use GNURADIO_CORE_INCLUDEDIR instead.

Also, the GNURADIO_CORE_INCLUDEDIR / swig directory needs to be explicitly
specified in Makefile.common

$ (GNURADIO_CORE_CFLAGS) \ change -I $ (GNURADIO_CORE_INCLUDEDIR) 
 -I $ (GNURADIO_CORE_INCLUDEDIR) / swig \

as well as
"The new version 3.7 GNU Radio is not compatible with AirProbe. You will need to install GNU Radio 3.6. However, neeo from the comments section of this post has created a patch which makes AirProbe compatible with GNU Radio 3.7."
 But airprobe is already with the patch. And in particular the lines

-I $ (GNURADIO_CORE_INCLUDEDIR) 
-I $ (GNURADIO_CORE_INCLUDEDIR) / swig \

fixed on

-I $ (GNURADIO_RUNTIME_INCLUDEDIR) 
-I $ (GNURADIO_RUNTIME_INCLUDEDIR) / swig \

Nikos Balkanas

unread,
Apr 24, 2020, 5:43:36 PM4/24/20
to Victor Sorokin, gr-gsm
Hi,

This is not actually a compilation error, despite you are trying to
compile it. It seems you are passing to swig gcc options and it
doesn't know what to do with it.
Just to be clear. Are you trying to compile gr-gsm or airprobe?

BR
Nikos
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/5d42c043-e90e-42b5-8d20-091411ce232d%40googlegroups.com.

Victor Sorokin

unread,
Apr 24, 2020, 6:23:14 PM4/24/20
to gr-gsm
Hi Nicos
  gr-gsm - set without errors.
I install airprobe, I took versions with a patch for working with gnuradio 3.7.9, I tried different ones trying to fix the error.
Now I tried on Ubuntu 18.04 64 bit and got the same error.
I managed to install airprobe on Ubuntu 16.04 32bit twice, but I can’t remember what I was doing, because then I thought it was because of 32bit. But later and on 32 bit it was no longer possible to install.


Victor Sorokin

unread,
Apr 24, 2020, 6:32:21 PM4/24/20
to gr-gsm

Victor Sorokin

unread,
Apr 24, 2020, 6:36:44 PM4/24/20
to gr-gsm
later CORE was replaced by RUNTIME

сб, 25 апр. 2020 г. в 01:32, Victor Sorokin <mymai...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "gr-gsm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.

Nikos Balkanas

unread,
Apr 24, 2020, 6:59:19 PM4/24/20
to Victor Sorokin, gr-gsm
So, this is an airprobe compilation problem. I don't get it in ubuntu
14.04. I submitted a patch to make airprobe gc 3.7 compatible sometime
ago, but it was about another issue,
to bring their test case up to speed. I will have to check back my
airprobe installation.

BR
Nikos
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/CABd63bHH-W0YjggMEPVGcNZojQiaiE_f4s31CNoyJowXzEvzbA%40mail.gmail.com.

Nikos Balkanas

unread,
Apr 26, 2020, 11:26:22 AM4/26/20
to Victor Sorokin, gr-gsm
Hi Victor,

I downloaded again the zip (airprobe-master.zip) from
https://github.com/iamckn/airprobe and compiled it again.
Using Ubuntu 14.04 x64 and gnuradio 3.7.9.2 compiled from sources
under /usr/local
Compiled without errors and just a few warnings.
You need to compile 2 directories: gsm-receiver and gsmdecode
-> bootstrap
-> configure
-> make all

Conclusion: airprobe doesn't have a problem with gnuradio 3.7.9, just
your PC configuration
Suggestion: Could be that the Ubuntu repository installs gnuradio in a
strange place that you need to update in your PATH, LIBPATH and
Makefiles
Check your conigure and generated Makefiles around the offensive swig
statement and manually try different variables.
To help you more, give us more context around your swig error (+/- 10 lines).
I cannot test against the ubuntu gnuradio release, I have many
dependencies on my installed gnuradio sources:(
If you are succesfull, update us and submit a patch to iamckn.
Else, if you fail, remove ubuntu gnuradio and install gnuradio from sources.

HTH
Nikos

Victor Sorokin

unread,
Apr 29, 2020, 10:36:16 AM4/29/20
to gr-gsm
Web searches for ways to resolve the error have failed.
I tried installing the latest version of SWIG from git but this also did not solve the problem
LOG-AIRPROBE

Nikos Balkanas

unread,
Apr 29, 2020, 11:31:31 AM4/29/20
to Victor Sorokin, gr-gsm
Hi Victor,

I assume these are your latest logs, after you did all your changes.
Seems you are passing to swig a gcc option, -pthread, that swig
doesn't understand. This is an error generated in your bootstrap
and/or configure steps:

384: if /usr/bin/swig -c++ -fvirtual -python -modern -keyword -w511
-outdir . -I -I -I/usr/include -I/usr/include/gnuradio/swig -pthread
-I/usr/local/include/ -I../../src/lib/decoder/openbtsstuff ...

I can successfully build airprobe in my system, Ubuntu 14.04 x64 with
gnuradio 3.7.9.2 compiled from sources:

373: if /usr/bin/swig -c++ -fvirtual -python -modern -keyword -w511
-outdir . -I -I -I/usr/local/include
-I/usr/local/include/gnuradio/swig -I/usr/local/include/
-I../../src/lib/decoder/openbtsstuff...

As you can see they are exactly the same, except the different
gnuradio paths, and the offending -pthread option. Since I cannot
replicate your error, it's up to you if you want to solve it, and
update this list.
I can, however, show you a quick workaround:
Swig options are in gsm-receiver/Makefile.swig:
Go to the first option, SWIG_PYTHON_FLAGS and comment out the -pthread
option. Then make again
Makefile.swig is generated by configure, which is generated by
bootstrap. If you run bootstrap or configure again, you will need to
change the Makefile.swig again, unless you fix them:(

I will attach my logs, for your help.

HTH
Nikos

On Wed, Apr 29, 2020 at 5:36 PM Victor Sorokin <mymai...@gmail.com> wrote:
>
> Web searches for ways to resolve the error have failed.
> I tried installing the latest version of SWIG from git but this also did not solve the problem
>
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/9069f422-f4c9-4fed-abac-72750f1d12d7%40googlegroups.com.
typescript
Message has been deleted

Victor Sorokin

unread,
Apr 29, 2020, 12:39:39 PM4/29/20
to gr-gsm
Nicos, thanks for the help! Now installed again
  cd airprobe
  cd gsmdecode
  ./bootstrap
  ./configure
  make
  cd ..
  cd gsm-receiver
  ./bootstrap
  ./configure && make
got the same error.
Opened Makefile.swig (file in application)
and did not see the -pthread option in SWIG_PYTHON_FLAGS.
-----------------------------------------------------
SWIG_PYTHON_FLAGS = \
-fvirtual \
-python \
-modern \
-keyword \
-w511 \
-outdir .
----------------------------------------------------

I added -pthread and made a make, but the error remained.
 Nicos, what do you think, if I fill the Airprobe, can you download it to try to get an error? Or is it useless?
Makefile.swig

Victor Sorokin

unread,
Apr 29, 2020, 12:45:43 PM4/29/20
to gr-gsm
looked at the Makefile.swig file in the Airprobe folder 32 bit where everything compiled well, but SWIG_PYTHON_FLAGS doesn’t have -pthread

Victor Sorokin

unread,
Apr 29, 2020, 1:16:14 PM4/29/20
to gr-gsm
384: if / usr / bin / swig -c ++ -fvirtual -python -modern -keyword -w511
-outdir. -I -I 
-I / usr / include 

-I / usr / include / gnuradio / swig -pthread
-I / usr / local / include / 
-I ../../ src / lib / decoder / openbtsstuff ...


373: if / usr / bin / swig -c ++ -fvirtual -python -modern -keyword -w511
-outdir. -I -I 
-I / usr / local / include

-I / usr / local / include / gnuradio / swig 
-I / usr / local / include /
-I ../../ SRC / Lib / decoder / openbtsstuff ...

the difference in the way gnuradio with the local folder - can it be fundamental?

Nikos Balkanas

unread,
Apr 29, 2020, 2:42:13 PM4/29/20
to Victor Sorokin, gr-gsm
The difference in the installed directories is not that important.
However, you are using a precompiled gnuradio from Ubuntu,
and you don't know what they've done with it. This could be important.
You can remove your existing gnuradio with apt-get remove,
and then download and install one from sources (not an easy task). or
you can trace where this extra "-thread" is generated.
I hoped that Makefile.swig would be the problem. Unfortunately it
seems it's not. Don't add any -pthread options if it doesn't have it -
you need to get rid of it
:)
Sorry, i cannot replicate your error, without messing up my
configuration, and i can't think where else this "-pthread" could be
generated:(
Of anyone in this list knows more about this problem, they can help:)

Best of luck,
Nikos
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/bbe073f3-d9d9-4428-af4b-8547f07d6aa6%40googlegroups.com.

Victor Sorokin

unread,
Apr 30, 2020, 7:46:20 PM4/30/20
to gr-gsm
Nikos, thanks for trying to help! Get well soon.

Nikos Balkanas

unread,
Apr 30, 2020, 10:32:40 PM4/30/20
to Victor Sorokin, gr-gsm
Just a thought. You said you found an earlier ticket about it...Was it
fixed? What was the solution?

On Fri, May 1, 2020 at 2:46 AM Victor Sorokin <mymai...@gmail.com> wrote:
>
> Nikos, thanks for trying to help! Get well soon.
>
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/ac35fd0b-67ab-482a-b39c-f9319c99dc29%40googlegroups.com.

Victor Sorokin

unread,
May 3, 2020, 6:50:54 PM5/3/20
to gr-gsm
Just a thought. You said you found an earlier ticket about it ... Was it
fixed? What was the solution?

Nicos, I tried to fix the situation for a long time and often it was at night, so when I managed to install airprobe twice on a 32 bit system, I did not remember what I was doing. I thought then that this is due to the bitness of the operating system. But later I could not install on 32 either.

Victor Sorokin

unread,
May 3, 2020, 7:01:23 PM5/3/20
to gr-gsm
Nicos, are you familiar with OsmocomBB? I have a question - Motorola can get the same flow as we get by the gsm_capture command?

Nikos Balkanas

unread,
May 4, 2020, 11:36:23 AM5/4/20
to Victor Sorokin, gr-gsm
Yup, I know osmocombb. Capturing traffic is not the difficult part.
Identifying and decoding it is.
You already have gr-gsm installed. Airprobe is its predecessor. What
do you need it for? Osmocombb is another option.
Uses a hacked motorolla C38 phone to capture and decode calls. Too much hassle:(

BR,
Nikos

On Mon, May 4, 2020 at 2:01 AM Victor Sorokin <mymai...@gmail.com> wrote:
>
> Nicos, are you familiar with OsmocomBB? I have a question - Motorola can get the same flow as we get by the gsm_capture command?
>
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/fbc573aa-7b43-48e0-944a-11270b90f1f5%40googlegroups.com.

Victor Sorokin

unread,
May 4, 2020, 12:21:15 PM5/4/20
to gr-gsm
Yes, I installed gr-gsm, it works.
I use AirProbe with a 32 bit system for do.sh, and for now I have enough of this to study the process of obtaining Kc.

Motorola phone is good because it
1. consumes little current
2. does not load the processor so much
3. It is guaranteed to give good decoding packages.
The burst-ind project outputs packages.

How can Motorola display all traffic, including packets that are encoded?

I saw the offlinehacker / osmocombb project

These tools allows you to analize gsm security, crack and decript raw GSM bursts.

It consists of several additional tools i wrote for analyzing GSM:

gsmcrack.py: allows you to crack raw gsm data using predictions. Has also several automatic tools for deciphering gsm data from phones from which we can't get KC directly.
decocde_burst: allows you to decode raw bursts using key or not.
encode_burst: allows you to encode raw frame data and get raw bursts.

But I have not watched it carefully yet.

Nikos Balkanas

unread,
May 4, 2020, 2:04:07 PM5/4/20
to Victor Sorokin, gr-gsm
The C38 has a usb port,from which you can download the traffic.
For more questions about it, you should address the osmocom group.
I have not heard of any cracking tools for GSM, other than kraken. Did
you write those?

BR
Nikos
> --
> You received this message because you are subscribed to the Google Groups "gr-gsm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gr-gsm+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/gr-gsm/6f88edee-b5dd-4d3a-a37a-9447bf065a41%40googlegroups.com.

Nikos Balkanas

unread,
May 4, 2020, 8:29:45 PM5/4/20
to Victor Sorokin, gr-gsm
*Motorolla C139
Reply all
Reply to author
Forward
0 new messages