Fresh install Build Failed - using Cygwin64

CodeLite installation/troubleshooting forum
cpcfreak
CodeLite Curious
Posts: 2
Joined: Wed Sep 23, 2020 5:39 am
Genuine User: Yes
IDE Question: C++
Contact:

Fresh install Build Failed - using Cygwin64

Post by cpcfreak »

Hi Forum,

I've installed CodeLite 14.0 on a Win 10 system, which already has working MS Visual Studio Code and Code::Blocks installs using WSL2 and Cydwin64.

It's a bit of a mixed environment mostly due to various installs to support preferred IoT libraries and build configs.

I want to get CodeLite running as it is the preferred IDE for a MOOC I'm enrolled in, and I'm the odd one out not using it at the moment.

After a clean install it fails to build the demo/test App as follows;
Screenshot 2020-09-23 115602.jpg
Build Log
C:\WINDOWS\system32\cmd.exe /C C:/cygwin64/bin/make.exe -j8 -e -f Makefile
----------Building project:[ First - Debug ]----------
make[1]: Entering directory '/cygdrive/c/Users/JustinH/Documents/CodeLite/C_C++/First'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [First.mk:84: MakeIntermediateDirs] Error 1
make[1]: *** Waiting for unfinished jobs....
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [First.mk:88: ../build-Debug/First/.d] Error 1
<built-in>: fatal error: opening dependency file ../build-Debug/First/main.c.o.d: No such file or directory
compilation terminated.
make[1]: *** [First.mk:99: ../build-Debug/First/main.c.o.d] Error 1
make: *** [Makefile:5: All] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/JustinH/Documents/CodeLite/C_C++/First'
====0 errors, 0 warnings====

I've configured the build settings as follows for Cygwin64;
Screenshot 2020-09-23 114931.jpg
At first I thought it was a problem with the cygdrive path, but given all the other software using Cygwin64 is working I'm reluctant to make other changes to get CodeLite working.

I'm hoping someone will be able to give me advise about how to change the CodeLite setup to get it working without breaking the other installs?
You do not have the required permissions to view the files attached to this post.
DavidGH
CodeLite Plugin
Posts: 819
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Fresh install Build Failed - using Cygwin64

Post by DavidGH »

Hi,

I'm in the enviable situation of using standard Linux, not cygwin, so I don't speak from experience or knowledge. However searching for the 'syntax error: unexpected end of file' error message suggests that cygwin is confused by incorrect eol symbol:

'The following problem mainly occurs in Cygwin when you try to run a shell script which is edited or created in DOS/Windows or old Mac systems. In DOS/Windows text files new line is a combination of two characters : a Carriage Return (\r) followed by Line Feed (\n) character.'

Regards,

David
cpcfreak
CodeLite Curious
Posts: 2
Joined: Wed Sep 23, 2020 5:39 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Fresh install Build Failed - using Cygwin64

Post by cpcfreak »

Hi David,

Thanks for your help.

I found some posts on Github that hinted / pointed me in the right direction.
From what I can see, CodeLite fails to create the Debug folder
What happens when you switch the build system?
Right click on the project -> project settings -> General tab -> Makefile Generator
and select CodeLite Make Generator

Try and build again, does it help?
The problem was having "CodeLite Make Generator" selected in the Build Systems tab, switching to default solved the problem. I'm not sure of the root cause here, but setting Default removes the error as the program then correctly creates the Debug folders. It is something I'll need to look into later because other people seem to be using CodeLite Make Generator as the build system setting without trouble.

Regards.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Fresh install Build Failed - using Cygwin64

Post by eranif »

The new Makefile generator (CodeLite Makefile Generator) generates Makefile that suits the current OS.
I have added in Git master a new generator named "CodeLite Makefile Generator - UNIX" which forces CodeLite to generate Makefiles suitable for UNIX systems even when on Windows
Make sure you have read the HOW TO POST thread
Post Reply