Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using the make command and passing command line parameters, wsl will not choose to recompile certain files #11375

Closed
1 of 2 tasks
zcq-zwy opened this issue Mar 26, 2024 · 3 comments
Labels

Comments

@zcq-zwy
Copy link

zcq-zwy commented Mar 26, 2024

Windows Version

10.0.22621.3296

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu-22.04

Other Software

No response

Repro Steps

1.Normal test situation

This is the directory structure of the project:

image

With make clean-all abstract-machine ahead of time it behaves correctly

image

It will recompile the c file under abstract-machine,The command line parameter passed this time is mainargs=uuusss

image

The results are as expected
image

2.Abnormal test situations

When I tested again and passed different mainargs parameters(mainargs=uuusssooo), it did not recompile the trim.c file.

image

This is the result of the abnormal test. This is another result. Although it is the same as the above test result, there is another point to note. The compilation time of my statistics is the same

image

3. summary

When I type the make command in wsl and use it with the mainargs parameter to the project's c-file, I find that sometimes passing a different parameter doesn't cause that c-file that needs the command line parameter to recompile, when I test it under the VM, it does recompile that c-file。

There shouldn't be anything wrong with the makefile file, because I tested this situation under a virtual machine and it was fine

Expected Behavior

I'd like to see 2 different make commands (meaning carrying different mainargs arguments) that give results that print different mainargs arguments, rather than using the same ones as last time.

Actual Behavior

2.Abnormal test situations

When I tested again and passed different mainargs parameters(mainargs=uuusssooo), it did not recompile the trim.c file.

image

This is the result of the abnormal test. This is another result. Although it is the same as the above test result, there is another point to note. The compilation time of my statistics is the same

image

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Copy link

Diagnostic information
Found '/question', adding tag 'question'

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 26, 2024

Closing since there's no repro instructions and the issue doesn't come from WSL.

For context: WSL doesn't control make's behavior, but only runs it.

@OneBlue OneBlue closed this as completed Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants