Anyone understand what's going on with expat? I noticed pyexpat stopped compiling on Windows a day or two ago, but didn't have time to look at it. Today I see it compiles, but generates lots of linker warnings: Creating library ./pyexpat.lib and object ./pyexpat.exp LINK : warning LNK4049: locally defined symbol "_XML_GetSpecifiedAttributeCount" imported LINK : warning LNK4049: locally defined symbol "_XML_Parse" imported LINK : warning LNK4049: locally defined symbol "_XML_ErrorString" imported etc. Are we trying to break away from the SourceForge expat project? Seems a dubious idea, if so. In any case, I can make almost no time for repairing this on Windows, so need someone to explain what we're trying to accomplish here (btw, if someone already explained this on some mailing list, sorry, I'm hundreds of msgs behind the times).
[Tim]
Today I see it compiles, but generates lots of linker warnings: ...
Oops -- I don't look far enough. A different part still doesn't compile, at least not in a debug build: --------------------Configuration: pyexpat - Win32 Debug------------------- Compiling... xmlparse.c C:\Code\python\Modules\expat\xmlparse.c(1329) : error C2143: syntax error : missing ';' before 'constant' C:\Code\python\Modules\expat\xmlparse.c(1329) : error C2115: 'return' : incompatible types Error executing cl.exe. pyexpat_d.pyd - 2 error(s), 0 warning(s) It's griping about this: const XML_LChar * XML_ExpatVersion(void) { return VERSION; }
Tim Peters
Oops -- I don't look far enough. A different part still doesn't compile, at least not in a debug build:
That's because the VERSION define in the debug build read /D VERSION="1.95.2" whereas MSVC had wanted it as /D VERSION=\"1.95.2\" I still fail to see the rationale for requiring the backslashes there, or why I have to change every setting twice on Windows (which I forgot in this case); in any case, I moved the VERSION setting into expat.h, so this problem should be gone now. Regards, Martin
[Martin v. Loewis]
That's because the VERSION define in the debug build read
/D VERSION="1.95.2"
whereas MSVC had wanted it as
/D VERSION=\"1.95.2\"
I still fail to see the rationale for requiring the backslashes there,
I expect it's the same as under most Unix shells: the cmdline processor chews up unescaped quotes, so if you want quotes to survive in what's passed to argv, you have to escape them.
or why I have to change every setting twice on Windows (which I forgot in this case);
You don't, if you first select "Multiple Configurations ... " from the "Settings for:" dropdown list. That controls which configuration(s) your changes apply to, so if you leave it at, e.g., "Win32 Release", you're explicitly instructing it to apply changes only to the Release build.
in any case, I moved the VERSION setting into expat.h, so this problem should be gone now.
Thank you! I won't get to try it until tomorrow night; maybe the linker warnings will vanish by then too ...
Tim Peters
Anyone understand what's going on with expat? I noticed pyexpat stopped compiling on Windows a day or two ago, but didn't have time to look at it.
Today I see it compiles, but generates lots of linker warnings:
Creating library ./pyexpat.lib and object ./pyexpat.exp LINK : warning LNK4049: locally defined symbol "_XML_GetSpecifiedAttributeCount" imported
I cannot reproduce this on my MSVC 6 installation. What does that warning mean? Does it indicate a problem of some sort?
Are we trying to break away from the SourceForge expat project?
No, Modules/expat is a literal copy of SF expat 1.95.2, lib/.
(btw, if someone already explained this on some mailing list, sorry, I'm hundreds of msgs behind the times).
http://mail.python.org/pipermail/python-dev/2002-February/019974.html [assuming you read this message before catching up with the rest of python-dev] Regards, Martin
participants (2)
-
martin@v.loewis.de
-
Tim Peters