Euphoria Ticket #665: Unpatched Windows machines cannot run EUPHORIA 4.0

This problem affects every binary but is not a language, error reporting or front end issue.

Unpatched Windows 9x machines which lack certain socket dlls cannot run EUPHORIA 4.0 interpreter or even translated versions of their programs.

Programs die with a cannot find dll error. Stating the culprit as the Windows Sockets DLL.

We can release separate socket-less and socket-enabled binaries, use dynamic loading in the c-source and load the library if used, or migrate socket functions to its own DLL that EUPHORIA could use when needed.

Details

Type: Bug Report Severity: Major Category: Other
Assigned To: unknown Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone: 4.0.5

1. Comment by SDPringle May 31, 2011

The Watcom case is fixed. For GNU MINGW, I will leave this in the hands of someone has that development toolkit.

2. Comment by ne1uno May 31, 2011

I wonder if InitCommonControlsEX will also be a problem unless IE4 or greater is installed?

msvc compilers can set delay load on dll's but not watcom or minGW w/o some stub or extra handling.

3. Comment by SDPringle Jun 12, 2011

I have been told that I wasn't specific enough when I said that the watcom case had been fixed. Under Windows and if you use the Watcom compiler to build them. Programs created by the translator and watcom compiler will not link to the socket library until you try to use a socket routine via the socket support routines in std/socket.e. The EUPHORIA binaries will not try to link to the socket library until you try to use the socket routines if they are built with Watcom. However, I made no attempt to removing linking to the windows sockets library using GCC. This is because I don't have GCC on my machine.

Now, you should be able to build the binaries using mingw without the socket library named on the link line in Makefile.gnu. If someone reports that this doesn't break the build, then they can safely do the same in buildsys.e and both cases will be complete.

4. Comment by ne1uno Jun 13, 2011

me too, I assumed minGW/gcc needed more code to defer loading ws2_32

testing current 4.0 from yesterday w/minGW gcc

remove -lws2_32 in Makefile.gnu at 
	LDLFLAG=-lws2_32 -lcomctl32 
 
remove -mno-cygwin -lws2_32 in buildsys.e at 
	l_flags &= " -mno-cygwin -lws2_32 -lcomctl32" 
make interpreter 
 
gets 
  eu4m/build4m0/intobj/back/be_socket.o:be_socket.c:(.text+0x195):  
undefined reference to `WSAStartup@8' 
etc. more socket functions undefined 

doesn't look like ws2_32 was removed from buildsys.e for watcom yet?

or Makefile.wat

	@%append $(BUILDDIR)\$(OBJDIR)\euiw.lbc library ws2_32  

wmake interpreter 
WS2_32.DLL still listed as a dependence for eui.exe

have you pushed the changes yet? eudoc/creole too.

5. Comment by ne1uno Jun 13, 2011

looks like this change was added to default tip, but never merged into 4.0

when I try to build ARM or default w/minGW gets

be_socket.c:675:10: error: expected ')' before 'const' 
 

6. Comment by SDPringle Jun 13, 2011

I think GNU-C may be having trouble with the __in macro.

7. Comment by mattlewis Jun 14, 2011

See:

http://scm.openeuphoria.org/hg/euphoria?cmd=changeset;node=b40dd8dad49a

Now MinGW (4.5.2) builds the trunk for me.

8. Comment by SDPringle Jun 14, 2011

I tested this on a Windows 95 machine and use 'InitCommonControlsEX' is a problem.

9. Comment by mattlewis Jun 14, 2011

Can you be more specific? Does comctl32.dll exist? What version of IE?

10. Comment by SDPringle Jun 14, 2011

According to the MSDN site (pointed out by ne1uno) InitCommonControlsEx() is available if and only if the system contains IE4 or later. I tested this on a Windows 98SE machine and found it works fine. It had IE6. Before these changes the Windows 98SE machine wouldn't work because ws2_32.dll sockets 2.2 require more than what it has. I am not sure what version of Windows you need for sockets 2.2, but it won't keep you from using EUPHORIA now.

So our new requirements are version Windows 9x or higher with Internet Explorer 4 or higher

11. Comment by ne1uno Jun 14, 2011

after in out defined, minGW gcc4.5.2 still fails to link with -lws2_32 removed from LDLFLAG in Makefile.gnu but with less errors than previously

/build4m1/intobj/back/be_socket.o:be_socket.c:(.text+0x182a):  
undefined reference to `__WSAFDIsSet@8' 
/build4m1/intobj/back/be_socket.o:be_socket.c:(.text+0x1854):  
undefined reference to `__WSAFDIsSet@8' 
/eu4m/build4m1/intobj/back/be_socket.o:be_socket.c:(.text+0x187b):  
undefined reference to `__WSAFDIsSet@8' 
collect2: ld returned 1 exit status 

