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

v2.5.23 not working on Windows XP #61

Closed
a11apurva opened this issue Sep 18, 2020 · 25 comments
Closed

v2.5.23 not working on Windows XP #61

a11apurva opened this issue Sep 18, 2020 · 25 comments

Comments

@a11apurva
Copy link

a11apurva commented Sep 18, 2020

We migrated our entire project to v2.5.23 (Bison-3.7.1) and everything worked wonderfully on Windows 10. However today when I tried on windows-XP I am getting the following error - bison: cannot execute: %1 is not a valid Win32 application.

Win 10 -

$ bison.exe --version
bison (GNU Bison) 3.7.1
Written by Robert Corbett and Richard Stallman.

Win XP -

$ bison.exe --version
bison: cannot execute: %1 is not a valid Win32 application.

Can you please help? I was able to build my project on XP using the Bison executable for Bison-2.4

edit -

$ file bison.exe
bison.exe:      extended DOS executable (.EXE) -- Win32 or NT Portable format
@GitMensch
Copy link
Collaborator

@a11apurva
Copy link
Author

@GitMensch, I tried, but unfortunately it is threw the same error with this too.

@lexxmark
Copy link
Owner

As I remember under VS2015 we should explicitly enable XP support in project settings. I believe VS2019 doesn't support XP anymore.

You can try to build bison source code using VS2015 with proper settings but it might not compile because of outdated С++ compiler.

@GitMensch
Copy link
Collaborator

I think we should set the cmake up to let the VC2015 environment use the -xp toolset.
This way we can provide it (as long as VS2015 builds it the -xp toolset should do the same; and VC2015 is also the minimal version for the gnulib parts that handle VC, so it should be fine).

@lexxmark
Copy link
Owner

I don't have VS2015 to test it.
@GitMensch Could you test it?
There is definition of the build flag needed to support XP in VS2015 https://stackoverflow.com/questions/35664861/how-to-target-windows-xp-in-microsoft-visual-studio-c/35666906

@lexxmark
Copy link
Owner

lexxmark commented Nov 3, 2020

I have added XP support to appveyor script. The following artifact should support XP
https://ci.appveyor.com/api/buildjobs/ri8fcm5b4c0qgc68/artifacts/build%2Fwin_flex_bison-dev-2015-Win32-Release.zip

@a11apurva Please verify.

@a11apurva
Copy link
Author

Hi @lexxmark, works as expected.

$ systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 7 Enterprise
OS Version:                6.1.7601 Service Pack 1 Build 7601

$ bison --version
bison (GNU Bison) 3.7.1
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thanks a lot! Closing the issue.

@GitMensch
Copy link
Collaborator

Hm, I think one last piece is missing:

  • potentially make a release that includes the Appveyor created XP version
  • document "somewhere" which version to use on XP

@lexxmark what do you think?

@GitMensch GitMensch reopened this Nov 25, 2020
@lexxmark
Copy link
Owner

Hm, I think one last piece is missing:

Yes that makes sense.

OS Name: Microsoft Windows 7 Enterprise

@a11apurva why did you test on Windows7 system and not WindowsXP?

@a11apurva
Copy link
Author

@a11apurva why did you test on Windows7 system and not WindowsXP?

That was such a blunder. Apologies.

Same error on XP still -

$ systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft(R) Windows(R) XP Professional x64 Edition
OS Version:                5.2.3790 Service Pack 2 Build 3790
$ bison --version
bison: cannot execute: %1 is not a valid Win32 application.

@GitMensch
Copy link
Collaborator

Please directly cd to the place where the archive was extracted and use win_bison.exe --version - same message?

@a11apurva
Copy link
Author

Tried it on another XP system -

winBison1

@GitMensch
Copy link
Collaborator

@lexxmark You set the VC var PLATFORMTOOLSET, but this is only honored by msbuild. My guess is that CMAKE_VS_PLATFORM_TOOLSET should be set from this variable.

@lexxmark
Copy link
Owner

You set the VC var PLATFORMTOOLSET, but this is only honored by msbuild. My guess is that CMAKE_VS_PLATFORM_TOOLSET should be set from this variable.

Can you try this?

@lexxmark
Copy link
Owner

lexxmark commented Dec 1, 2020

@a11apurva
Copy link
Author

I haven't tested on XP yet as the machine is down, but it says Bison 3.7.4, is this the correct package?

@lexxmark
Copy link
Owner

yes, that's correct. I'm migrating to bison 3.7.4 if it works we can rollup windows XP fix for any version we need.

@a11apurva
Copy link
Author

I am afraid, still not working on XP -

image

@lexxmark
Copy link
Owner

It seems I have to manage to enforce Visual Studio to build project with v140_xp toolset.

The only problem still is that appveyor don't supply VS with such a toolset. Have to dig further.

@a11apurva
Copy link
Author

We have moved all our systems to win10.

If there are no other takers for the Bison with XP support then you guys can park this for now.

@lexxmark
Copy link
Owner

lexxmark commented Jan 6, 2021

OK, I'm going to remove VS2015 support and all XP stuff then.

I think VS2017/VS2019 support would be enough.

@lexxmark lexxmark closed this as completed Jan 6, 2021
@GitMensch
Copy link
Collaborator

I initially was thinking that this is a bad idea, but came to the conclusion that this is fine - people can use an older version for old parsers. The question is: what is the latest release that actually has XP support? Maybe we can hand-craft a version and attach it to one of the releases, adding a release note "last with XP support"?

@lexxmark
Copy link
Owner

lexxmark commented Jan 6, 2021

@GitMensch Are you talking about winflexbison3? I think the regular winflexbison2 last version has XP support.

Someone who will need XP support will help us determine exact winflexbison3 version supporting XP then. I hope no one needed XP support anymore.

@GitMensch
Copy link
Collaborator

GitMensch commented Jan 6, 2021

I think the regular winflexbison2 last version has XP support.

I've jsut tested that with an old VM (Windows Version 5.1 XP SP3 32bit).

Yes, winflexbison2 last version works, winflexbison 2.5.22 (bison 3.5.0, flex 2.6.4) is the most current one that works, from 2.5.23 I see the same failures as here.

... this does make me wonder: what has changed in between?

@lexxmark
Copy link
Owner

lexxmark commented Jan 7, 2021

this does make me wonder: what has changed in between?

My guess is that I just started to create releases by new version of Visual Studio which doesn't support XP any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants