C compiler cannot create executables SOLVED

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
belenus

C compiler cannot create executables SOLVED

Post by belenus »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon »

Which project are you trying to compile?
Lingula

Post by Lingula »

Compilation problems are almost never due to the compiler.
belenus

Re: C compiler cannot create executables

Post by belenus »

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: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon »

Can you please give me a direct link to the source?
dagon
Level 7
Level 7
Posts: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon »

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

Re: C compiler cannot create executables

Post by belenus »

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?
DrHu

Re: C compiler cannot create executables

Post by DrHu »

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: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon »

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

Re: C compiler cannot create executables

Post by belenus »

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: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables

Post by dagon »

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

Re: C compiler cannot create executables

Post by belenus »

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: 1655
Joined: Mon Dec 06, 2010 4:33 am
Location: Kungälv, Sweden
Contact:

Re: C compiler cannot create executables SOLVED

Post by dagon »

OK, cool! 8)
Locked

Return to “Software & Applications”