question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WSL "Nothing to compile. Try cleaning the build first."

See original GitHub issue

Super excited to run infersharp on my codebase but it seems that the distro from the releases doesn’t work for me.

I got WSL2 up and running, setup the latest 1.5 distro and tried to run it against my code which gave me Nothing to compile. Try cleaning the build first.. The example folder has the same result (here is the log from infer-out\logs):

[18480][      debug] Sqlite write daemon: starting up
[18480][      debug] Sqlite write daemon: set up complete, waiting for connections
[18480][environment] CWD = /root/infersharp
[18480][environment] Read configuration in /root/infersharp/.inferconfig
[18480][environment] Project root = /root/infersharp
[18480][environment] INFER_ARGS =   @/tmp/args.tmp.2b2a08 --progress-bar-style multiline
[18480][environment] command line arguments:   infer run --cfg-json infer-staging/cfg.json
[18480][environment]                           --tenv-json infer-staging/tenv.json
[18480][environment] Could not retrieve available memory (possibly not on Linux)
[18480][environment] Active checkers: self-in-block (C/C++/ObjC), parameter-not-null-checked (C/C++/ObjC), starvation (C/C++/ObjC, Java), siof (C/C++/ObjC), racerd (C/C++/ObjC, C#/.Net, Java), pulse (C/C++/ObjC, C#/.Net, Erlang, Hack, Java), liveness (C/C++/ObjC), inefficient-keyset-iterator (Java), fragment-retains-view (Java)
[18480][environment] Scheduler: file
[18480][environment] Cores used: 10
[18480][environment] Infer version v1.1.0-9d469330b6
[18480][environment] Copyright 2009 - present Facebook. All Rights Reserved.
[18480][environment] 
[18480][   progress] Capturing using JSON mode...
[18480][      debug] Tenv.store: global tenv has size 92646776 bytes.
[18480][      debug] Tenv.store: canonicalized tenv has size 77879600 bytes.
[18480][      debug] GC stats for capture:
[18480][      debug]   minor_words: 9.76167e+07
[18480][      debug]   promoted_words: 3.50925e+07
[18480][      debug]   major_words: 3.58421e+07
[18480][      debug]   minor_collections: 97
[18480][      debug]   major_collections: 7
[18480][      debug]   compactions: 0
[18480][      debug]   top_heap_words: 38164992
[18480][      debug]   
[18480][  user warn] Nothing to compile. Try cleaning the build first.
[18480][   progress] There was nothing to analyze.
[18480][      debug] GC stats for report:
[18480][      debug]   minor_words: 3977
[18480][      debug]   promoted_words: 0
[18480][      debug]   major_words: 0
[18480][      debug]   minor_collections: 0
[18480][      debug]   major_collections: 0
[18480][      debug]   compactions: 0
[18480][      debug]   top_heap_words: 38164992
[18480][      debug]   
[18480][      debug] GC stats for main_process_full:
[18480][      debug]   minor_words: 1.00486e+08
[18480][      debug]   promoted_words: 3.54107e+07
[18480][      debug]   major_words: 3.61951e+07
[18480][      debug]   minor_collections: 104
[18480][      debug]   major_collections: 7
[18480][      debug]   compactions: 0
[18480][      debug]   top_heap_words: 38164992
[18480][      debug]   
[18481][      debug] Detected 0 spec overwrittes.
[18481][      debug] Sqlite write daemon: terminating
[18480][     result] 
  No issues found  

I saw that a very similar issue was raised here https://github.com/microsoft/infersharp/issues/213, Following the advice there I removed infer-out and infer-staging but got the same result when running either my code or the provided examples.

The staging folder also looks correct image

Is there more verbose logging that I can enable to narrow down the issue? or something that I can change locally so that it works in WSL?

Issue Analytics

  • State:closed
  • Created 3 months ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
matjincommented, Jul 13, 2023

Great! Happy to hear this fixed it 😃

And thank you for working this out! I will modify the documentation.

0reactions
crenercommented, Jul 14, 2023

Thanks for being patent with me 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic CMake C++ WSL project fails to compile
I am trying to use the Build --> Compile functionality of Visual Studio in an almost "Hello World!" program. On a new CMake...
Read more >
windows - WSL doesn't want to launch
If that fails, try unregistering and reinstalling the distribution. wsl --unregister Ubuntu. then go to the Microsoft store and click Launch ...
Read more >
Re: yocto build issue WSL and ubuntu - NXP Community
I I am doing yocto build in WSL environment. However, it is no longer proceeding in nodejs compile. I've been waiting for it...
Read more >
WSL 2 does not have /lib/modules - linux kernel
How to compile and use a kernel in WSL2. In Ubuntu/WSL: sudo apt install build-essential flex bison libssl-dev libelf-dev git dwarves git clone ......
Read more >
Cross‐compile from WSL to Windows with SwiftPM?
In every attempt below, graph resolution succeeds and everything is fetched, but then it fails when it tries to build the first source...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found