C compiler cannot create executables SOLVED

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

C compiler cannot create executables SOLVED

Post by belenus » Sun Mar 02, 2014 12:45 pm

Hi all,
when trying to install an alsa driver, and execute ./configure....., I get the error mentioned in the subject of this TOPIC. I copy and paste am extraction on config.log file:

gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3074: $? = 4
configure:3063: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files

I upgraded gcc using apt-get, but with the same results.
I need help, because I don't know what to do now.
Thanks.
Last edited by belenus on Mon Mar 03, 2014 8:35 pm, edited 1 time in total.

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon » Sun Mar 02, 2014 3:07 pm

Which project are you trying to compile?

Lingula
Level 4
Level 4
Posts: 281
Joined: Tue Apr 23, 2013 12:47 pm

Post by Lingula » Sun Mar 02, 2014 3:14 pm

Compilation problems are almost never due to the compiler.

belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

Re: C compiler cannot create executables

Post by belenus » Sun Mar 02, 2014 6:17 pm

dagon wrote:Which project are you trying to compile?
This one: alsa-driver-1.0.25. Got it form site: alsa.mirrror.fr
Thanks

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon » Sun Mar 02, 2014 6:26 pm

Can you please give me a direct link to the source?

belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

Re: C compiler cannot create executables

Post by belenus » Sun Mar 02, 2014 7:05 pm


dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon » Sun Mar 02, 2014 7:32 pm

It configures just fine on my machine. Try to install the depends for the associated packages if you haven't already done this.
This line should take care of the job.

Code: Select all

sudo apt-get build-dep alsa-base alsa-source linux-sound-base

belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

Re: C compiler cannot create executables

Post by belenus » Mon Mar 03, 2014 5:34 pm

Dago,
first of all, thanks a lot for your help and your time.
tried to install the depends and I get the following (more or less, coz I translate form spanish):
choosing alsa-driver instead of alsa-base as source package
E: couldn't find a source-package for alsa driver
May it be a wrong list of repositories?

User avatar
DrHu
Level 17
Level 17
Posts: 7537
Joined: Wed Jun 17, 2009 8:20 pm

Re: C compiler cannot create executables

Post by DrHu » Mon Mar 03, 2014 6:09 pm

For Ubuntu derived distrubutions, you need build-essential
https://www.linuxquestions.org/question ... es-354485/
--in order to enable compiling with the GNU c compiler..

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon » Mon Mar 03, 2014 6:25 pm

belenus wrote:...choosing alsa-driver instead of alsa-base as source package
E: couldn't find a source-package for alsa driver
May it be a wrong list of repositories?
Hm... I think you don't have "Source code" checked in your sources app like mintsources or synaptic.

belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

Re: C compiler cannot create executables

Post by belenus » Mon Mar 03, 2014 7:08 pm

yep, dagon was right.
But now, I get another error:
checking for kernel linux/version.h ... no
The file /lib/modules/3.11.0-12-generic/build/include/INCLUDE_VERSION_H does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /lib/modules/3.11.0-12-generic/build).

Sorry I'm such a big duffer.

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon » Mon Mar 03, 2014 7:51 pm

1. You need the build-essentials as DrHu points out but I think they should have been pulled in by the build-dep command.

Code: Select all

sudo apt-get install build-essential
2. A hint here. You are compiling kernel modules so you need the kernel sources.
belenus wrote:Please install the package with full kernel sources for your distribution
This should take care of the kernel sources.

Code: Select all

sudo apt-get install linux-headers-$(uname -r)

belenus
Level 1
Level 1
Posts: 20
Joined: Mon Feb 10, 2014 6:52 pm
Location: Asturies, SP, EU

Re: C compiler cannot create executables

Post by belenus » Mon Mar 03, 2014 8:35 pm

OK, thanks to both of you.
I had to search where my linux/version.h file was. Then, added --with-kernel="path of linux/version.h" to the ./configure, and I got it.
Thanks again to both of you. With your help, I feel a bit more "advanced" linux user.
Now, I'll try to make that soundcard play some music...

dagon
Level 7
Level 7
Posts: 1674
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables SOLVED

Post by dagon » Mon Mar 03, 2014 8:48 pm

OK, cool! 8)

Post Reply

Return to “Software & Applications”