Giter Site home page Giter Site logo

Windows support about cvise HOT 15 OPEN

marxin avatar marxin commented on May 26, 2024
Windows support

from cvise.

Comments (15)

aytey avatar aytey commented on May 26, 2024 2

For psutil, and if you're restricted in what you can download/install, I would git clone the psutil repo, run python setup.py build and then manually set PYTHONPATH to use the build folder.

from cvise.

aytey avatar aytey commented on May 26, 2024 1

@JVApen what are you trying to reduce here? Do you have access to a Linux box?

I have successfully reduced multiple, many-MiB TUs, compiled with MSVC, using cvise, but doing it via Wine -- my "interestingness test" simply called cl.exe under wine, and /et voila/.

from cvise.

JVApen avatar JVApen commented on May 26, 2024 1

I've started again from trunk 1.3 trying to get it compiling again.
With MSVC, I seem to be needing /bigobj, beside that, everything seems to build from scratch.

The newly added delta does give some of the previous issues:

  • -Wno-unused-function -Wno-unused-parameter doesn't work for MSVC.

All .l files still needed the %option nounistd

Time to try it out

from cvise.

marxin avatar marxin commented on May 26, 2024

Thank you for testing build on Windows! I'm seeking for somebody who can help me with that.
I fixed the 2 errors you mentioned and I'm curious about compiler warning you see right now?
What do you mean by native windows support? A prebuilt installer?

Yes, the clang_delta compilation takes quite some time, LLVM is a huge project.

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Hey Marnix, I'm so glad you made this fork, I've been doing these reductions by hand the last few years. Python is a bit easier to hack than perl to work around some restrictions.

Native windows support for me a gradient, with following elements:

  • Compile from source results in a build that is directly runnable
  • Have actual tests/CI running on windows
  • Have pre-build executables (I don't like installers, a .zip is good enough)

I still haven't managed to get things completely working. However, I made some progress already. Current issues I'm having: unifdef can't be found. So I currently disabled the reductions that relied on that, and am trying to get a simple reduction working.

I saw unifdef is part of CReduce as C or C++ compiled to an exe, here I found a python script. Is that a replacement for that C/C++ code? If so, on windows, those things don't become executable by default. So than I might have to check if it's possible to wrap this in a .cmd file that launches python with that script.

from cvise.

marxin avatar marxin commented on May 26, 2024

Hey Marnix, I'm so glad you made this fork, I've been doing these reductions by hand the last few years. Python is a bit easier to hack than perl to work around some restrictions.

Yes, I like Python and I hope it's accessible also for other developers.

Native windows support for me a gradient, with following elements:

  • Compile from source results in a build that is directly runnable
  • Have actual tests/CI running on windows
  • Have pre-build executables (I don't like installers, a .zip is good enough)

Good. I think the best would be to start with https://www.appveyor.com/.
I know godot uses that where the syntax is quite close to Travis CIL
https://github.com/godotengine/godot/blob/master/.appveyor.yml

I still haven't managed to get things completely working. However, I made some progress already. Current issues I'm having: unifdef can't be found. So I currently disabled the reductions that relied on that, and am trying to get a simple reduction working.

I've just pushed a commit that skips passes that don't have prerequisites.

I saw unifdef is part of CReduce as C or C++ compiled to an exe, here I found a python script. Is that a replacement for that C/C++ code?

Right, CReduce contains the project. I didn't want to bundle all tools that are part of a standard distribution.

If so, on windows, those things don't become executable by default. So than I might have to check if it's possible to wrap this in a .cmd file that launches python with that script.

It's really missing, but there are instructions about how to build it on Windows:
https://dotat.at/prog/unifdef/

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Thanks for the update, I'll download new source code (can't checkout from git). Unifdef doesn't have instructions for visual studio not has CMake, that's annoying.

From an error point of view, the warning could explain what the missing dependency is

from cvise.

marxin avatar marxin commented on May 26, 2024

Thanks for the update, I'll download new source code (can't checkout from git). Unifdef doesn't have instructions for visual studio not has CMake, that's annoying.

I see. If it's the last remaining blocker I tend to bundle it (it's small).
About the other dependencies: how do you install things like clang-devel, llvm-devel, cmake and flex? I can experiment with AppVeyor then..

From an error point of view, the warning could explain what the missing dependency is

from cvise.

marxin avatar marxin commented on May 26, 2024

@JVApen Have you made a progress, please?

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Not yet, looking at this is an extra evening activity. Haven't had the ability to look further at this.

from cvise.

JVApen avatar JVApen commented on May 26, 2024

I truly wish I had access to Linux or even WSL to try that out. I even have restrictions in downloading packages. To come back to what I want to reduce, bugs (or differences) in clang-cl and cl

from cvise.

aytey avatar aytey commented on May 26, 2024

Awesome news you have it building on Windows!!!

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Yeah, now I'm trying it out, thanks to a new dependency, I now have to find a way to hack in psutil without the ability to install it. That's gonna be for later.

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Thanks, I was updating the PATH variable, not the PYTHONPATH variable. That got things working :)

Some new improvements, following snippet doesn't work in batch:

  DIR=`mktemp -d`
  cp c:\path\to\t.cpp $DIR
  cd $DIR
  C:\Path\to\checkSuccess.bat c:\path\to\t.cpp
  echo $?

What I changed it to, based on https://stackoverflow.com/a/32109191/2466431

@echo off
setlocal EnableExtensions

:uniqLoop
set "DIR=%tmp%\cvise~%RANDOM%.tmp"
if exist "%DIR%" goto :uniqLoop
mkdir %DIR%
copy c:\path\to\t.cpp %DIR%
cd /D %DIR%
call C:\Path\to\checkSuccess.bat t.cpp
echo %errorlevel%

from cvise.

JVApen avatar JVApen commented on May 26, 2024

Thanks for the update, I'll download new source code (can't checkout from git). Unifdef doesn't have instructions for visual studio not has CMake, that's annoying.

I see. If it's the last remaining blocker I tend to bundle it (it's small).
About the other dependencies: how do you install things like clang-devel, llvm-devel, cmake and flex? I can experiment with AppVeyor then..

From an error point of view, the warning could explain what the missing dependency is

To reply on the installation things:

  • CMake comes bundled with Visual Studio, so is available.
  • Clang and LLVM build (I have downloaded the code) via CMake using the visual studio compiler.
  • WinFlexBison provides flex via a visual studio solution https://github.com/lexxmark/winflexbison

So, I'm basically doing those things from source, however, they all have some support for MSVC

from cvise.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.