Attempting To Compile, Missing 'cqs' And 'c'


noisome

Member
Joined
Mar 25, 2008
Messages
262
Hey there all.

I am a n00b, yes. I am trying to compile ChessX v0.7, and gotten to a point where the "make" process is running into problems.


I first had a problem with the 'c' command not being found, so I symlinked /usr/bin/gcc to /usr/bin/c. Is that okay?

I also got the following error:
Code:
make[2]: [position.o] Error 1 (ignored)
c -pipe   -fPIC -D_REENTRANT -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/QtCore -I/QtNetwork -I/QtGui -I -I. -o recog.o recog.cpp
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../crt1.o: In function `_start':
init.c:(.text+0x30): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: [recog.o] Error 1 (ignored)
rm -f libguess.a
cqs libguess.a dstring.o engine.o guess.o misc.o movelist.o myassert.o position.o recog.o
make[2]: cqs: Command not found
make[2]: *** [libguess.a] Error 127
make[2]: Leaving directory `/home/noisome/Code/chessx-0.7/src/guess'
make[1]: *** [sub-guess-make_default-ordered] Error 2
make[1]: Leaving directory `/home/noisome/Code/chessx-0.7/src'
make: *** [sub-src-make_default] Error 2

What is cqs? Google was not my friend in the search.

Thanks for any help.
 
Still haven't a clue. I have never run into this problem. I can't find anything about this.
 
I can move this thread to the Dev's Corner, if you wish. It might get more exposure to the experts there.
 
mali said:
I can move this thread to the Dev's Corner, if you wish. It might get more exposure to the experts there.

Please, that would be appreciated. I didn't want to create a duplicate thread and it seems I'm not getting any views here. Thanks!
 
Last edited by a moderator:
Looks like cqs should be some sort of linker, but I've never run across one by that name. Try using gcc for that one as well.

Also, rather than creating symlinks in your /usr/bin directory just to try and compile one program, you could instead redefine c and cqs in your Makefile so that the change is localized.

c=gcc
cqs=gcc


etc.

Cheers,
Michael
 
Are you running qmake first? As per these directions:

http://chessx.sourceforge.net/?q=node/9
 
mduffor said:
Looks like cqs should be some sort of linker, but I've never run across one by that name. Try using gcc for that one as well.

Also, rather than creating symlinks in your /usr/bin directory just to try and compile one program, you could instead redefine c and cqs in your Makefile so that the change is localized.

c=gcc
cqs=gcc


etc.

Cheers,
Michael

Okay, I will try that, thanks!

*EDIT*
Tried: gcc for cqs was not correct. Just before cqs is "rm -f libguess.a" and then cqs seems to want to build libguess.a from "dstring.o engine.o guess.o misc.o movelist.o myassert.o position.o recog.o", and it comes up with "No such file or directory" for each file on the list when gcc is in its place and then "No input files"


Exophase said:
Are you running qmake first? As per these directions:

http://chessx.sourceforge.net/?q=node/9

Yes. qmake completed with no errors and no output, so I assume it was successful. That's why I was confused when c and cqs came up, but I will try with the replacements.
 
Last edited by a moderator:
Okay, I see what the issue probably is. cqs isn't the linker, but linker flags. Here's a callout from another Qt app makefile:

QMAKE_AR = arm-linux-ar cqs

So, your defines are probably not setup right for cross compiling.
 
Exophase said:
Okay, I see what the issue probably is. cqs isn't the linker, but linker flags. Here's a callout from another Qt app makefile:

QMAKE_AR = arm-linux-ar cqs

So, your defines are probably not setup right for cross compiling.

I forgot to mention I'm compiling on Bollocks (the Pandora itself). I will search to see what I need to do with the info, thanks!

*EDIT*

The variable in the line AR = $(OE_QMAKE_AR) cqs was not there, $(OE_QMAKE_AR), so I replaced it with ar and it is no longer giving me the error, but now missing files (dstring.o, and I'm sure engine.o next). I will let everyone know when I get past this point.

Thanks.
 
Last edited by a moderator:
For some reason -c isn't on the command line, so it is attempting to link the one file into an application which is why it is moaning about:

init.c:(.text+0x30): undefined reference to `main'

Just thought I'd mention that on top of what has already been said.

Steve
 
Rockthesmurf said:
For some reason -c isn't on the command line, so it is attempting to link the one file into an application which is why it is moaning about:

