Code::Blocks Forums

User forums => Help => Topic started by: Mr. Egg on September 25, 2020, 09:51:22 pm

Title: Can't compile Makefile, process terminated with status 2
Post by: Mr. Egg on September 25, 2020, 09:51:22 pm
Hi, I'm trying to compile a makefile but everytime I try to I kept getting this code from the build log. I'm not really sure on how to go on upon this and where to go, what does it mean and how I fix this? Thank you in advance

Code
-------------- Build: 3dsx in Project_PC_3ds_game (compiler: GNU GCC Compiler)---------------

Checking if target is up-to-date: mingw32-make.exe -q -f Makefile 3dsx
Running command: mingw32-make.exe -f Makefile 3dsx
mingw32-make.exe: *** INTERNAL: readdir: Invalid argument.  Stop.
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Here is a picture if you want to see it

Title: Re: Can't compile Makefile, process terminated with status 2
Post by: oBFusCATed on September 26, 2020, 12:40:34 am
Edit the make commands in your project -> build options. You have to remove the target variables, or make sure that the targets in your project have the same names as targets in your makefile.
Title: Re: Can't compile Makefile, process terminated with status 2
Post by: Mr. Egg on September 26, 2020, 05:52:48 am
Can you clairfy on what you mean and where I can check to fix it? I'm still new Code: Blocks and confused on where to go.
Title: Re: Can't compile Makefile, process terminated with status 2
Post by: stahta01 on September 26, 2020, 09:39:14 am
Checked against Code::Blocks SVN version 9958 which is the version I am using for an custom CB project.
This area seems to have not changed in SVN trunk.
Project -> Build Options
Select Target or Project in left hand list (You likely want target 3dsx) Edit: Add name of target from OP error
Tab: "Make Commands"

Likely need to change "Ask if rebuild is needed" Edit: Correction this seems to be the wrong command to edit.
From
Code
$make -q -f $makefile $target
to
Code
$make -q -f $makefile

Tim S.
Title: Re: Can't compile Makefile, process terminated with status 2
Post by: Mr. Egg on September 26, 2020, 04:50:01 pm
Hi, thank you for your response.

I did what you suggested but sadly it didn't work. I noticed that the same results keeps happening

Title: Re: Can't compile Makefile, process terminated with status 2
Post by: oBFusCATed on September 26, 2020, 10:07:59 pm
You've not modified the correct command. Check all targets and the root in the project -> build options.