English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 05 June 2023, 15:46   #1
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
Can't make bebbo's amiga-gcc work

i really need help here guys i have been trying to make this amiga-gcc by bebbo thing work and when i try to compile some code it says:
Code:
sh: /bin/sh: No such file or directory
sh: *** [Makefile:97: clean] Error 127
i am running windows 10, i downloaded the "Precompiled suite with installer" for windows with msys2 and i am stumped. why is it looking for sh? this isnt linux.

any help appreciated
Bren McGuire is offline  
Old 05 June 2023, 15:55   #2
Samurai_Crow
Total Chaos forever!
 
Samurai_Crow's Avatar
 
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,186
Msys2 comes with Bash so 'sh' should just use that. You might need to check the path.
Samurai_Crow is online now  
Old 05 June 2023, 18:00   #3
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by Bren McGuire View Post
i really need help here guys i have been trying to make this amiga-gcc by bebbo thing work and when i try to compile some code it says:
Code:
sh: /bin/sh: No such file or directory
sh: *** [Makefile:97: clean] Error 127
i am running windows 10, i downloaded the "Precompiled suite with installer" for windows with msys2 and i am stumped. why is it looking for sh? this isnt linux.

any help appreciated

You have to open the command line via the provided `cmdline.bat`.
Or you have to provide a proper configuration by yourself.


It uses msys2, which is linux for windows and that uses sh.
bebbo is offline  
Old 05 June 2023, 18:40   #4
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
thanks for replying bebbo! I have msys2 installed
actually to make sure i went and installed it again a newer version i hope.
i opened cmdline.bat and cd to the folder where my code is and i still get the same error
what to do now?
Quote:
Originally Posted by bebbo View Post
You have to open the command line via the provided `cmdline.bat`.
Or you have to provide a proper configuration by yourself.


It uses msys2, which is linux for windows and that uses sh.
Bren McGuire is offline  
Old 05 June 2023, 19:08   #5
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
Did you install the toolchain in the default location? If not, try doing that (a path with spaces could causes issues).

In cmdline.bat try changing line 3 from
Code:
path %path%;%prefix%\bin\
to
Code:
path %prefix%\bin\;%path%
Just tried the default installation and it worked for me (on Windows 11), the above is just random guesses based on previous experience with msys based stuff.
paraj is offline  
Old 05 June 2023, 20:48   #6
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
I never use that msys crap, only gnu make for windows & Bebbo's as / gcc and it works fine.
jotd is offline  
Old 05 June 2023, 22:05   #7
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
i installed the toolchain in the default c:/amiga-gcc
Quote:
Originally Posted by paraj View Post
Did you install the toolchain in the default location? If not, try doing that (a path with spaces could causes issues).
i did this and no change still same error i even added c:/msys64/usr/bin to PATH now
Quote:
In cmdline.bat try changing line 3 from
Code:
path %path%;%prefix%\bin\
to
Code:
path %prefix%\bin\;%path%
Bren McGuire is offline  
Old 06 June 2023, 17:15   #8
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
1. Does e.g. m68k-amigaos-gcc.exe work on its own if you cd into c:/amiga-gcc/bin ?
2. Does sh.exe?
3. How about make.exe
4. What about a simpler Makefile that you create from scratch?
5. Check if the Makefile contains windows line endings (perhaps only some lines)
6. If all that fails, try attaching the Makefile
paraj is offline  
Old 06 June 2023, 17:38   #9
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
cputest (WinUAE cpu tester) uses Bebbo's gcc toolchain but no shells or crap. Try building that, I could build it with only "make" command installed, no crap msys or sh (sources from WinUAE github in "cputest")
jotd is offline  
Old 06 June 2023, 21:21   #10
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
1. amiga-gcc successfully compiles hello.c when i launch cmdline.bat so i am assuming its working
2. sh.exe works on its own when invoked from the command line
3. make when invoked on its own in any random dir says "sh: *** No targets specified and no makefile found. Stop."
4. i dont know how to make a makefile
5. they are all cr/lf
6. there is a line there that says
Code:
# The shell in which to execute make rules.
SHELL = /bin/sh
but no matter what i change this to, it still doesn't work, still tries to use sh


Quote:
Originally Posted by paraj View Post
1. Does e.g. m68k-amigaos-gcc.exe work on its own if you cd into c:/amiga-gcc/bin ?
2. Does sh.exe?
3. How about make.exe
4. What about a simpler Makefile that you create from scratch?
5. Check if the Makefile contains windows line endings (perhaps only some lines)
6. If all that fails, try attaching the Makefile
Bren McGuire is offline  
Old 06 June 2023, 21:25   #11
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
I tried this, still getting similar errors:
Code:
C:\amiga-gcc\cputest>make
sh: /bin/sh: No such file or directory
sh: /bin/sh: No such file or directory
/opt/amiga/bin/m68k-amigaos-gcc -mcrt=nix13 -O2 -m68000 -fomit-frame-pointer -msoft-float -DREVDATE="\"\"" -DREVTIME="\"\"" -DAMIGA -DM68K -I. -c -o main.o main.c
sh: /bin/sh: No such file or directory
sh: *** [makefile:20: main.o] Error 127
Quote:
Originally Posted by jotd View Post
cputest (WinUAE cpu tester) uses Bebbo's gcc toolchain but no shells or crap. Try building that, I could build it with only "make" command installed, no crap msys or sh (sources from WinUAE github in "cputest")
Bren McGuire is offline  
Old 07 June 2023, 08:45   #12
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
The package setup-amiga-gcc.exe is intended to be used in Windows without installing MSYS2. It should also work having MSYS2.

