LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-11-2006, 09:52 AM   #1
The00Dustin
Member
 
Registered: Jan 2006
Posts: 68

Rep: Reputation: 15
configure: error: C compiler cannot create executables


I am trying to get Net-SNMP to work with LM_Sensors, and so far, it has been a fruitless fight. LM_Sensors is working fine, and Net-SNMP is working fine, but I see nothing from LM_Sensors even when I do an snmpwalk showing every bit of information available. I have followed more than one howto to no avail. I am trying to compile a version of Net-SNMP so it will work, and this is the command and error that I get:
Code:
[09:32:17] admin@ded-1.amkh.com - ~/net-snmp-5.3> sudo ./configure --with-mib-modules=ucd-snmp/lmSensors --with-ldflags=lsensors
checking what to build and install...  agent apps man local mibs
using default "enterprise.net-snmp"
using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs..."
using default notifications "NET-SNMP-MIB::netSnmpNotifications"
using OS default send buffer size for server sockets
using OS default recv buffer size for server sockets
using OS default send buffer size for client sockets
using OS default recv buffer size for client sockets
checking if I need to feed myself to ksh... no
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
Also, it should be noted that if I leave off the "--with-ldflags-lsensors" compilation will complete just fine. Finally, this is the output from config.log:
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by Net-SNMP configure 5.3, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ ./configure --with-mib-modules=ucd-snmp/lmSensors --with-ldflags=lsensors

## --------- ##
## Platform. ##
## --------- ##

hostname = ded-1.amkh.com
uname -m = i686
uname -r = 2.6.9-11.ELsmp
uname -s = Linux
uname -v = #1 SMP Wed Jun 8 17:54:20 CDT 2005

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/kerberos/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /home/admin/bin
PATH: /usr/kerberos/sbin
PATH: /usr/local/sbin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1979: checking what to build and install
configure:1981: result:  agent apps man local mibs
configure:2899: result: using default "enterprise.net-snmp"
configure:2941: result: using default enterprise sysOID "NET-SNMP-MIB::netSnmpAgentOIDs..."
configure:2983: result: using default notifications "NET-SNMP-MIB::netSnmpNotifications"
configure:3104: result: using OS default send buffer size for server sockets
configure:3130: result: using OS default recv buffer size for server sockets
configure:3156: result: using OS default send buffer size for client sockets
configure:3182: result: using OS default recv buffer size for client sockets
configure:3279: checking if I need to feed myself to ksh
configure:3295: result: no
configure:3367: checking for gcc
configure:3383: found /usr/bin/gcc
configure:3393: result: gcc
configure:3637: checking for C compiler version
configure:3640: gcc --version </dev/null >&5
gcc (GCC) 3.4.4 20050721 (Red Hat 3.4.4-2)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3643: $? = 0
configure:3645: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
configure:3648: $? = 0
configure:3650: gcc -V </dev/null >&5
gcc: `-V' option must have argument
configure:3653: $? = 1
configure:3676: checking for C compiler default output file name
configure:3679: gcc   lsensors conftest.c  >&5
gcc: lsensors: No such file or directory
configure:3682: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "Net-SNMP"
| #define PACKAGE_TARNAME "net-snmp"
| #define PACKAGE_VERSION "5.3"
| #define PACKAGE_STRING "Net-SNMP 5.3"
| #define PACKAGE_BUGREPORT "net-snmp-coders@lists.sourceforge.net"
| #define CONFIGURE_OPTIONS "'--with-mib-modules=ucd-snmp/lmSensors' '--with-ldflags=lsensors'"
| #define SCAPI_AUTHPRIV 1
| #define NO_DUMMY_VALUES 1
| #define OPAQUE_SPECIAL_TYPES 1
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:3721: error: C compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

AGENTLIBS=''
AGENT_INCLUDES=''
ALLOCA=''
AUTOCONF=''
AUTOHEADER=''
CC='gcc'
CCPATH=''
CFLAGS=''
CONFIGURE_OPTIONS='"'--with-mib-modules=ucd-snmp/lmSensors' '--with-ldflags=lsensors'"'
COPY_PERSISTENT_FILES=''
CPP=''
CPPFLAGS=''
DEFAULT_MIBDIRS=''
DEFAULT_MIBS=''
DEFS=''
DEVFLAGS=''
DLLIBS=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EMBEDPERLINSTALL=''
EMBEDPERLUNINSTALL=''
ENV_SEPARATOR=''
EXEEXT=''
EXTRACPPFLAGS=''
FIND=''
GNU_vpath=''
HAVE_DMALLOC_H=''
HELPER_INCLUDES=''
INSTALL_DATA=''
INSTALL_PREFIX=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS='lsensors'
LIBOBJS=''
LIBS=''
LIBTOOL=''
LIBTOOLFLAGS=''
LIBTOOL_DEPS=''
LN_S=''
LPSTAT_PATH=''
LTLIBOBJS=''
MAINSUBS=' agent apps man local mibs'
MIBGROUP_INCLUDES=''
MODULE_LIST=''
NON_GNU_VPATH=''
OBJEXT=''
OTHERAGENTLIBLOBJS=''
OTHERAGENTLIBOBJS=''
PACKAGE_BUGREPORT='net-snmp-coders@lists.sourceforge.net'
PACKAGE_NAME='Net-SNMP'
PACKAGE_STRING='Net-SNMP 5.3'
PACKAGE_TARNAME='net-snmp'
PACKAGE_VERSION='5.3'
PATH_SEPARATOR=':'
PERLARGS=''
PERLINSTALLTARGS=''
PERLLDOPTS=''
PERLPROG=''
PERLTARGS=''
PERLUNINSTALLTARGS=''
PERSISTENT_DIRECTORY=''
PSCMD=''
PSPROG=''
RANLIB=''
RELEASEVERSION=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SNMPCONFPATH=''
SNMPD='snmpd$(EXEEXT)'
SNMPLIBPATH=''
SNMPLIB_INCLUDES=''
SNMPSHAREPATH=''
STRIP=''
TOP_INCLUDES=''
TRAPLIBS='$(TRAPDWITHAGENT)'
UCDPERSISTENT_DIRECTORY=''
UNAMEPROG=''
USETRAPLIBS='$(USEAGENTLIBS)'
VERSION=''
WHOAMI=''
WRAPLIBS=''
ac_ct_CC='gcc'
ac_ct_RANLIB=''
ac_ct_STRIP=''
agent_module_list=''
agent_module_list_c=''
agent_module_list_h=''
agent_module_list_lo=''
agent_module_list_o=''
agentgroup_list_lo=''
agentgroup_list_o=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
default_mibs_install=''
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
installucdheaders=''
installucdlibs=''
krb5_config=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mib_module_list=''
mib_module_list_c=''
mib_module_list_h=''
mib_module_list_lo=''
mib_module_list_o=''
mibgroup_list_lo=''
mibgroup_list_o=''
module_list=''
module_list_c=''
module_list_h=''
module_list_lo=''
module_list_o=''
oldincludedir='/usr/include'
other_agentobjs=''
other_lagentobjs=''
other_lobjs_list=''
other_objs_list=''
other_src_list=''
other_trapd_objects=''
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
security_hdr_list=''
security_lobj_list=''
security_obj_list=''
security_src_list=''
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''
transport_hdr_list=''
transport_lobj_list=''
transport_obj_list=''
transport_src_list=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define CONFIGURE_OPTIONS "'--with-mib-modules=ucd-snmp/lmSensors' '--with-ldflags=lsensors'"
#define NO_DUMMY_VALUES 1
#define OPAQUE_SPECIAL_TYPES 1
#define PACKAGE_BUGREPORT "net-snmp-coders@lists.sourceforge.net"
#define PACKAGE_NAME "Net-SNMP"
#define PACKAGE_STRING "Net-SNMP 5.3"
#define PACKAGE_TARNAME "net-snmp"
#define PACKAGE_VERSION "5.3"
#define SCAPI_AUTHPRIV 1

configure: exit 77
I apologize for starting with such a large post, but I don't know where to begin to troubleshoot (beyond a few basic things I already did try [sort of shooting in the dark]). Any help greatly appreciated.

EDIT: After searching some more, I found sample test.c programs to try to compile. gcc successfully created executables that worked fine, but it returned this error in the process:
Quote:
test.c:3: warning: return type of 'main' is not `int'
Anyway, I'm no closer to a solution, but I thought I might bypass what appears to be a typical first response to this problem by adding this info. Thanks.

Last edited by The00Dustin; 01-11-2006 at 10:11 AM.
 
Old 01-11-2006, 11:49 AM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
That looks like a bug in the configure process. It should really be -lsensors where it shows just "lsensors".
 
Old 01-11-2006, 02:33 PM   #3
The00Dustin
Member
 
Registered: Jan 2006
Posts: 68

Original Poster
Rep: Reputation: 15
That did it. Talk about simple. I don know if I typoed or if the directions I saw were for an older version, but the install went smoothly. I still can get LM_Sensors data from SNMP, though. Figures.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
configure: error: C++ compiler cannot create executables dicou Linux - Newbie 15 12-22-2012 01:00 PM
configure: error: C compiler cannot create executables watashiwaotaku7 Linux - General 7 10-22-2009 09:40 AM
error: "c compiler cannot create executables" when trying to run ./configure fedoraemu Linux - Software 2 04-24-2007 07:43 PM
configure error - C compiler cannot create executables MrLobster Linux - Software 1 12-24-2005 12:13 AM
configure: error: C compiler cannot create executables strimp099 Linux - Software 2 07-11-2005 07:23 PM


All times are GMT -5. The time now is 05:39 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration