LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-26-2004, 04:09 PM   #1
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Rep: Reputation: 30
C++ Compiling Error


Heyas,

I just installed Slackware 9.1 on my laptop last night. Today I went to make sure things were working correctly, I tried to compile a simple Hello World application in KDevelop(C++) and I get an error(status 77). I went to the project directory and tried to run ./configure manually. I got this feedback:

* cd /home/tathlyn/Projects/test/debug && CXXFLAGS="-O0 -g3" /home/tathlyn/Projects/test/configure --enable-debug=full
* checking for a BSD-compatible install... /usr/bin/ginstall -c
* checking whether build environment is sane... yes
* checking for gawk... gawk
* checking whether make sets $(MAKE)... yes
* checking for g++... g++
* checking for C++ compiler default output...
* configure: error: C++ compiler cannot create executables
* See `config.log' for more details.

Is there some C++ plug in for gcc that I need to get? I thought all that was needed was g++ to compile C++ programs. Since I did this install on an older computer, I didnt want to do a full install, so I could save some HD space and it is quite possible I did not install a package that I actually need. I just do not know how to find out if I am missing a package. Perhaps someone else can help me out on this?

Thanks,
Chris
 
Old 04-26-2004, 05:06 PM   #2
rkef
Member
 
Registered: Mar 2004
Location: bursa
Posts: 110

Rep: Reputation: 15
You don't mention if you checked config.log ... could be a permissions problem.

Last edited by rkef; 04-26-2004 at 05:09 PM.
 
Old 04-26-2004, 05:25 PM   #3
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
Well, I tried running ./configure manually from both a user and root. Both come up with the same error.
 
Old 04-26-2004, 06:36 PM   #4
rkef
Member
 
Registered: Mar 2004
Location: bursa
Posts: 110

Rep: Reputation: 15
Quote:
* See `config.log' for more details.
$ cat config.log

and let us know what it says :P
 
Old 04-26-2004, 07:42 PM   #5
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
OK. Here is what I get when I do 'cat config.log' (it is quite long).

$ ./configure
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output... configure: error: C++ compiler cannot create executables
See `config.log' for more details.


$ cat config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.57. Invocation command line was

$ ./configure

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

hostname = hermes
uname -m = i686
uname -r = 2.4.22
uname -s = Linux
uname -v = #6 Tue Sep 2 17:43:01 PDT 2003

/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/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /opt/www/htdig/bin
PATH: /usr/lib/java/bin
PATH: /usr/lib/java/jre/bin
PATH: /opt/kde/bin
PATH: /usr/lib/qt-3.2.1/bin
PATH: /usr/share/texmf/bin


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

configure:1489: checking for a BSD-compatible install
configure:1543: result: /usr/bin/ginstall -c
configure:1554: checking whether build environment is sane
configure:1597: result: yes
configure:1630: checking for gawk
configure:1646: found /usr/bin/gawk
configure:1656: result: gawk
configure:1666: checking whether make sets $(MAKE)
configure:1686: result: yes
configure:1909: checking for g++
configure:1925: found /usr/bin/g++
configure:1935: result: g++
configure:1951: checking for C++ compiler version
configure:1954: g++ --version </dev/null >&5
g++ (GCC) 3.2.3
Copyright (C) 2002 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:1957: $? = 0
configure:1959: g++ -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.2.3/specs
Configured with: ../gcc-3.2.3/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.2.3
configure:1962: $? = 0
configure:1964: g++ -V </dev/null >&5
g++: argument to `-V' missing

configure:1967: $? = 1
configure:1991: checking for C++ compiler default output
configure:1994: g++ conftest.cc >&5
g++: installation problem, cannot exec `as': No such file or directory
configure:1997: $? = 1
configure: failed program was:
| #line 1970 "configure"
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "test"
| #define VERSION "0.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2036: 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_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_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_path_install='/usr/bin/ginstall -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_make_make_set=yes

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

ACLOCAL='${SHELL} /home/tathlyn/Projects/test/missing --run aclocal-1.7'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/tathlyn/Projects/test/missing --run tar'
AUTOCONF='${SHELL} /home/tathlyn/Projects/test/missing --run autoconf'
AUTOHEADER='${SHELL} /home/tathlyn/Projects/test/missing --run autoheader'
AUTOMAKE='${SHELL} /home/tathlyn/Projects/test/missing --run automake-1.7'
AWK='gawk'
CC=''
CCDEPMODE=''
CFLAGS=''
CPPFLAGS=''
CXX='g++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/tathlyn/Projects/test/missing --run makeinfo'
OBJEXT=''
PACKAGE='test'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='0.1'
ac_ct_CC=''
ac_ct_CXX='g++'
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__leading_dot='.'
am__quote=''
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${prefix}/share'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/home/tathlyn/Projects/test/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

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

#define PACKAGE "test"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define VERSION "0.1"

configure: exit 77


This line stood out to me:
g++: installation problem, cannot exec `as': No such file or directory

I get that when I try to do 'g++ test.cpp' as well. I tried this on my desktop(running Slackware 9.1 also) and it worked without a problem. I am completely stumped. I thought maybe I missed some package that I needed, so I reinstalled Slack on this computer and did a full install(I think atleast) and it still gives me this error. What is annoying me is that it works flawlessly on my desktop where I also have a full install.

-Chris-
 
Old 04-26-2004, 08:05 PM   #6
Chryzmo
Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware 10.1
Posts: 180

Original Poster
Rep: Reputation: 30
I actually got it to work. I was missing the binutils package. I'm not quite sure why it wasn't installed, but I found this topic that pointed me in the right direction:

http://www.linuxquestions.org/questi...e+or+directory

and it works now. Thanks rkef, I probably would have skipped right over the config.log without that hint. :P

-Chris-
 
  


Reply



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
Error while Compiling X shashir Linux - Software 1 09-03-2005 06:36 PM
[C++] Compiling error Ossar Programming 2 06-10-2005 03:32 PM
compiling error demmylls Linux - General 15 12-29-2003 12:31 AM
help with compiling error matt_w_lambert Linux From Scratch 2 09-13-2003 12:31 PM
Compiling Error!! teeno Programming 3 08-20-2001 03:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration