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

don't build on kali 2018.3a - missing "NetworkManager.h" #45

Open
RobertoD91 opened this issue Oct 22, 2018 · 3 comments
Open

don't build on kali 2018.3a - missing "NetworkManager.h" #45

RobertoD91 opened this issue Oct 22, 2018 · 3 comments

Comments

@RobertoD91
Copy link

Hi, on kali 2018.3a, even after installing network-manager-dev i get this error:

[ 93%] Building CXX object src/CMakeFiles/routerkeygen.dir/wifi/QWifiManager.cpp.o
In file included from /root/Desktop/routerkeygenPC/src/wifi/QWifiManager.cpp:31:
/root/Desktop/routerkeygenPC/src/wifi/QWifiManagerPrivateUnix.h:16:10: fatal error: NetworkManager.h: File o directory non esistente
 #include <NetworkManager.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/routerkeygen.dir/build.make:863: src/CMakeFiles/routerkeygen.dir/wifi/QWifiManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:218: src/CMakeFiles/routerkeygen.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Error while building
@tsiebecker
Copy link

tsiebecker commented Feb 13, 2019

4.19.0-kali1-amd64 , exactly the same, SOLUTION to this:

[ 93%] Building CXX object src/CMakeFiles/routerkeygen.dir/wifi/QWifiManager.cpp.o In file included from /root/Downloads/routerkeygenPC/src/wifi/QWifiManager.cpp:31: /root/Downloads/routerkeygenPC/src/wifi/QWifiManagerPrivateUnix.h:16:10: fatal error: NetworkManager.h: Datei oder Verzeichnis nicht gefunden #include <NetworkManager.h> ^~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [src/CMakeFiles/routerkeygen.dir/build.make:863: src/CMakeFiles/routerkeygen.dir/wifi/QWifiManager.cpp.o] Fehler 1 make[1]: *** [CMakeFiles/Makefile2:218: src/CMakeFiles/routerkeygen.dir/all] Fehler 2 make: *** [Makefile:152: all] Fehler 2 Error while building

  1. git clone --recursive https://github.com/tsiebecker/routerkeygenPC.git
  2. run routerkeygenPC/./build_linux.sh
  3. be happy
  4. if you don't trust my repo, also a step by step solution:

Download Kali-usable Version: (commit I tested it with, newer should work too)
RealEnder@5c7bc07
(git clone --recursive https://github.com/RealEnder/routerkeygenPC.git)

sudo apt install -y cmake build-essential libqt4-dev libqt4-dev libqt4-dev-bin qt4-dev-tools libssl-dev network-manager-dev libsystemd-dev libnm-*

Then download NetworkManager from git: (commit I tested it with, newer should work too)
NetworkManager/NetworkManager@1280991
(git clone --recursive https://github.com/NetworkManager/NetworkManager.git)

copy all files from NetworkManager/libnm/ to routerkeygenPC/src/wifi/
modify routerkeygenPC/NetworkManager.h :

#ifndef NETWORKMANAGER_H
#define NETWORKMANAGER_H

#define NETWORKMANAGER_H_INSIDE

#include "nm-dbus-interface.h"

#undef NETWORKMANAGER_H_INSIDE

#endif /* NETWORKMANAGER_H */

(delete other includes)

modify routerkeygenPC/src/wifi/QWifiManagerPrivateUnix.h :

#ifndef QWIFIMANAGERPRIVATEUNIX_H_
#define QWIFIMANAGERPRIVATEUNIX_H_

#include "QWifiManagerPrivate.h"
#include "NetworkManager.h"

#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusReply>

class QWifiManagerPrivateUnix: public QWifiManagerPrivate {
Q_OBJECT
public:
QWifiManagerPrivateUnix();
virtual ~QWifiManagerPrivateUnix();
void startScan();
private slots:
void updateAccessPoints();

private:
QDBusInterface * wirelessDevice;
};

#endif /* QWIFIMANAGERPRIVATEUNIX_H_ */

(!!! #include "NetworkManager.h" NOT #include <NetworkManager.h> !!!)

copy all files from NetworkManager/libnm-core/ to routerkeygenPC/src/wifi/
(!!! do NOT override meson.build !!!)
(!!! do NOT override tests/ folder !!!)

now run routerkeygenPC/./build_linux.sh
everything not working because of NetworkManager.h not found should now be resolved

tsiebecker added a commit to tsiebecker/routerkeygenPC that referenced this issue Feb 13, 2019
tsiebecker added a commit to tsiebecker/routerkeygenPC that referenced this issue Feb 13, 2019
tsiebecker added a commit to tsiebecker/routerkeygenPC that referenced this issue Feb 13, 2019
@RealEnder
Copy link
Collaborator

Can you build the commandline version?
https://github.com/routerkeygen/routerkeygenPC#commandline-version

@tsiebecker
Copy link

tsiebecker commented Feb 14, 2019

Yes, building the cli version was possible without the "fix" from above. But in Kali "libnm-gtk-dev" is non-exsistent. So installing the requirements like written in the README is not possible.
Solution:

sudo apt-get install -y cmake build-essential qt5-default libssl-dev qtscript5-dev qttools5-dev qttools5-dev-tools rpm lintian

cli version builds without it, for other version see fix.

P.S.: @RealEnder Big fan, keep up the good work.

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