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
Visual C 32 bits USE_64_BIT_INT won't build 5.18, new hash randomization code, missing symbol #13506
Comments
From @bulk88Created by @bulk88Building 5.18 with USE_64_BIT_INT, with Visual C 2003 32 bits, causes a With DEBUGGING. I found adding "#pragma intrinsic(_rotl64)" to hv_func.h solved the Perl Info
|
From @tonycozOn Fri Jan 03 19:59:13 2014, bulk88 wrote:
...
I can build blead using the SDK VC for 32-bit with USE_64_BIT_INT. I believe the SDK uses the VC 2008 tools and library. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @steve-m-hayOn Fri Jan 03 19:59:13 2014, bulk88 wrote:
Does this work on blead? If so then 5.18 is missing something; if not (which I'm guessing is more likely) then USE_64_BIT_INT should probably just be disabled for VC++ 2003, like it already is for VC++ 6.0 (see the win32/ makefiles), unless there's an easy fix. |
From @sisyphus-----Original Message-----
Not sure about that. I think the USE_64_BIT_INT option didn't become More to the point - has anyone *ever* attempted a USE_64_BIT_INT build using Cheers, |
From @bulk88On Wed Jan 08 01:13:40 2014, shay wrote:
I didn't realize the option (USE_64_BIT_INT) is so new, Blead with VC 2003 with USE_64_BIT_INT, cl -c -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONS hv.obj : error LNK2001: unresolved external symbol __rotl64 C:\perl519\src\win32> Next I tried 5.17.3 git blead at SHA-1: 1f64ae1 * Add a USE_64_BIT_INT build option to the Windows makefiles. with USE_64_BIT_INT, I got miniperl and full perl binaries, no #pragma needed since the new hash code doesn't exist yet. Reading _rotl64's docs for VC 2003 http://msdn.microsoft.com/en-us/library/5cc576c4%28v=vs.71%29.aspx says it exists. I've attached a dump of VC 2003's msvcrt.lib's symbol table. stdlib.h on my vc2003 has unsigned int __cdecl _rotl(unsigned int, int); in it. Google brings up nothing about these symbols being missing from msvcrt.lib for vc2003 so I can't explain this problem.
read closer, there is a fix -- |
From @bulk88On Wed Jan 08 08:57:35 2014, bulk88 wrote:
Forgot attachmentt. -- |
From @bulk881881 public symbols 340 ??0__non_rtti_object@@QAE@ABV0@@Z |
From @tonycozOn Wed Jan 08 03:16:02 2014, sisyphus wrote:
I have, with the Platform SDK 32-bit compiler. Tony |
From @tonycozOn Wed Jan 08 08:57:35 2014, bulk88 wrote:
I suspect most software is built with the version specific CRT, not msvcrt. Could there be an extra static library we're missing for VC+2003 that
Assuming we're not missing a library, per above, could you please provide Tony |
From @bulk88On Wed Jan 08 15:16:04 2014, tonyc wrote:
This is a rehash of a discussion on IRC with TonyC. No. C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib>grep -r -U rotl64 * C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib> C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib>
Patch attached. I got no unusual/unknown make test failures, so USE_64_BIT_INT on VC 2003 works correctly. porting/utils.t (Wstat: 256 Test 1st test file has an open bug. 2nd is a race condition nobody has ever figured out (I'm surprised I got it). George Win32 smoker spits it out every so often. -- |
From @bulk880001-perl-120925-fix-missing-_rotl64-symbol-on-Visual-C-2.patchFrom 187a0c06d39a8d86d2de0cdcf6dd0b8ec32ac151 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Wed, 8 Jan 2014 23:44:16 -0500
Subject: [PATCH] [perl #120925] fix missing _rotl64 symbol on Visual C 2003
Due to a bug in the CRT (msvcr71.dll), these 2 functions are not defined
in any lib Perl can use (static link CRTs dont apply, Perl only uses DLL
CRTs), but they are available as intrinsics. This solves a link error
about missing symbol __rotl64 in hv.obj, from usage in hv_func.h, on 32 bit
USE_64_BIT_INT VC 2003 builds. _rotr64 is included for completeness. This
fix is filed as [perl #120925].
---
win32/win32.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/win32/win32.h b/win32/win32.h
index a521a41..3d1655a 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -256,6 +256,11 @@ typedef unsigned short mode_t;
#define NAN_COMPARE_BROKEN 1
#endif
+/* on VC2003, msvcrt.lib is missing these symbols */
+#if _MSC_VER >= 1300 && _MSC_VER < 1400
+# pragma intrinsic(_rotl64,_rotr64)
+#endif
+
#endif /* _MSC_VER */
#ifdef __MINGW32__ /* Minimal Gnu-Win32 */
--
1.7.9.msysgit.0
|
From @steve-m-hayOn 8 January 2014 23:11, Tony Cook via RT <perlbug-followup@perl.org> wrote:
Yes, I have too with various recent VC++s. I tested that when adding the http://perl5.git.perl.org/perl.git/commit/1f64ae15647e757e817c923b2a9fcbc528c5f610 |
From @steve-m-hayThanks for the patch, which is now applied in commit 8961ec4. |
@steve-m-hay - Status changed from 'open' to 'resolved' |
From @bulk88On Thu Jan 09 13:37:40 2014, shay wrote:
Can this be applied to maint 5.18? This patch was really caused because I tried to replicate https://rt-archive.perl.org/perl5/Ticket/Display.html?id=120851 and my CC failed to build that Perl, my CC was working at 5.17.3 with USE_64_BIT_INT but was broken later in 5.17 with the new has randomization code landed. -- |
From @tonycozOn Sun Jan 12 17:42:15 2014, bulk88 wrote:
+1 from me (reopened ticket for now) |
@tonycoz - Status changed from 'resolved' to 'open' |
From @bulk88On Sun Jan 12 17:59:40 2014, tonyc wrote:
This patch was shipped in 5.18.3 http://perl5.git.perl.org/perl.git/shortlog/refs/tags/v5.18.3 and can now be closed. -- |
From @tonycozOn Sat Aug 15 20:32:20 2015, bulk88 wrote:
Thanks, closed. Tony |
@tonycoz - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#120925 (status was 'resolved')
Searchable as RT120925$
The text was updated successfully, but these errors were encountered: