lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.32k stars 307 forks source link

make fail on Xubuntu 16.04 #78

Closed wwdok closed 4 years ago

wwdok commented 4 years ago

Below is the verbose, please have a look ~


rpdzkj@rpdzkj:~$ sudo apt install -y libgtk-3-dev build-essential gcc g++ pkg-config make hostapd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
g++ is already the newest version (4:5.3.1-1ubuntu1).
gcc is already the newest version (4:5.3.1-1ubuntu1).
make is already the newest version (4.1-6).
pkg-config is already the newest version (0.29.1-0ubuntu1).
libgtk-3-dev is already the newest version (3.18.9-1ubuntu3.3).
hostapd is already the newest version (1:2.4-0ubuntu6.6).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
rpdzkj@rpdzkj:~$ git clone https://github.com/lakinduakash/linux-wifi-hotspot
Cloning into 'linux-wifi-hotspot'...
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 1026 (delta 11), reused 13 (delta 6), pack-reused 1001
Receiving objects: 100% (1026/1026), 456.68 KiB | 10.00 KiB/s, done.
Resolving deltas: 100% (626/626), done.
Checking connectivity... done.
rpdzkj@rpdzkj:~$ cd linux-wifi-hotspot
rpdzkj@rpdzkj:~/linux-wifi-hotspot$ make
mkdir -p build
Run 'sudo make install' for installation.
Run 'sudo make uninstall' for uninstallation.
cd src && make
make[1]: Entering directory '/home/rpdzkj/linux-wifi-hotspot/src'
/usr/lib/aarch64-linux-gnu/glib-2.0/glib-compile-resources ui/glade/wifih.gresource.xml --target=ui/resources.c --sourcedir=ui/glade --generate-source
XMLLINT not set and xmllint not found in path; skipping xml preprocessing.
make[2]: Entering directory '/home/rpdzkj/linux-wifi-hotspot/src'
gcc -c -o ../build/main.o ui/main.c `pkg-config --cflags gtk+-3.0`
gcc -c -o ../build/ui.o ui/ui.c `pkg-config --cflags gtk+-3.0`
ui/ui.c: In function 'entry_ssid_warn':
ui/ui.c:211:22: warning: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
         size_t len = strlen(ssid);
                      ^
ui/ui.c:211:22: warning: incompatible implicit declaration of built-in function 'strlen'
ui/ui.c:211:22: note: include '<string.h>' or provide a declaration of 'strlen'
ui/ui.c: In function 'entry_pass_warn':
ui/ui.c:243:22: warning: incompatible implicit declaration of built-in function 'strlen'
         size_t len = strlen(pass);
                      ^
ui/ui.c:243:22: note: include '<string.h>' or provide a declaration of 'strlen'
ui/ui.c: In function 'entry_channel_warn':
ui/ui.c:274:19: warning: implicit declaration of function 'strdup' [-Wimplicit-function-declaration]
         char *c = strdup(channel);
                   ^