I remember there was a problem with make and shell. That's why the cmdline.bat creates a wrapper for make.exe. The real make.exe was renamed to _make.exe. The new make.exe invokes _make.exe with setting SHELL=c:\amiga-gcc\bin\sh.exe

If you are using MSYS2 then you have to verify which make.exe is used. Also some of the DLLs may be duplicates or even worse: differ a bit.

Invoke a real make.exe - not the wrapper and maybe you have to provide the variable SHELL=....

You should remove all files in amiga-gcc/bin which are dups of files in MSYS2


Nowaday you shouldn't use MSYS2, you should use WSL2, which is soooooooooooooooooooooo much faster.

Last edited by bebbo; 07 June 2023 at 11:37.
bebbo is offline  
Old 07 June 2023, 18:02   #13
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
Quote:
Originally Posted by Bren McGuire View Post
I tried this, still getting similar errors:
Code:
C:\amiga-gcc\cputest>make
sh: /bin/sh: No such file or directory
sh: /bin/sh: No such file or directory
/opt/amiga/bin/m68k-amigaos-gcc -mcrt=nix13 -O2 -m68000 -fomit-frame-pointer -msoft-float -DREVDATE="\"\"" -DREVTIME="\"\"" -DAMIGA -DM68K -I. -c -o main.o main.c
sh: /bin/sh: No such file or directory
sh: *** [makefile:20: main.o] Error 127
use the proper make.exe. then there is stuff to change from command line. more later (on my phonE right now)
jotd is offline  
Old 07 June 2023, 18:10   #14
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
i installed msys2 following some guide. i will uninstall it then.
as for the wsl i dont know if i have enough space in my drive to run a linux subsystem, will look into it

thanks all for your help so far

[edit] i uninstalled msys2 and i still get the same error trying to compile cputest
Bren McGuire is offline  
Old 07 June 2023, 20:01   #15
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
Ah, I can reproduce you issue with just:
Code:
.PHONY: test
test:
        echo Hello!
This gives:
Code:
echo Hello!
sh: /bin/sh: No such file or directory
sh: *** [Makefile:3: test] Error 127
Adding "SHELL=sh" to the start of the makefile resolves it.

Not sure what's causing it, but I think you can work around it by using another version of "make" with the amiga-gcc distribution (needs to be earlier in the path obviously). I'm using the one from https://nuwen.net/mingw.html (for the gcc part) but YMMV.
paraj is offline  
Old 08 June 2023, 19:59   #16
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
I went ahead with your advice so now i have un installed msys2 and I have a Debian install on Windows, but no idea how to proceed
what should I do? i am still getting the error
Quote:
Originally Posted by bebbo View Post
Nowaday you shouldn't use MSYS2, you should use WSL2, which is soooooooooooooooooooooo much faster.
Bren McGuire is offline  
Old 10 June 2023, 16:04   #17
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
anyone can help at this point? bebbo?
Bren McGuire is offline  
Old 10 June 2023, 18:15   #18
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,174
the version of "make" is at fault

Code:
K:\jff\AmigaHD\PROJETS\arcade_remakes\pengo\src>c:\amiga-gcc\bin\make.exe -v
GNU Make 4.4
Built for x86_64-pc-msys
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

K:\jff\AmigaHD\PROJETS\arcade_remakes\pengo\src>make -v
GNU Make 3.82
Built for i686-pc-mingw32
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
you need the one which isn't built for MSYS. I've zoned it
jotd is offline  
Old 12 June 2023, 01:09   #19
Bren McGuire
Registered User
 
Bren McGuire's Avatar
 
Join Date: Nov 2019
Location: Croydon
Posts: 580
i figured out how to make wsl2 work and now i can compile cputest ! i didnt realize i should follow instructions to make it work like if it was Linux because it is Linux
Bren McGuire is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
StormC makefile to classic "gcc" make file conversion tools ? kas1e Coders. General 0 31 March 2022 08:26
bebbo gcc+eclipse problem Raislin77it Coders. C/C++ 1 15 February 2022 08:37
gcc-bebbo: argc is always 0 sparhawk Coders. C/C++ 8 31 January 2021 18:42
Anyone able to make Cobra work? Mclane support.WinUAE 6 05 September 2010 15:40
Can anyone make this demo work? Ziaxx support.Demos 20 02 January 2002 21:03

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:15.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10034 seconds with 13 queries