php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69729 unresolved externals when compiling with VC 2015
Submitted: 2015-05-29 09:20 UTC Modified: 2015-05-29 17:23 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: phpdev at ehrhardt dot nl Assigned: ab (profile)
Status: Closed Package: Compile Failure
PHP Version: master-Git-2015-05-29 (Git) OS: Windows with VC14
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpdev at ehrhardt dot nl
New email:
PHP Version: OS:

 

 [2015-05-29 09:20 UTC] phpdev at ehrhardt dot nl
Description:
------------
I am getting lots of unresolved externals when I try to compile PHP7 with VC14 (VC 2015).

I started with a clean sheet and VC 2015 Pro RC. I used the deps from http://windows.php.net/downloads/php-sdk/deps-5.6-vc11-x86.7z as starting point. With those deps a lot of extensions did not compile.

I recompiled mcrypt, iconv, xml2, ssleay32, libeay32, ssh2, curl, xpm, zlib, jpeg, png, vpx, libbz2, netsnmp (all x86 vc14) to get rid of many problems. But I was really surprised recompilation if the libs was needed. Some still remain, like php_gmp.dll, which fails on the mpir_a.lib in the VC11 deps for 5.6.

Error messages below.

Test script:
---------------
Recreating build dirs
Recreating build dirs
Recreating build dirs
libiconv_a.lib(iconv1.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
   Creating library C:\php-sdk\php70dev\Release_TS\php7ts.lib and object C:\php-sdk\php70dev\Release_TS\php7ts.exp
Generating code
Finished generating code
   Creating library C:\php-sdk\php70dev\Release_TS\php_gmp.lib and object C:\php-sdk\php70dev\Release_TS\php_gmp.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
mpir_a.lib(memory.obj) : error LNK2019: unresolved external symbol ___iob_func referenced in function ___gmp_default_allocate
mpir_a.lib(assert.obj) : error LNK2001: unresolved external symbol ___iob_func
C:\php-sdk\php70dev\Release_TS\php_gmp.dll : fatal error LNK1120: 1 unresolved externals


Expected result:
----------------
I expected that VC14 would build with the deps that work fine for VC11 and VC12

Actual result:
--------------
Broken compilation for lots of extensions (and even the core before I recompiled some libs).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-29 14:23 UTC] phpdev at ehrhardt dot nl
Closing. The needed libs were at
http://windows.php.net/downloads/snaps/ostc/core_deps_7/vc14_rc/x86/
 [2015-05-29 14:25 UTC] phpdev at ehrhardt dot nl
-Status: Open +Status: Closed
 [2015-05-29 14:25 UTC] phpdev at ehrhardt dot nl
Closing
 [2015-05-29 15:08 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2015-05-29 15:08 UTC] ab@php.net
Hi Jan,

thanks for the report, I see now. The golden rule still persists - no CRT mix. We had this discussion many times, so please stop wasting time doing things that are not supposed to work.

Please use these VC14 packages http://windows.php.net/downloads/snaps/ostc/core_deps_7/ and ping back if you see some issues. I would have given you the link if you were asking before starting to do the builds ;)

Thanks.
 [2015-05-29 15:41 UTC] phpdev at ehrhardt dot nl
Not mixing CRT versions was exactly the reason why I switched to building PHP7 with VC14. Steffen from Apachelounge compiled a VC14 Apache:
http://www.apachelounge.com/viewtopic.php?t=6544

His comment: "No problem to use the VC11 or VC10 modules, it is fully supported by Microsoft."

Well, you do not like it and I do not. That is whu I installed VC14 and started all of a sudden.
 [2015-05-29 17:23 UTC] ab@php.net
Jan,

it's really not something one likes or not. It's just lessons learned thing, like you see this time as well. PHP has too many external dependencies and we've seen such issues many times in the past.

I've just looked through your reports back then, you were even mentioning my source changes in the winlibs repo for vc14 compat. But why didn't you just ask ... actually one doesn't change anything without compiling it ;) Then we've spared these dozen mails.

Cheers.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 23:01:29 2024 UTC