LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Configure: error: C++ compiler cannot create executables. (https://www.linuxquestions.org/questions/linux-newbie-8/configure-error-c-compiler-cannot-create-executables-840499/)

Xlaits 10-26-2010 06:37 AM

Configure: error: C++ compiler cannot create executables.
 
Ok, ladies and gents of the Linux community! I'm a new user, and complete newbie to Ubuntu and linux in general. Well, I'm wanting to run a MUD server for a project I'm doing. Well, I've got a few great questions to ask, and I'll try to be as verbose as possible about them.

Alright, here are my questions, in order of importance:
  1. I'm having a massive error. My C++ compiler cannot create executables. I'm running the source script directly from my downloads folder, location "~/Downloads". I'm trying to compile, create, install, and run a MUD server, AweMUD.
  2. I'm trying to see which MUD server software works best. I have, currently (And all aren't working) Koala, AweMUD, and Grendel. I'd like to get Grendel working, personally.
  3. (Unrelated) I'm trying to get TerminatorX to work. Can't seem to get it set up.

Haste would be helpful, thank you everyone.

And for getting it working, I'll gladly post the information for my MUD.

AlucardZero 10-26-2010 08:04 AM

Please post the entire error you are getting from ./configure and a few lines before it.

It's probably because you didn't install a C++ compiler, but without the whole error it's a little hard to say.

Xlaits 10-26-2010 08:19 AM

Quote:

Originally Posted by AlucardZero (Post 4139692)
Please post the entire error you are getting from ./configure and a few lines before it.

It's probably because you didn't install a C++ compiler, but without the whole error it's a little hard to say.

Here you go:

Code:

xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

EDIT:
I'm running a "sudo apt-get install build-essentials" right now. I'll try again in a little with with my MUD server software.

EDIT EDIT:
OK! "build-essentials" somewhat worked! New error. To keep this reply short, I'll post the code in a separate reply, but: "configure: error: could not find suitable libgc"

AlucardZero 10-26-2010 08:40 AM

So yep, no compiler installed. And installing build-essential is one way to get one.

Xlaits 10-26-2010 08:43 AM

Code for the new error:

Code:

xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ sudo apt-get install build-essential
[sudo] password for xlaits:
Reading package lists... Done
Building dependency tree     
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libkeybinder0 python-keybinder
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  dpkg-dev fakeroot g++ g++-4.4 libalgorithm-merge-perl libdpkg-perl libstdc++6-4.4-dev patch
Suggested packages:
  debian-keyring g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg libstdc++6-4.4-doc diffutils-doc
The following NEW packages will be installed:
  build-essential dpkg-dev fakeroot g++ g++-4.4 libalgorithm-merge-perl libdpkg-perl libstdc++6-4.4-dev patch
