LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Configure error:C compiler cannot create executables (https://www.linuxquestions.org/questions/linux-software-2/configure-error-c-compiler-cannot-create-executables-4175557896/)

Ztcoracat 11-03-2015 02:23 PM

Configure error:C compiler cannot create executables
 
Hi:

I'm trying to install HTK for Simon but I don't understand this error or the config.log.

Here's HTK and the instructions I'm following.
http://www.voxforge.org/home/dev/aco...orial/download

Code:

ash-4.2$ cd /home/zebracat/voxforge/bin/htk/
bash-4.2$ ls
AUTHORS    HLMTools  HTKLib    Makefile.in  config.status  env
ChangeLog  HTK            HTKTools  README            config.sub    install-sh
FAQ          HTKBook  LICENSE  config.guess  configure
HLMLib          HTKLVRec  Makefile  config.log    configure.ac
bash-4.2$ ./configure CC=gcc34 --prefix=/home/zebracat/voxforge/bin/htk
checking whether make sets $(MAKE)... yes
checking for gawk... gawk
checking for gcc... gcc34
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
bash-4.2$

The config.log-
Code:

  $ ./configure CC=gcc34 --prefix=/home/zebracat/voxforge/bin/htk

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

hostname = redhatcat
uname -m = x86_64
uname -r = 3.10.17
uname -s = Linux
uname -v = #2 SMP Fri Feb 14 16:45:28 CST 2014

/usr/bin/uname -p = AMD Phenom(tm) 9850 Quad-Core Processor
/bin/uname -X    = unknown

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

PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /usr/games
PATH: /usr/lib64/kde4/libexec
PATH: /usr/lib64/java/bin
PATH: /usr/lib64/java/jre/bin
PATH: /usr/lib64/qt/bin
PATH: /usr/share/texmf/bin


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

configure:1739: checking whether make sets $(MAKE)
configure:1760: result: yes
configure:1773: checking for gawk
configure:1789: found /usr/bin/gawk
configure:1800: result: gawk
configure:1859: checking for gcc
configure:1886: result: gcc34
configure:2124: checking for C compiler version
configure:2131: gcc34 --version >&5
./configure: line 2132: gcc34: command not found
configure:2134: $? = 127
configure:2141: gcc34 -v >&5
./configure: line 2142: gcc34: command not found
configure:2144: $? = 127
configure:2151: gcc34 -V >&5
./configure: line 2152: gcc34: command not found
configure:2154: $? = 127
configure:2177: checking for C compiler default output file name
configure:2204: gcc34    conftest.c  >&5
./configure: line 2205: gcc34: command not found
configure:2207: $? = 127
configure:2245: result:
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "HTK"
| #define PACKAGE_TARNAME "htk"
| #define PACKAGE_VERSION "3.4.1"
| #define PACKAGE_STRING "HTK 3.4.1"
| #define PACKAGE_BUGREPORT "htk-mgr@eng.cam.ac.uk"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|  ;
|  return 0;
| }
configure:2252: error: C compiler cannot create executables
See `config.log' for more details.

What do I need to do here?:confused:

Ztcoracat 11-03-2015 02:28 PM

For the record I have gcc installed-

Code:

Looking for gcc in package list. Please wait... DONE

The list below shows all packages with name matching "gcc".

[ installed ] - gcc-4.8.2-x86_64-1
[ installed ] - gcc-g++-4.8.2-x86_64-1
[ installed ] - gcc-gfortran-4.8.2-x86_64-1
[ installed ] - gcc-gnat-4.8.2-x86_64-1
[ installed ] - gcc-go-4.8.2-x86_64-1
[ installed ] - gcc-java-4.8.2-x86_64-1
[ installed ] - gcc-objc-4.8.2-x86_64-1
[ installed ] - gccmakedep-1.0.2-noarch-2


MensaWater 11-03-2015 02:36 PM

It says it is finding your C compiler which would normally be "gcc" (GNU C compiler) as "gcc34" and is then attempting to execute gcc34 but saying it is not found.

Based on that:
Run 'which gcc' to determine what gcc command it found.
Run 'gcc --version' to see if that is gcc34.
Run 'which gcc34' - presumably it will say not found.
Run 'find / -name "gcc*" to see if it finds any gcc or gcc34 file.
Run 'echo $PATH' to see what directories (separated by colon) are in your PATH.
If you found gcc34 in a directory NOT listed in your PATH you can add its directory to your PATH by typing 'PATH=$PATH:<newdirectory>' where you replace the last bit with the directory you found gcc34 in.
Alternatively if the 'which gcc' tells you the directory where gcc is and that directory does NOT have gcc34 in it you could create a symbolic link by typing 'ln -s <directory>/gcc <directory>/gcc34.

You could review the configure script itself and see what it is doing between lines 1859 and 18886 that is making it say gcc34.

Ztcoracat 11-03-2015 03:08 PM

Code:

bash-4.2$ gcc --version
gcc (GCC) 4.8.2
Copyright (C) 2013 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.

bash-4.2$ which gcc34
which: no gcc34 in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/qt/bin:/usr/share/texmf/bin)
bash-4.2$ find/-name "gcc*"
bash: find/-name: No such file or directory
bash-4.2$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/kde4/libexec:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/lib64/qt/bin:/usr/share/texmf/bin
bash-4.2$

There isn't anything in between 1859 and 18886-

Code:

configure:1800: result: gawk
configure:1859: checking for gcc
configure:1886: result: gcc34
configure:2124: checking for C compiler version

I didn't create a symbolic link because which gcc34 returned "no gcc34"

knudfl 11-03-2015 03:14 PM

*

HTK builds OK with gcc-4.9.2 !

A bug, HTK-3.4.1 :
htk/HLMTools/Makefile.in, line 77 starts with 8 spaces : Must be one <TAB>.



-

Ztcoracat 11-03-2015 03:20 PM

Quote:

Originally Posted by knudfl (Post 5444223)
*

HTK builds OK with gcc-4.9.2 !

A bug : htk/HLMTools/Makefile.in, line 77 starts with 8 spaces : Must be one <TAB>.



-

Hi knudfl

Thanks for chiming in.
So.... installing gcc 4.9.2 is what I need to do?
http://slackbuilds.org/repository/14...pment/avr-gcc/

How to fix the bug?

I looked in /home/zebracat/voxforge/bin/htk/HLMTools/Makefile.in
and I don't have 77 lines.

knudfl 11-03-2015 04:51 PM

Re #6.

GCC-4.9.2 : Then all new versions can be used, I guess. Also your gcc-4.8.

Editing Makefile.in : That's for HTK-3.4.1 = latest stable version, March 2009.
? Are you using an ancient version ? http://htk.eng.cam.ac.uk/


-

Ztcoracat 11-03-2015 05:02 PM

Quote:

Originally Posted by knudfl (Post 5444252)
Re #6.

GCC-4.9.2 : Then all new versions can be used, I guess. Also your gcc-4.8.

Editing Makefile.in : That's for HTK-3.4.1 = latest stable version, March 2009.
? Are you using an ancient version ? http://htk.eng.cam.ac.uk/


-

I downloaded HTK 3.4.1 from the link you posted yesterday and assumed it was the correct one.
If that is the ancient version than I need to find the most recent.

Ztcoracat 11-03-2015 05:11 PM

Tried installing it a different way other than the instructions by just running ./configure.

Code:

config.status: WARNING:  HTKLVRec/Makefile.in seems to ignore the --datarootdir setting
config.status: creating Makefile
config.status: WARNING:  Makefile.in seems to ignore the --datarootdir setting
**************************************************

HTK is now ready to be built.

Type "make all" to build the HTK libraries
and tools.

Then "make install" to install them.

The tools will be installed in /usr/local/bin

Build notes: Language Modelling tools will be
built. HDecode will not be built. You can build
it manually later by running 'make hdecode
install-hdecode'

**************************************************
bash-4.2$ make all
(cd HTKLib && make HTKLib.a) \
  || case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory `/home/zebracat/voxforge/bin/htk/HTKLib'
