Problem using 'make'
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Problem using 'make'




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Problem using 'make'  
chr.ott@gmx.li


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-07 12:20 PM

Hello,

I have a weird problem using 'make'. When I try to compile using an
(automatically generated) makefile, I get some error messages like the
following:

----------------------------------------------------------------------------------------[vbc
ol=seagreen] 
cc -c <-- skipped -->  rtw_test.c
/tmp/ccrai8yi.s: Assembler messages:
/tmp/ccrai8yi.s:120: Error: suffix or operands invalid for `push'
/tmp/ccrai8yi.s:122: Error: suffix or operands invalid for `push'
/tmp/ccrai8yi.s:123: Error: suffix or operands invalid for `push'
----------------------------------------------------------------------------
-------------

However, when I copy the command "cc -c <-- skipped -->  rtw_test.c"
manually into a shell it works without errors!

Any ideas what's going on? I would be happy about any suggestions.
PS: I already tried to specify a different shell within the makefile
(using SHELL=/bin/bash, etc ...), but this did not solve the
problem.

regards,
christian






[ Post a follow-up to this message ]



    Re: Problem using 'make'  
Gianni Mariani


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-07 12:20 PM

chr.ott@gmx.li wrote:
> Hello,
>
> I have a weird problem using 'make'. When I try to compile using an
> (automatically generated) makefile, I get some error messages like the
> following:
>
> --------------------------------------------------------------------------
-------------- 
> cc -c <-- skipped -->  rtw_test.c
> /tmp/ccrai8yi.s: Assembler messages:
> /tmp/ccrai8yi.s:120: Error: suffix or operands invalid for `push'
> /tmp/ccrai8yi.s:122: Error: suffix or operands invalid for `push'
> /tmp/ccrai8yi.s:123: Error: suffix or operands invalid for `push'
> --------------------------------------------------------------------------
---------------
>
> However, when I copy the command "cc -c <-- skipped -->  rtw_test.c"
> manually into a shell it works without errors!
>
> Any ideas what's going on? I would be happy about any suggestions.
> PS: I already tried to specify a different shell within the makefile
> (using SHELL=/bin/bash, etc ...), but this did not solve the
> problem.
>

This is probably due to misconfiguration.  Environment variables (like
PATH) can be changed in a Makefile.






[ Post a follow-up to this message ]



    Re: Problem using 'make'  
Henry Townsend


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-30-07 06:20 PM

chr.ott@gmx.li wrote:
> Hello,
>
> I have a weird problem using 'make'. When I try to compile using an
> (automatically generated) makefile, I get some error messages like the
> following:
>
> --------------------------------------------------------------------------
-------------- 
> cc -c <-- skipped -->  rtw_test.c
> /tmp/ccrai8yi.s: Assembler messages:
> /tmp/ccrai8yi.s:120: Error: suffix or operands invalid for `push'
> /tmp/ccrai8yi.s:122: Error: suffix or operands invalid for `push'
> /tmp/ccrai8yi.s:123: Error: suffix or operands invalid for `push'
> --------------------------------------------------------------------------
---------------
>
> However, when I copy the command "cc -c <-- skipped -->  rtw_test.c"
> manually into a shell it works without errors!
>
> Any ideas what's going on? I would be happy about any suggestions.
> PS: I already tried to specify a different shell within the makefile
> (using SHELL=/bin/bash, etc ...), but this did not solve the
> problem.

General makefile-debugging technique: take the part that says something like

bar.o: bar.c
cc -c bar.c

and change it to

bar.o: bar.c
@echo cc -c bar.c
@$(SHELL)

Now when you run make you will find yourself in an interactive shell
with the same environment the compiler runs in. Cut and paste the
compile line into this shell; it will fail. Debug it within the new
shell env.

Most likely it's confusion between two different versions of 'as'.





[ Post a follow-up to this message ]



    Re: Problem using 'make'  
chr.ott@gmx.li


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-31-07 12:17 PM

Dear Henry and Gianni,

Thank you very much! The difference was indeed the use of two
different versions of 'as'.

PS: The 'makefile-debugging technique' helped a lot!

christian






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:14 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register