0 upgraded, 9 newly installed, 0 to remove and 1 not upgraded.
Need to get 8,266kB of archives.
After this operation, 24.8MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick/main libstdc++6-4.4-dev i386 4.4.4-14ubuntu5 [1,529kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ maverick/main g++-4.4 i386 4.4.4-14ubuntu5 [5,199kB]                             
Get:3 http://us.archive.ubuntu.com/ubuntu/ maverick/main g++ i386 4:4.4.4-1ubuntu2 [1,444B]                                 
Get:4 http://us.archive.ubuntu.com/ubuntu/ maverick/main libdpkg-perl all 1.15.8.4ubuntu3 [504kB]                           
Get:5 http://us.archive.ubuntu.com/ubuntu/ maverick/main patch i386 2.6-2ubuntu1 [123kB]                                   
Get:6 http://us.archive.ubuntu.com/ubuntu/ maverick/main dpkg-dev all 1.15.8.4ubuntu3 [772kB]                               
Get:7 http://us.archive.ubuntu.com/ubuntu/ maverick/main build-essential i386 11.5 [7,244B]                                 
Get:8 http://us.archive.ubuntu.com/ubuntu/ maverick/main fakeroot i386 1.14.4-1ubuntu1 [118kB]                             
Get:9 http://us.archive.ubuntu.com/ubuntu/ maverick/main libalgorithm-merge-perl all 0.08-1 [13.0kB]                       
Fetched 8,266kB in 1min 26s (95.1kB/s)                                                                                     
Selecting previously deselected package libstdc++6-4.4-dev.
(Reading database ... 131343 files and directories currently installed.)
Unpacking libstdc++6-4.4-dev (from .../libstdc++6-4.4-dev_4.4.4-14ubuntu5_i386.deb) ...
Selecting previously deselected package g++-4.4.
Unpacking g++-4.4 (from .../g++-4.4_4.4.4-14ubuntu5_i386.deb) ...
Selecting previously deselected package g++.
Unpacking g++ (from .../g++_4%3a4.4.4-1ubuntu2_i386.deb) ...
Selecting previously deselected package libdpkg-perl.
Unpacking libdpkg-perl (from .../libdpkg-perl_1.15.8.4ubuntu3_all.deb) ...
Selecting previously deselected package patch.
Unpacking patch (from .../patch_2.6-2ubuntu1_i386.deb) ...
Selecting previously deselected package dpkg-dev.
Unpacking dpkg-dev (from .../dpkg-dev_1.15.8.4ubuntu3_all.deb) ...
Selecting previously deselected package build-essential.
Unpacking build-essential (from .../build-essential_11.5_i386.deb) ...
Selecting previously deselected package fakeroot.
Unpacking fakeroot (from .../fakeroot_1.14.4-1ubuntu1_i386.deb) ...
Selecting previously deselected package libalgorithm-merge-perl.
Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-1_all.deb) ...
Processing triggers for man-db ...
Setting up libdpkg-perl (1.15.8.4ubuntu3) ...
Setting up patch (2.6-2ubuntu1) ...
Setting up dpkg-dev (1.15.8.4ubuntu3) ...
Setting up fakeroot (1.14.4-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Setting up libalgorithm-merge-perl (0.08-1) ...
Setting up libstdc++6-4.4-dev (4.4.4-14ubuntu5) ...
Setting up g++-4.4 (4.4.4-14ubuntu5) ...
Setting up g++ (4:4.4.4-1ubuntu2) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode.
Setting up build-essential (11.5) ...
xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for vprintf... yes
checking for _doprnt... no
checking for xmlto... no
checking for xsltproc... /usr/bin/xsltproc
checking for sendmail... none
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking for bison... no
checking for flex... no
checking for connect in -lsocket... no
checking for gethostbyname in -lnsl... yes
checking for getpeereid... no
checking for connect... yes
checking for gethostname... yes
checking for getnameinfo... yes
checking for gethostbyname... yes
checking for inet_pton... yes
checking for inet_ntop... yes
checking for poll... yes
checking for strdup... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for snprintf... yes
checking for random... yes
checking for fnmatch... yes
checking for regcomp... yes
checking for intptr_t... yes
checking for struct sockaddr_storage... yes
checking for IPv6 support... yes
checking for deflate in -lz... no
checking for dlopen in -ldl... yes
checking for GC_malloc in -lgc... no
configure: error: Could not find suitable libgc
xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ make
make: *** No targets specified and no makefile found.  Stop.
xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$


Xlaits 10-26-2010 08:44 AM

Quote:

Originally Posted by AlucardZero (Post 4139727)
So yep, no compiler installed. And installing build-essential is one way to get one.

Ok, thanks. Found my answer in another thread. Now, about this new error...

Xlaits 10-26-2010 09:35 AM

Shameless, needy bump.

EDIT:

Going to try installing GCC. Let you know if that works...

EDIT EDIT:

Ok, Issues solved. New issues arose. Creating new thread about it.

Xlaits 10-26-2010 10:09 AM

AweMUD make fail: "make: *** [install] Error 2"
 
As the title says, I'm having a problem installing AweMUD. I fixed a "./configure" mistake, now, I need to fix (a) "make", and "make install" error(s).

Here's the output from "make":

Code:

xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ make
make  all-am
make[1]: Entering directory `/home/xlaits/Downloads/awemud-0.25'
depbase=`echo src/util/awemud-ctrl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if gcc -DHAVE_CONFIG_H -I. -I. -I./include -I./include    -g -O2 -MT src/util/awemud-ctrl.o -MD -MP -MF "$depbase.Tpo" -c -o src/util/awemud-ctrl.o src/util/awemud-ctrl.c; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
gcc  -g -O2  -o awemud-ctrl  src/util/awemud-ctrl.o  -lgc -lnsl  -lz -ldl
depbase=`echo src/common/error.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include    -g -O2 -MT src/common/error.o -MD -MP -MF "$depbase.Tpo" -c -o src/common/error.o src/common/error.cc; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from ./include/common/log.h:13,
                from src/common/error.cc:15:
./include/common/string.h: In member function ‘bool String::operator==(const String&) const’:
./include/common/string.h:55: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘bool String::operator!=(const String&) const’:
./include/common/string.h:56: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘bool String::operator<(const String&) const’:
./include/common/string.h:57: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘size_t String::size() const’:
./include/common/string.h:68: error: ‘strlen’ was not declared in this scope
./include/common/string.h: In function ‘bool operator==(String, const char*)’:
./include/common/string.h:96: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator==(const char*, String)’:
./include/common/string.h:97: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator!=(String, const char*)’:
./include/common/string.h:98: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator!=(const char*, String)’:
./include/common/string.h:99: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator<(String, const char*)’:
./include/common/string.h:100: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator<(const char*, String)’:
./include/common/string.h:101: error: ‘strcmp’ was not declared in this scope
In file included from ./include/common/log.h:15,
                from src/common/error.cc:15:
./include/common/streams.h: In member function ‘const StreamControl& StreamControl::stream_put(const char*, size_t) const’:
./include/common/streams.h:47: error: ‘strlen’ was not declared in this scope
make[1]: *** [src/common/error.o] Error 1
make[1]: Leaving directory `/home/xlaits/Downloads/awemud-0.25'
make: *** [all] Error 2

And here's "make install":

Code:

xlaits@XlaitsLaptop:~/Downloads/awemud-0.25$ make install
make  install-am
make[1]: Entering directory `/home/xlaits/Downloads/awemud-0.25'
depbase=`echo src/common/error.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; \
        if g++ -DHAVE_CONFIG_H -I. -I. -I./include -I./include    -g -O2 -MT src/common/error.o -MD -MP -MF "$depbase.Tpo" -c -o src/common/error.o src/common/error.cc; \
        then mv -f "$depbase.Tpo" "$depbase.Po"; else rm -f "$depbase.Tpo"; exit 1; fi
In file included from ./include/common/log.h:13,
                from src/common/error.cc:15:
./include/common/string.h: In member function ‘bool String::operator==(const String&) const’:
./include/common/string.h:55: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘bool String::operator!=(const String&) const’:
./include/common/string.h:56: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘bool String::operator<(const String&) const’:
./include/common/string.h:57: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In member function ‘size_t String::size() const’:
./include/common/string.h:68: error: ‘strlen’ was not declared in this scope
./include/common/string.h: In function ‘bool operator==(String, const char*)’:
./include/common/string.h:96: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator==(const char*, String)’:
./include/common/string.h:97: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator!=(String, const char*)’:
./include/common/string.h:98: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator!=(const char*, String)’:
./include/common/string.h:99: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator<(String, const char*)’:
./include/common/string.h:100: error: ‘strcmp’ was not declared in this scope
./include/common/string.h: In function ‘bool operator<(const char*, String)’:
./include/common/string.h:101: error: ‘strcmp’ was not declared in this scope
In file included from ./include/common/log.h:15,
                from src/common/error.cc:15:
./include/common/streams.h: In member function ‘const StreamControl& StreamControl::stream_put(const char*, size_t) const’:
./include/common/streams.h:47: error: ‘strlen’ was not declared in this scope
make[1]: *** [src/common/error.o] Error 1
make[1]: Leaving directory `/home/xlaits/Downloads/awemud-0.25'
make: *** [install] Error 2


Xlaits 10-26-2010 06:15 PM

bump

Nylex 10-27-2010 02:19 AM

Please don't bump your threads, especially if you're not giving any new information. They'll get automatically bumped after 24 and 48 hours (I think), if they haven't been replied to. I'm not sure why you'd try running "make install" if "make" failed, but ok. It looks like you're missing whichever package provides the C++ headers. Do you have the libstdc++ packages installed?

shpenat 10-27-2010 03:44 AM

Odd thing is that make is looking into ./include/common/string.h. I would expect it to look into /usr/include/string.h. Yet I know nothing about AweMUD.

you did not provided information about what Linux distro you use. Generally the header files are provided by separate packages called dev (as development) which are usually not installed by default. So make sure you have proper packages included as Nylex already suggested.


All times are GMT -5. The time now is 02:38 PM.