Fatal error during compilation of wpa_supplicant. Don't know what to do

6,747

I was able to get it to compile with the help of a couple google searches on the specific errors. The one you got fatal error: openssl/ssl.h: No such file or directory compilation terminated. and the one I got fatal error: netlink/genl/genl.h: No such file or directory compilation terminated after getting past the first one. The upshot is I installed libnl1, libssl-dev and libnl-dev. Use the following command to install them

sudo apt-get install libnl1 libssl-dev libnl-dev

Following that run your make && make install as usual

Note: For the .config I used the one in the archive and just uncommented the lines related to WiFi-Direct rather than the sample pointed to here This compiled fine on Ubuntu 14.04

Share:
6,747

Related videos on Youtube

Little me
Author by

Little me

Relative Noob. I wished that Gem had caught on instead of Windows... It was multi-threading. A love of hard-to-program wetware reduced my love for hardware-software combos.

Updated on September 18, 2022

Comments

  • Little me
    Little me over 1 year

    I'm a relative noob.

    Trying to add WiFi Direct to my 12.04 installation on an old netbook. I was following this advice: How to get wifi direct( wifi p2p) on my HP DM1 laptop?

    First, I downloaded wpa_supplicant-2.3 to the root and unpacked it

    myself@myself-AspireOne:~$ tar -xzf wpa_supplicant-2.3.tar.gz
    myself@myself-AspireOne:~$ cd wpa_supplicant-2.3/wpa_supplicant
    

    Then I created a file called .config from info based at https://wireless.wiki.kernel.org/en/developers/p2p/howto and started the compilation.

    myself@myself-AspireOne:~/wpa_supplicant-2.3/wpa_supplicant$ cp wpa_supplicant.conf /etc/wpa_supplicant.conf
    cp: cannot create regular file `/etc/wpa_supplicant.conf': Permission denied
    myself@myself-AspireOne:~/wpa_supplicant-2.3/wpa_supplicant$ sudo cp wpa_supplicant.conf /etc/wpa_supplicant.conf
    [sudo] password for myself: 
    myself@myself-AspireOne:~/wpa_supplicant-2.3/wpa_supplicant$ sudo make && make install
      CC  config.c
      CC  notify.c
      CC  bss.c
      CC  eap_register.c
      CC  ../src/utils/common.c
      CC  ../src/utils/wpa_debug.c
      CC  ../src/utils/wpabuf.c
      CC  ../src/utils/os_unix.c
      CC  ../src/utils/eloop.c
      CC  config_file.c
      CC  ../src/rsn_supp/wpa.c
      CC  ../src/rsn_supp/preauth.c
      CC  ../src/rsn_supp/pmksa_cache.c
      CC  ../src/rsn_supp/peerkey.c
      CC  ../src/rsn_supp/wpa_ie.c
      CC  ../src/common/wpa_common.c
      CC  p2p_supplicant.c
      CC  ../src/p2p/p2p.c
      CC  ../src/p2p/p2p_utils.c
      CC  ../src/p2p/p2p_parse.c
      CC  ../src/p2p/p2p_build.c
      CC  ../src/p2p/p2p_go_neg.c
      CC  ../src/p2p/p2p_sd.c
      CC  ../src/p2p/p2p_pd.c
      CC  ../src/p2p/p2p_invitation.c
      CC  ../src/p2p/p2p_dev_disc.c
      CC  ../src/p2p/p2p_group.c
      CC  ../src/ap/p2p_hostapd.c
      CC  ../src/utils/bitfield.c
      CC  ../src/eap_peer/eap_tls.c
      CC  ../src/eap_peer/eap_peap.c
      CC  ../src/eap_common/eap_peap_common.c
      CC  ../src/eap_peer/eap_ttls.c
      CC  ../src/eap_peer/eap_md5.c
      CC  ../src/eap_peer/eap_mschapv2.c
      CC  ../src/eap_peer/mschapv2.c
      CC  ../src/eap_peer/eap_gtc.c
      CC  ../src/eap_peer/eap_otp.c
      CC  ../src/eap_peer/eap_leap.c
      CC  wps_supplicant.c
      CC  ../src/utils/uuid.c
      CC  ../src/eap_peer/eap_wsc.c
      CC  ../src/eap_common/eap_wsc_common.c
      CC  ../src/wps/wps.c
      CC  ../src/wps/wps_common.c
      CC  ../src/wps/wps_attr_parse.c
      CC  ../src/wps/wps_attr_build.c
      CC  ../src/wps/wps_attr_process.c
      CC  ../src/wps/wps_dev_attr.c
      CC  ../src/wps/wps_enrollee.c
      CC  ../src/wps/wps_registrar.c
      CC  ../src/eapol_supp/eapol_supp_sm.c
      CC  ../src/eap_peer/eap.c
      CC  ../src/eap_peer/eap_methods.c
      CC  ap.c
      CC  ../src/ap/hostapd.c
      CC  ../src/ap/wpa_auth_glue.c
      CC  ../src/ap/utils.c
      CC  ../src/ap/authsrv.c
      CC  ../src/ap/ap_config.c
      CC  ../src/utils/ip_addr.c
      CC  ../src/ap/sta_info.c
      CC  ../src/ap/tkip_countermeasures.c
      CC  ../src/ap/ap_mlme.c
      CC  ../src/ap/ieee802_1x.c
      CC  ../src/eapol_auth/eapol_auth_sm.c
      CC  ../src/ap/ieee802_11_auth.c
      CC  ../src/ap/ieee802_11_shared.c
      CC  ../src/ap/drv_callbacks.c
      CC  ../src/ap/ap_drv_ops.c
      CC  ../src/ap/beacon.c
      CC  ../src/ap/eap_user_db.c
      CC  ../src/ap/ctrl_iface_ap.c
      CC  ../src/eap_server/eap_server.c
      CC  ../src/eap_server/eap_server_identity.c
      CC  ../src/eap_server/eap_server_methods.c
      CC  ../src/ap/wmm.c
      CC  ../src/ap/ap_list.c
      CC  ../src/ap/ieee802_11.c
      CC  ../src/ap/hw_features.c
      CC  ../src/ap/dfs.c
      CC  ../src/ap/wps_hostapd.c
      CC  ../src/eap_server/eap_server_wsc.c
      CC  ../src/ap/wpa_auth.c
      CC  ../src/ap/wpa_auth_ie.c
      CC  ../src/ap/pmksa_cache_auth.c
      CC  ../src/ap/peerkey_auth.c
      CC  ../src/crypto/ms_funcs.c
    

    All goes nicely until: The compilation eventually hits a snag.

      CC  ../src/eap_common/chap.c
      CC  ../src/eap_peer/eap_tls_common.c
    ../src/crypto/tls_openssl.c:19:25: fatal error: openssl/ssl.h: No such file or directory
    compilation terminated.
    make: *** [../src/crypto/tls_openssl.o] Error 1
    

    Can anyone tell me what exactly is missing, why and how to fix it, using instructions that don't assume a lot of knowledge. This is my first use of the make command.

    Thanks for helping a Noob.

    Also, any suggestions if wpa_gui is safe to use; it asks for system password when ran.

    • Elder Geek
      Elder Geek about 9 years
      Please help us help you by editing your question and adding more information. You've given us only partial output and we don't have the command you issued nor the directory you were in when you issued it. As this is your first use of the make command there are a number of things that could have gone wrong. Unfortunately I can't figure out what with the little information we've been given.
    • Little me
      Little me about 9 years
      Hi @ElderGeek, Thanks for feedback. I have edited the post as requested. Sorry for the partial info and hope what I have added is enough.
    • Elder Geek
      Elder Geek about 9 years
      It appears that what is missing is openssl/ssl.h A quick review of the wpa_supplicant-2.3.tar.gz file you mention shows that it doesn't include that file. The README mentions an optional openssl library. openssl.org (Perhaps this isn't quite so optional in your case) It's up to you to determine the legality of it's usage in your country.
    • Little me
      Little me about 9 years
      Thanks again @ElderGeek. I've found that readme file and downloaded a copy of the openssl-1.0.2.tar.gz but don't know what to do. Do I need (or want?) to include openssl files into the wpa_supplicant tar ball? I really don't know. Ultimate purpose is just wifi direct on netbook. Do you have the time and energy to explain to me? I have looked into legal issues of encryption and am satisfied all is fine.
    • Elder Geek
      Elder Geek about 9 years
      I'm considering the question about wpa_gui a seperate question which if asked seperately would likely be closed here as "opinion based" I'm not going there. softwarerecs.stackexchange.com might be a better stop for that question.
  • pevik
    pevik almost 9 years
    To get netlink/genl/genl.h header you may also need to uncomment CONFIG_LIBNL32=y in .config (source).
  • Elder Geek
    Elder Geek almost 9 years
    Personally, what I did to succeed is listed above.
  • Elder Geek
    Elder Geek almost 9 years
    @pevik Personally, what I did to succeed is outlined above.