gcc  -m32 -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I. -DPHNALG  -c -o HGraf.o HGraf.c
In file included from /usr/include/features.h:399:0,
                from /usr/include/stdio.h:27,
                from HShell.h:40,
                from HGraf.c:54:
/usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory
 # include <gnu/stubs-32.h>
                          ^
compilation terminated.
make[1]: *** [HGraf.o] Error 1
make[1]: Leaving directory `/home/zebracat/voxforge/bin/htk/HTKLib'
make: *** [HTKLib/HTKLib.a] Error 1
bash-4.2$

Wish this wasn't so difficult to install-

Emerson 11-03-2015 05:15 PM

Are you in a pure 64-bit system?

Ztcoracat 11-03-2015 05:22 PM

Quote:

Originally Posted by Emerson (Post 5444260)
Are you in a pure 64-bit system?

Yes

Code:

bash-4.2$ uname -m
x86_64
bash-4.2$

Also when I run cat /proc/cpuinfo
the lm flag is present.
Quote:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs hw_pstate npt lbrv svm_lock


Emerson 11-03-2015 05:34 PM

Then you have to figure out how to avoid building 32-bit counterpart, your error compiler cannot create executables is because it cannot build 32-bit binaries.

Ztcoracat 11-03-2015 05:49 PM

Quote:

Originally Posted by Emerson (Post 5444269)
Then you have to figure out how to avoid building 32-bit counterpart, your error compiler cannot create executables is because it cannot build 32-bit binaries.

Lovely; well thanks for telling me but I honestly don't know how to avoid building the 32-bit counterpart.

Ideas or suggestions?

Ztcoracat 11-03-2015 06:02 PM

I found this but I'm not sure if it's the answer.

Use (which I've never done) the -m32 flag to compile a 32-bit binary?
http://stackoverflow.com/questions/1...with-gcc-cmake

Emerson 11-03-2015 06:02 PM

There may be a bug preventing the build on pure 64 bit systems. There is certainly a way to file a bug or contact author, but you should see the docs first to make sure you haven't overlooked anything.


All times are GMT -5. The time now is 04:16 AM.