12. Comment by mattlewis Jun 14, 2011

See: hg:euphoria/rev/bb18217149bf

changeset: 4954:bb18217149bf tag: tip user: Matt Lewis date: Tue Jun 14 12:30:16 2011 -0400 files: source/Makefile.gnu source/be_socket.c description:

  • MinGW build now dynamically links to sockets library
  • ticket 665

13. Comment by SDPringle Jun 14, 2011

Where should we document the Windows requirements? Should that be in docs/platform.doc or is there a better place for this?

14. Comment by SDPringle Jun 16, 2011

See: hg:euphoria/rev/fb9f264628e7

changeset: 4966:fb9f264628e7 branch: 4.0 user: Shawn Pringle <shawn.pringle@gmail.com> date: Wed Jun 15 23:59:27 2011 -0300 files: docs/installing.txt docs/release/4.0.3.txt description:

  • documented changes in progress for ticket 665

15. Comment by SDPringle Jun 16, 2011

See: hg:euphoria/rev/3dedc90f505c

changeset: 4967:3dedc90f505c branch: 4.0 tag: tip user: Shawn Pringle <shawn.pringle@gmail.com> date: Thu Jun 16 16:09:43 2011 -0300 files: docs/release/4.0.3.txt source/Makefile.gnu source/Makefile.wat source/be_runtime.c source/buildsys.e description:

  • ticket 665: comctl32 is now loaded dynamically.

16. Comment by SDPringle Jun 20, 2011

Now there is a new problem on old 95 machines. Instead of issuing a dialog about a missing function it now simply returns back to the command prompt. It doesn't execute the programs you pass to it and it doesn't show the help screen when you call it without arguments. It could be that the command interpreter is not calling WinMain().

On Windows 98, it does the right thing on the command line.

Python displays a message to upgrade to a more recent version of Windows whether you run it on 95 or on 98.

I am ready to say the minimal working OS with EUPHORIA is Windows 95 service pack 2.5.

Even putting printf("This runs\n"); at the top of WinMain() has no effect, so it doesn't seem like it ever calls WinMain() under 95. Maybe the command interpreter is doing the wrong thing.

17. Comment by SDPringle Apr 23, 2012

Sockets require at least Windows 2000 Professional or Server to work and has_console requires at least Windows XP/2003. It makes sense that we document these things which are version dependent and set the installer to not install on old Windows machines that do not have what is required to run.

18. Comment by SDPringle May 06, 2012

See: hg:euphoria/rev/1be6fe8ea925

changeset: 5555:1be6fe8ea925 branch: 4.0 parent: 5530:1a89e7c5bc85 user: Shawn Pringle <shawn.pringle@gmail.com> date: Sun May 06 00:57:29 2012 -0300 files: docs/installing.txt docs/platform.txt docs/release/4.0.5.txt include/std/console.e include/std/socket.e packaging/win32/euphoria-ow.iss packaging/win32/euphoria.iss source/be_socket.c source/be_w.c description:

  • documented minimal requirements for various features in EUPHORIA on various platforms.
  • set minimal version for Windows in its installer to avoid installing on computers that it wont work on.
  • maybe fixes ticket 665

Search



Quick Links

User menu

Not signed in.

Misc Menu