ui/ui.c:274:19: warning: incompatible implicit declaration of built-in function 'strdup'
ui/ui.c:294:20: warning: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
         } else if (strcmp(configValues.freq, "2.4") == 0) {
                    ^
ui/ui.c: In function 'run_create_hp_shell':
ui/ui.c:620:15: warning: implicit declaration of function 'strcat' [-Wimplicit-function-declaration]
         cmd = strcat( cmd, " --freq-band ");
               ^
ui/ui.c:620:15: warning: incompatible implicit declaration of built-in function 'strcat'
ui/ui.c:620:15: note: include '<string.h>' or provide a declaration of 'strcat'
ui/ui.c:640:13: warning: implicit declaration of function 'strcspn' [-Wimplicit-function-declaration]
         buf[strcspn(buf, "\n")] = 0;
             ^
ui/ui.c:640:13: warning: incompatible implicit declaration of built-in function 'strcspn'
ui/ui.c:640:13: note: include '<string.h>' or provide a declaration of 'strcspn'
ui/ui.c:643:13: warning: implicit declaration of function 'strstr' [-Wimplicit-function-declaration]
         if (strstr(buf, AP_ENABLED) != NULL) {
             ^
ui/ui.c:643:13: warning: incompatible implicit declaration of built-in function 'strstr'
ui/ui.c:643:13: note: include '<string.h>' or provide a declaration of 'strstr'
ui/ui.c: In function 'validator':
ui/ui.c:665:22: warning: incompatible implicit declaration of built-in function 'strlen'
         size_t len = strlen(cv->pass);
                      ^
ui/ui.c:665:22: note: include '<string.h>' or provide a declaration of 'strlen'
ui/ui.c:675:22: warning: incompatible implicit declaration of built-in function 'strlen'
         size_t len = strlen(cv->ssid);
                      ^
ui/ui.c:675:22: note: include '<string.h>' or provide a declaration of 'strlen'
ui/ui.c:704:17: warning: incompatible implicit declaration of built-in function 'strdup'
         char *c=strdup(cv->channel);
                 ^
ui/ui.c: In function 'init_config_val_input':
ui/ui.c:744:14: warning: incompatible implicit declaration of built-in function 'strcspn'
         wifi[strcspn(wifi, "\n")] = 0;
              ^
ui/ui.c:744:14: note: include '<string.h>' or provide a declaration of 'strcspn'
gcc -c -o ../build/h_prop.o ui/h_prop.c `pkg-config --cflags gtk+-3.0`
gcc -c -o ../build/util.o ui/util.c `pkg-config --cflags gtk+-3.0`
g++ -c -o ../build/read_config.o ui/read_config.cpp
ui/read_config.cpp: In function 'int read_config_file()':
ui/read_config.cpp:64:18: error: 'delimiterPos' does not name a type
             auto delimiterPos = line.find('=');
                  ^
ui/read_config.cpp:65:18: error: 'name' does not name a type
             auto name = line.substr(0, delimiterPos);
                  ^
ui/read_config.cpp:66:18: error: 'value' does not name a type
             auto value = line.substr(delimiterPos + 1);
                  ^
ui/read_config.cpp:68:31: error: 'value' was not declared in this scope
             strcpy(configs[i],value.c_str());
                               ^
ui/read_config.cpp:69:29: error: 'name' was not declared in this scope
             setConfigValues(name.c_str(),configs[i]);
                             ^
Makefile:39: recipe for target '../build/read_config.o' failed
make[2]: *** [../build/read_config.o] Error 1
make[2]: Leaving directory '/home/rpdzkj/linux-wifi-hotspot/src'
Makefile:32: recipe for target 'resources.c' failed
make[1]: *** [resources.c] Error 2
make[1]: Leaving directory '/home/rpdzkj/linux-wifi-hotspot/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
lakinduakash commented 4 years ago

What is the version of your gcc compiler? type gcc -v

wwdok commented 4 years ago

gcc -v

rpdzkj@rpdzkj:~/linux-wifi-hotspot$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.5.0-12ubuntu1~16.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64 --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 5.5.0 20171010 (Ubuntu/Linaro 5.5.0-12ubuntu1~16.04) 

em, seems 5.5.0 is out of date, which gcc version do you suggest ?

lakinduakash commented 4 years ago

Use gcc 8or above. gcc 9 is better.

wwdok commented 4 years ago

Hi, i upgrade gcc version to 9, after installation and type wihotspot, it reports error:

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): Gtk-WARNING **: Theme parsing error: style.css:7:13: Missing name of pseudo-class

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_get_style_context: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_style_context_add_class: assertion 'GTK_IS_STYLE_CONTEXT (context)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(wihotspot-gui:3285): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_label_set_label: assertion 'GTK_IS_LABEL (label)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_combo_box_text_insert: assertion 'GTK_IS_COMBO_BOX_TEXT (combo_box)' failed
Couldn't open config file for reading.

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_progress_bar_pulse: assertion 'GTK_IS_PROGRESS_BAR (pbar)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_progress_bar_pulse: assertion 'GTK_IS_PROGRESS_BAR (pbar)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_label_set_label: assertion 'GTK_IS_LABEL (label)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_editable_set_editable: assertion 'GTK_IS_EDITABLE (editable)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_sensitive: assertion 'GTK_IS_WIDGET (widget)' failed

(wihotspot-gui:3285): Gtk-CRITICAL **: gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed