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.15k stars 294 forks source link

fatal error: gtk/gtk.h: No such file or directory #276

Open KenichiNishiya opened 1 year ago

KenichiNishiya commented 1 year ago

Describe the bug When running make I have this error:

mkdir -p build
Run 'sudo make install' for installation.
Run 'sudo make uninstall' for uninstallation.
cd src && make
make[1]: Entering directory '/opt/linux-wifi-hotspot/src'
/usr/bin/glib-compile-resources ui/glade/wifih.gresource.xml --target=ui/resources.c --sourcedir=ui/glade --generate-source
make[2]: Entering directory '/opt/linux-wifi-hotspot/src'
gcc -c -o ../build/main.o ui/main.c `pkg-config --cflags gtk+-3.0`
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'gtk+-3.0', required by 'virtual:world', not found
In file included from ui/main.c:28:
ui/ui.h:34:10: fatal error: gtk/gtk.h: No such file or directory
   34 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:35: ../build/main.o] Error 1
make[2]: Leaving directory '/opt/linux-wifi-hotspot/src'
make[1]: *** [Makefile:32: resources.c] Error 2
make[1]: Leaving directory '/opt/linux-wifi-hotspot/src'
make: *** [Makefile:5: all] Error 2

I'm running Fedora 36 and have installed all the packages indicated, including gtk3-devel

To Reproduce Steps to reproduce the behavior:

  1. sudo dnf install -y gtk3-devel gcc gcc-c++ kernel-devel pkg-config make hostapd qrencode-devel libpng-devel
  2. git clone https://github.com/lakinduakash/linux-wifi-hotspot
  3. cd linux-wifi-hotspot
  4. make
KenichiNishiya commented 1 year ago

I found this talking about PKG_CONFIG_PATH environment variable.

echo $PKG_CONFIG_PATH would give me no output. Tried to export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/local/lib/pkgconfig before make and now I have a different error:

mkdir -p build
Run 'sudo make install' for installation.
Run 'sudo make uninstall' for uninstallation.
cd src && make
make[1]: Entering directory '/opt/linux-wifi-hotspot/src'
/usr/bin/glib-compile-resources ui/glade/wifih.gresource.xml --target=ui/resources.c --sourcedir=ui/glade --generate-source
make[2]: Entering directory '/opt/linux-wifi-hotspot/src'
gcc -c -o ../build/resources.o ui/resources.c `pkg-config --cflags gtk+-3.0`
gcc -o ../build/wihotspot-gui ../build/main.o ../build/ui.o ../build/h_prop.o ../build/util.o ../build/read_config.o ../build/about_ui.o ../build/qr_ui.o ../build/qrgen.o ../build/resources.o `pkg-config --cflags gtk+-3.0` `pkg-config --libs gtk+-3.0 --libs x11` -lstdc++ -lpng -lqrencode
/usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: cannot find -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgtk-3.so when searching for -lgtk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: cannot find -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/libgdk-3.so when searching for -lgdk-3
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: cannot find -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libgio-2.0.so when searching for -lgio-2.0
/usr/bin/ld: skipping incompatible /usr/lib/libgobject-2.0.so when searching for -lgobject-2.0
/usr/bin/ld: skipping incompatible /usr/lib/libglib-2.0.so when searching for -lglib-2.0
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: cannot find -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/12/../../../libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /lib/libpng.so when searching for -lpng
/usr/bin/ld: skipping incompatible /usr/lib/libpng.so when searching for -lpng
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:41: wihotspot-gui] Error 1
make[2]: Leaving directory '/opt/linux-wifi-hotspot/src'
make[1]: *** [Makefile:32: resources.c] Error 2
make[1]: Leaving directory '/opt/linux-wifi-hotspot/src'
make: *** [Makefile:5: all] Error 2
lakinduakash commented 1 year ago

Can you check dependencies in https://aur.archlinux.org/packages/linux-wifi-hotspot

KenichiNishiya commented 1 year ago

Everything but iproute2 and wireless_tools are installed, as both of these aren't available on Fedora. Instead of iproute2 I have iproute and iproute-devel though.

awenbober commented 1 year ago

Are all those installed, as i see in tge dependencies list in arch based systems?

On Fri, Oct 14, 2022, 09:30 KenichiNishiya @.***> wrote:

Everything but iproute2 and wireless_tools are installed, as both of these aren't available on Fedora. Instead of iproute2 I have iproute and iproute-devel though.

— Reply to this email directly, view it on GitHub https://github.com/lakinduakash/linux-wifi-hotspot/issues/276#issuecomment-1278449003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJM3Z5VAQRX67EQ3ZFWQIK3WDDLGTANCNFSM6AAAAAAREZCJRE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

KenichiNishiya commented 1 year ago

Aside from gtk3, none of these exists on Fedora, maybe they have other names, but searching here doesn't give me any package with similar name.These are all the packages that match with gtk3.

KenichiNishiya commented 1 year ago

Running sudo find / -iname "*gtk+-3.0*" tells me that the file exists on this directory /usr/lib/pkgconfig/gtk+-3.0.pc

Mhowser commented 1 year ago

I'm having the same problem in Steam OS 3.4.8 and I do have gtk3 installed.

Edit: gtk is good, now I'm missing limits.h