From: Duft M. <Mar...@sa...> - 2006-11-06 08:17:18
|
For future use forwarded to mailing list. Note: as seen in here the VC98 (VC6) ml.exe does not work with wgcc. Cheers, Markus -----Original Message----- From: Steve Bardwell [mailto:SBa...@lb...]=20 Sent: Sunday, November 05, 2006 4:10 PM To: Duft Markus Subject: RE: Problems installing wgcc Markus - OK. I am understanding more of this -- one must use the Windows APIs to do anything! I replaced my Unix socket commands: 'read()' with 'recv()' 'write()' with 'send()' and I get errors using WSAGetLastError() and it is now working!!!! This is enough so that I can code the programs I need as Win32 executables. Many thanks for your help and for your compiler! I am happy. Steve =20 -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Friday, November 03, 2006 10:21 AM To: sba...@lb... Subject: RE: Problems installing wgcc Hi! It now compiles ;o) differences in diff file, new version in attached .c.new ;o) The thing is that lot's of signals are not available on windows, and winsock uses slightly different names for some defines. Additionally you will have to reimplement mygethostname somehow for windows, but that should not be a big problem, consult msdn here. You really should fix the remaining warnings ;o) Cheers, Markus=20 -----Original Message----- From: Steve Bardwell [mailto:sba...@lb...] Sent: Friday, November 03, 2006 3:46 PM To: Duft Markus Subject: RE: Problems installing wgcc Getting closer! I have simplified the source (attached) with only one local Include file. What are your suggestions for the following output from wgcc: $ wgcc -o test_ipsock test_ipsock.c error : execution of task seemed to fail, return code 512 C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(46) : error C2373: 'gethostbyname' : redefinition; different type modifiers V:\Vc7\PlatformSDK\Include\WinSock2.h(2120) : see declaration of 'gethostbyname' C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(157) : error C2065: 'SIGALRM' : undeclared identifier C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(316) : error C2065: 'ECONNREFUSED' : undeclared identifier C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(350) : error C2079: 'utsn' uses undefined struct 'utsname' C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(362) : error C2224: left of '.nodename' must have struct/union type C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(362) : error C2198: 'strcpy' : too few arguments for call through pointer-to-fun ction fatal : compiler queue didn't complete, cannot continue Steve =20 -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Friday, November 03, 2006 9:11 AM To: sba...@lb... Subject: RE: Problems installing wgcc Hey! Cool ;o) Just ifdef out the include for netdb.h, you won't need it on windows i think. The thing is, that wgcc uses the include directories from cl.exe, and not /usr/include. This is the reason for pxwc ;o) it abstracts away lots of issues with the cl.exe includes. The /usr/include files would require the interix libc to be used, and that is against the concept of wgcc -> it's purpose is to create native executables with the native runtime, so it's all windows ;o) Cheers, Markus=20 -----Original Message----- From: Steve Bardwell [mailto:sba...@lb...] Sent: Friday, November 03, 2006 2:52 PM To: Duft Markus Subject: RE: Problems installing wgcc Markus - It now passes all the tests!! Since I have you on the line, I will keep asking questions until you get tired! =20 So, to compile my test program, I am running: Wgcc -o test_ipsock test_ipsock.c I now get the error: $ wgcc -o test_ipsock test_ipsock.c error : execution of task seemed to fail, return code 512 C:\SFU\tmp\wgcc\installed\bin\test_ipsock.c(16) : fatal error C1083: Cannot open include file: 'netdb.h': No such file or directory fatal : compiler queue didn't complete, cannot continue Of course, there is 'netdb.h' in /usr/include. Steve -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Friday, November 03, 2006 8:33 AM To: sba...@lb... Subject: RE: Problems installing wgcc Hi! Sorry, i forgot: you will have to re configure for the vs checks to run again, so wgcc gets the correct visual studio. After that please edit .wgccrc in your build directory again to have debuglevel f3. Hope it works then ;o) Cheers, markus=20 -----Original Message----- From: Steve Bardwell [mailto:sba...@lb...] Sent: Friday, November 03, 2006 2:27 PM To: Duft Markus Subject: FW: Problems installing wgcc OK. I also have Visual Studio .NET 2003 installed. I changed the INTERIX_COMPILEDIR environment variable to point to it (instead of my old VC98). I ran the following commands: make clean make make check gmake check TESTS=3D"assembler.test" I have attached the 'wgcc_debug.out'.=20 Steve =20 -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Friday, November 03, 2006 7:28 AM To: sba...@lb... Subject: RE: Problems installing wgcc Hey! When looking again over your output i saw that you're using VC98... I never tested anything with such an old version, so i'm not quite sure if it's not a problem with wgcc/ml.exe versions... Additionally there is no platform sdk in your configuration. This doesn't matter for the tests, but you'll need it to compile your test program you sent me. The wgcc configure script is very limited in detecting platform sdk and compiler location, so you'll have to add paths you allways need manually. Cheers, Markus -----Original Message----- From: Steve Bardwell [mailto:sba...@lb...] Sent: Friday, November 03, 2006 12:09 PM To: Duft Markus Subject: FW: Problems installing wgcc =20 Markus - Here are the two files created with the new debug level. I may have not gotten the paths correctly set before running the tests, so I will run these again if necessary. Thanks again. Steve =20 -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Friday, November 03, 2006 1:52 AM To: Steve Bardwell Subject: RE: Problems installing wgcc Hi! Uff, sorry, i messed up something ;o) the tests use the non-installed .wgccrc that is on your machine: /dev/fs/T/wgcc/build.wgcc/.wgccrc Set the debuglevel there please. For the Windows Version: the versions that we (our company) support with our software are: Windows 2000 with Interix 3.5 Windows XP with Interix 3.5 Windows Server 2003 R2 (!) with Interix 5.2 The "R2" is very important ;o) The thing is that win server 2003 has proven very unstable when building things. We build things on windows server 2003 R2 and then copy the binaries to the 2003 SP[0|1] if we really need them there. There are some hotfixes available for which one would have to contact microsoft to get them, and they _may_ fix _some_ problems, but i don't think that it ever will work as good as the other combinations. You may want to have a look at http://www.duh.org/interix/hotfixes.php . I don't know if this is really legal, since microsoft request you to contact them, but i googled this one out ;o) For the test program. There for sure will be some minor issues when porting to wgcc, since you're using the native compiler then, but as far as the socket stuff is concerned, there is not a big problem there; try with including WinSock2.h all functions should be there. The bigger problem will be getopt i think, since there is no implementation available. You may want to have a look at the attached version of getopt which i modified (original from berkeley db) to support even shared libraries (just some pointers more in this case) ;o) Just try to compile it, i did, but i'm missing tons of headers, of course ;o) I'll be glad helping you with any issue coming up... Cheers, Markus -----Original Message----- From: Steve Bardwell [mailto:SBa...@lb...] Sent: Thursday, November 02, 2006 6:54 PM To: Duft Markus Subject: RE: Problems installing wgcc Markus - Many thanks for your help. First, a couple of things: 1) I was incorrect about my machine. It is running W2003 WITHOUT SP1. 2) my ultimate goal is to produce Win32 executables for programs like the attached source. Specifically, I am hoping to build programs that use Unix network APIs (gethostbyname, etc). Will this work? I have been using Cygwin to build a Win32 executable and am not happy with the results. I ran the two commands you requested after changing the preferences: * gmake check TESTS=3D"assembler.test" -- the wgcc_debug.out is attached. * gmake check TESTS=3D"static.test" -- no wgcc_debug.out file was created. The output to the screen from the command is attached (g.out). Thanks again for your help. Steve -----Original Message----- From: Duft Markus [mailto:Mar...@sa...] Sent: Thursday, November 02, 2006 1:10 AM To: Steve Bardwell Subject: RE: Problems installing wgcc Hey! I'm really proud to hear that some more people start using wgcc - or try to ;o) It doesn't look too bad in your case i think, even though in our company Win2003SP1 is the only windows version thats left out because it's known to make much trouble with interix. We had big problems compiling even simple hallo world programs without crashes ... (not wgcc but gcc an cl.exe directly) But now for your problem: things look fine except for the two tests. Maybe you could do the following: Edit your ${prefix}/etc/.wgccrc so that: "color =3D 0" and "debuglevel = =3D f3". Then run 'gmake check TESTS=3D"assembler.test"'. In the ${buildddir}/tests/.compile directory should be a file containing the wgcc debug output: wgcc_debug.out Move that file away somewhere and do a 'gmake check TESTS=3D"static.test"'. Again move away the wgcc_debug.out, and mail me those two files. I'll see what i can do. I hope that i will release version 2.0.4 in a few days, maybe this will help! Cheers, Markus -----Original Message----- From: Steve Bardwell [mailto:SBa...@lb...] Sent: Tuesday, October 31, 2006 4:24 PM To: Duft Markus Subject: Problems installing wgcc Markus - I am having trouble installing your 'wgcc' compiler. I have attached the output from the make commands in each build directory. My machine is running Windows 2003 (SP1) with Interix 3.5. I have been using Interix and its compiler for a long time without any problems. I appreciate any guidance you can give me. Steve +----------------------------------------------------------------+ | LBM SYSTEMS CORPORATION | Steven Bardwell, PhD | | 145 Cherry Street | | | New Canaan, CT 06840 | sba...@lb... | | Fax: (203) 966-8242 | (203) 966-0661 | | | | | http://www.lbmsys.com | +----------------------------------------------------------------+ |