init.c:(.text+0x30): undefined reference to `main'

Just thought I'd mention that on top of what has already been said.

Steve

That got me past the troublesome first part, thank you! I have other issues now I'm facing with getting this thing compiled.

I had to change c to gcc and add a OE_QMAKE_AR variable and add a -c for the CFLAGS and CXXFLAGS in the Makefile for guess part source.
 
Last edited by a moderator:
That c may have had something to do with the missing -c.. maybe there was a missing - too, for some reason.
 
Exophase said:
That c may have had something to do with the missing -c.. maybe there was a missing - too, for some reason.

Thinking a bit, this was quite obvious:
Code:
urjaman@alix:~$ make
test
make: [all] Error 1 (ignored)
urjaman@alix:~$ cat Makefile
all:
        $(NOSUCHVAR) -test

IIRC "-" in front of a command makes make ignore the result of the command.

EDIT: tab to spaces, quote to code...
 
Last edited by a moderator:
urjaman said:
Thinking a bit, this was quite obvious:
Code:
urjaman@alix:~$ make
 test
 make: [all] Error 1 (ignored)
 urjaman@alix:~$ cat Makefile
 all:
         $(NOSUCHVAR) -test

IIRC "-" in front of a command makes make ignore the result of the command.

EDIT: tab to spaces, quote to code...

Nice find. Mystery solved?
 
Last edited by a moderator:
Exophase said:
urjaman said:
Thinking a bit, this was quite obvious:
Code:
urjaman@alix:~$ make
 test
 make: [all] Error 1 (ignored)
 urjaman@alix:~$ cat Makefile
 all:
         $(NOSUCHVAR) -test

IIRC "-" in front of a command makes make ignore the result of the command.

EDIT: tab to spaces, quote to code...

Nice find. Mystery solved?

Will try this when I get home from work (at work the whole day, hope nobody here noticed where my attention was at :))
 
Last edited by a moderator:
Noisome said:
Will try this when I get home from work (at work the whole day, hope nobody here noticed where my attention was at :) )
Essentially, try what? Useless playing with make to make a point? :p

I just explained the basic mishap that is happening. There's some variable(s) in the makefile (CC and AR? or equivalents) that are empty/not defined. Thus make is trying to execute the first parameter to those commands. And because make eats the "-" in the command (thinking that you're telling it to ignore any possible error in this command), we see the behaviour we see.

I dont know the ultimate reason why the variables are empty. And I've never compiled ChessX, so dunno.
In case of no other solution, just find the line(s) in makefile saying
$(SOME_VAR_CC) -c ...
Take note of the variable name (i made that up),
Then add in the beginning of the makefile (changing the variable name in my example)
SOME_VAR_CC=gcc

And the same for -cqs, but like this:
SOME_VAR_AR=ar

It should be simple.
Edit:typo
 
Last edited by a moderator:
The 'c' is probably referring to:

Code:
-lc

.. which is the libc library, where the constructor functions to set up a call to main are located and are thus being looked for by the linker.

'cqs' is a flag, which is (oddly) being interpreted as a new command instead of the flag set to AR, which is trying to build an archive, again for linking against ..

I first had a problem with the 'c' command not being found, so I symlinked /usr/bin/gcc to /usr/bin/c. Is that okay?

Hell no, that is rubbish. Do not add garrbage to /usr/bin, fix your Makefile!

'c' being called is false. Did you perhaps run some sort of search/replace on the Makefile, or perhaps is qmake jettisoning garbage because it can't find a tool it expects?

.. hmm .. the subject of links .. do you have g++-symlinks and gcc+symlinks bollocks'ed in? Did you add qmake to your Pandora through angstrom repo?

EDIT: Perhaps the arm-linux-ar symlink is not being set, qmake is not finding it but soldiering on regardless, because .. of missing binutils-dev?
 
torpor said:
The 'c' is probably referring to:

Code:
-lc

.. which is the libc library, where the constructor functions to set up a call to main are located and are thus being looked for by the linker.
'c' is "propably"
Code:
-c
which
-c

Compile or assemble the source files, but do not link. The linking stage simply is not done. The ultimate output is in the form of an object file for each source file.
So it shouldn't be linking anything (yet).

EDIT: To note, other torpor's points are still valid and good :p I might seem a bit attackive sometimes, so decided to add this.
 
Last edited by a moderator:
urjaman said:
Essentially, try what? Useless playing with make to make a point? :p


Yes because it is not compiling on the Pandora but will on a x86 machine. There is a problem somewhere and it should be addressed, at least in my point of view. That's a point that's worth useless playing around with.
 
Last edited by a moderator:
Back
Top