Windows Build Failure

These are old archives. They are kept for historic purposes only.
Post Reply
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Windows Build Failure

Post by ajh16 »

I am trying to build the Windows version of 3.2.1 and it is generating a link warning of "warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library" and then it continues building, but my build fails to load with an access violation. I am running the build on Visual Studio .Net (Original) from the VS.Net Command Prompt on a WinXP Pro system. I have activated the zlib option and #undef the prefix_aq. Other than that, it is a standard set of source downloaded off the site. Not sure exactly why I am getting failures. Which version of VS was the makefile.win32 designed for? I have access to 6 enterprise, .net and .net 2003. Any help or a direction to go in would be appreciated. Thanks.
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr »

I compile using VS.NET, but I believe others have used VS.NET 2003. VC6 probably shouldn't be used, it's old, and it's buggy.

That warning though shouldn't really have anything to do with the error you are receiving. Can you give the exact message you get when compiling fails? Not the warning, the actual error message.
-- codemastr
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Update

Post by ajh16 »

I also get the following errors while trying to run a debug build:

src\ircd.c(842) warning C4090:'function': different 'const' qualifier
src\ircd.c(842) warning C4090:'function': different 'const' qualifier
src\res.c(137) warning C4133:'function': incompatible types - from 'int *' to 'const unsigned char *'
LINK: Warning LNK4224: /DEBUGTYPE:BOTH is no longer supported: ignored
LINK: Warning LNK4075: ignoring '/MAPINFO:LINES' due to '/INCREMENTAL' specification

Hope that helps.

(I did that on a completely clean version of source with only the changes I had mentioned before, and copying the contents of the include\win32 directory in to the include directory.)
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Fatal Error

Post by ajh16 »

The code builds, it fails to execute the built file. It gave a fatal error and performed a core dump. Here is the core dump:

Generated at Tue Jul 06 16:59:30 2004

Windows XP Service Pack 1 (5.1.2600)
Unreal3.2.1[FinWXOoZE] (1.1.1.1.2.17 2004/07/03 19:04:02)
-----------------
Memory Information:
Physical: (Available:154MB/Total:510MB)
Virtual: (Available:2016MB/Total:2047MB)
-----------------
Exception:
Access Violation
-----------------
Backup Buffer:

-----------------
Registers:
EAX=0xffffffff EBX=0x7ffdf000 ECX=0x00000031
EDX=0x00000031 ESI=0x00000006 EDI=0x00000020
EIP=0x00431bd0 EBP=0x0012fb4c ESP=0x0012fb48
-----------------
Stack Trace:
Module: wircd
#0 c:\dev\unreal3.2\src\ircd.c:842: do_version_check
#1 c:\dev\unreal3.2\src\ircd.c:1161: InitwIRCD
#2 c:\dev\unreal3.2\src\win32\win32gui.c:646: WinMain
#3 f:\vs70builds\9466\vc\crtbld\crt\src\crtexe.c:392: WinMainCRTStartup
Module: kernel32
#4 f:\vs70builds\9466\vc\crtbld\crt\src\crtexe.c:392: GetCurrentDirectoryW
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr »

That crash is occurring in the zlib check. Apparently, your zlib is not compiled correctly.
-- codemastr
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Ok

Post by ajh16 »

Ok, which version of the zlib libraries should I use. I downloaded the latest versions as of this morning and havn't altered them at all. I will try redownloading them just to be sure something wasn't messed up in the download though.
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
codemastr
Former UnrealIRCd head coder
Posts: 811
Joined: Sat Mar 06, 2004 8:47 pm
Location: United States
Contact:

Post by codemastr »

Most likely, the version on the zlib website will not work with Unreal. You need to recompile it to match the linking flags in use by Unreal. If a library is linked with different flags, it will lead to problems.
-- codemastr
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Post by ajh16 »

Ok, how would I check what the sets of flags are? I'm a CS major and done some basic work with make files, but I'm not exactly fluent in them, so I'm not sure exactly where the flags are that you want to have be the same. If you could describe where they are, I could probably figure it out from there. Thanks.

Also, I'm not sure exactly how I would rebuild the file zlibwapi.dll since I can't seem to find where it's source is built. (Or would I need to rebuild that file?)
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
Syzop
UnrealIRCd head coder
Posts: 2121
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Post by Syzop »

