LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Conky -1.4.47 compile error (https://www.linuxquestions.org/questions/programming-9/conky-1-4-47-compile-error-588326/)

BashTin 09-30-2007 01:17 AM

Conky -1.4.47 compile error
 
Hi all. Had tried this post in the Slacky forum but they couldn't help mw out (hope I don;t get into trouble for double posting or something). Thought I would try here as I think it is probably a more appropriate forum.

Ok I am trying to compile conky 1.4.7 with wireless support, './configure --enable-wlan'

But the compile fails with.....

checking iwlib.h presence... yes
checking for iwlib.h... yes
checking for iw_sockets_open in -liw... no
configure: error: iw_sockets_open not found

This is a 'snip' from config.log

***********************************************************************
configure:20549: checking iwlib.h presence
configure:20564: gcc -E conftest.c
configure:20570: $? = 0
configure:20584: result: yes
configure:20617: checking for iwlib.h
configure:20625: result: yes
configure:20642: checking for iw_sockets_open in -liw
configure:20677: gcc -o conftest conftest.c -liw >&5
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0x991): In function `iw_freq2float':
: undefined reference to `pow'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0xb76): In function `iw_float2freq':
: undefined reference to `log10'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0xb7e): In function `iw_float2freq':
: undefined reference to `floor'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0xbbf): In function `iw_float2freq':
: undefined reference to `pow'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0xbcf): In function `iw_float2freq':
: undefined reference to `floor'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0x1257): In function `iw_dbm2mwatt':
: undefined reference to `pow'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0x1261): In function `iw_dbm2mwatt':
: undefined reference to `floor'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0x12a0): In function `iw_mwatt2dbm':
: undefined reference to `log10'
/usr/lib/gcc/i486-slackware-linux/3.4.6/../../../libiw.so(iwlib.so)(.text+0x12b0): In function `iw_mwatt2dbm':
: undefined reference to `ceil'
collect2: ld returned 1 exit status
configure:20683: $? = 1
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Conky"
| #define PACKAGE_TARNAME "conky"
| #define PACKAGE_VERSION "1.4.7"
| #define PACKAGE_STRING "Conky 1.4.7"
| #define PACKAGE_BUGREPORT "brenden1@users.sourceforge.net"
| #define PACKAGE "conky"
| #define VERSION "1.4.7"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define OWN_WINDOW 1
| #define HDDTEMP 1
| #define MPD 1
| #define HAVE_IWLIB_H 1
| /* end confdefs.h. */
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char iw_sockets_open ();
| int
| main ()
| {
| return iw_sockets_open ();
| ;
| return 0;
| }
configure:20701: result: no
configure:20706: error: iw_sockets_open not found
***********************************************************************

I have these files...
/usr/include/linux/wireless.h
/usr/include/wireless.h
/usr/include/iwlib.h
/usr/lib/libiw.a

I am running Slacky 11, Linux 2.6.21.6 (i686) with gcc 3.4.6.

I need Conky 1.4.7 as the previous version 1.4.5 does not have wireless support, as I understand it.

As usual any help or ideas would be very much appreciated.

BashTin.

gnashley 09-30-2007 03:18 AM

Looks to me like you need to re-compile libiw with the --enable-shared option. Notice that it is trying to link to iwlib.so which doesn't seem to be on your system.

BashTin 09-30-2007 04:21 AM

Thanks gnashly. You are helping me again :-)

Ok got the slakcy wireless-tools sources, wireless_tools.28.tar.gz, which is the package that contains libiw. Installed it (iwlib.so is built by default).

Conky now configures but make fails with.......

linux.o(.text+0xcbb): In function `update_net_stats':
: undefined reference to `iw_sawap_ntop'
collect2: ld returned 1 exit status
make[2]: *** [conky] Error 1

Do I need to install the wireless-tools sources?? If so where and how?

Thanks again, BashTin.

PS I know I will get into trouble for this but I have a thread about this on Slacky forum which, to be fair, I thought had died. Anyway I will close that thread and keep this one active as it has the more upto date info on my efforts.

BashTin 09-30-2007 05:09 AM

Sorted now. Thanks again gnashly.

Just installed wireless-tools.29 as suggested by H_TeXMeX_H and conky made fine.

Thanks for your help, once again, BashTin.


All times are GMT -5. The time now is 10:49 AM.