The zlib of the official windows unrealircd is compiled by me as follows:
--
Compiled with .zip from http://www.winimage.com/zLibDll/
(http://www.winimage.com/zLibDll/zlib121.zip)

Then editted win32\makefile.msc:
- Changed -MD to -MDd
- Added -D ZLIB_WINAPI to CFLAGS
- so the result is:
CFLAGS = -nologo -MDd -O2 $(LOC) -D ZLIB_WINAPI

Then compile...
copy stuff over etc...
--
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Cool, Done

Post by ajh16 »

Ok, cool that worked. Now I just have to figure out some new things about the .conf and I'm golden. Thanks for the help.
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Perhaps I spoke too soon.

Post by ajh16 »

For some reason the release build is still saying it is dependant upon the debug versions of the dlls. It wants files like msvcr70d.dll. Am I doing something wrong. I have commented out the debug=1 line. Is there someplace I can download the msc debug DLLs from if this is an artifact.

It is also crashing when the first user logs in. Here is the core dump:

Generated at Tue Jul 06 20:27:49 2004

Windows XP Service Pack 1 (5.1.2600)
Unreal3.2.1[FinWXOoE] (1.1.1.1.2.17 2004/07/03 19:04:02)
-----------------
Memory Information:
Physical: (Available:138MB/Total:510MB)
Virtual: (Available:2010MB/Total:2047MB)
-----------------
Exception:
Access Violation
-----------------
Backup Buffer:
OPER ajh16 password
-----------------
Registers:
EAX=0x01042460 EBX=0x010422f0 ECX=0xffffffff
EDX=0x01042460 ESI=0x00000018 EDI=0x00010000
EIP=0x00fdf599 EBP=0x0121fdf8 ESP=0x0121fccc
-----------------
Stack Trace:
Module: 653C26FE.commands
#0 (null):0: m_addmotd_Load
Module: wircd
#1 c:\dev\unreal3.2\src\parse.c:440: parse
#2 c:\dev\unreal3.2\src\packet.c:139: dopacket
#3 c:\dev\unreal3.2\src\s_bsd.c:1477: read_packet
#4 c:\dev\unreal3.2\src\s_bsd.c:1937: read_message
#5 c:\dev\unreal3.2\src\ircd.c:1529: SocketLoop
Module: MSVCR70D
#6 c:\dev\unreal3.2\src\ircd.c:1529: beginthread
Module: kernel32
#7 c:\dev\unreal3.2\src\ircd.c:1529: RegisterWaitForInputIdle
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Re: Perhaps I spoke too soon.

Post by aquanight »

ajh16 wrote:For some reason the release build is still saying it is dependant upon the debug versions of the dlls. It wants files like msvcr70d.dll. Am I doing something wrong. I have commented out the debug=1 line. Is there someplace I can download the msc debug DLLs from if this is an artifact.
The official Win32 Installer will download msvc70d.dll if you don't have it. It also comes with the correct build of zlib :) .
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Ok, but...

Post by ajh16 »

Ok, but I'm still getting a debug assertion error when I try to login.

Program: c:\Program Files\Unreal3.2\wircd.exe
File: dbgheap.c
Line 1132

Expression: _CrtlsValidHeapPointer(pUserData)

(I tried using the version of the zlibwapi.dll included with the win32 install, and I realized that you rename the recompiled zlib.dll to zlibwapi.dll, so I was able to figure out the corresponding .lib to go with it. But it still is crashing on the first user to connect.)
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Correction!

Post by ajh16 »

Correction. The server crashes when I attempt a /sethost. I had a /sethost running automatically in my perform.
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
ajh16
Posts: 13
Joined: Fri Jun 18, 2004 7:48 am
Location: Clifton Park, NY
Contact:

Eureka!!!

Post by ajh16 »

Ok, I figured it out. I feel really stupid, but for some reason it didn't occur to me that the modules were being rebuilt, so I hadn't been updating them. I updated the modules to my build of them and things seem to be working beautifully. Thanks again for all the help.
AJ Henderson
IT Director
GameCube Café
http://www.gccafe.com
IRCop
Dorksnet
irc.gccafe.com
Post Reply