# [Windows] Error Building PHP 5.4 NTS Debug Version, mysqlnd

- Thread: https://externals.io/message/57468
- Original archive: https://news-web.php.net/php.internals/57468
- Started by Christian Seiler on 2012-01-21T21:09:59+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #57468 — Christian Seiler — 2012-01-21T21:09:59+00:00

URL: https://externals.io/message/57468#57468

Hi,

I was compiling PHP 5.4 SVN for Windows and noticed that the NTS Debug
version does not compile correctly if mysqlnd is enabled. The ZTS Debug,
ZTS Release and NTS Release versions work without any problems. Also,
PHP 5.3 in all 4 variants (Debug/Release, NTS/ZTS) has no problems.

I've attached the error messages I got as a text file, I apologize in
advance for the German error messages, the Visual Studio version I have
I have no idea how to make it output English messages. (There appears to
be no LC_ALL=C in Windows.) However, it should be easy to search for the
corresponding error message IDs if you have trouble understanding the
messages.

To summarize the error, it chokes on the following statements:

mysqlnd_driver.c, 100:
	DBG_ENTER("mysqlnd_error_list_pdtor");

mysqlnd_driver.c, 104:
	DBG_VOID_RETURN;

Since I have no idea whatsoever about the internals of mysqlnd, I'm
posting this to the list.

Regards,
Christian

---

## #57470 — Pierre Joye — 2012-01-22T10:07:18+00:00

URL: https://externals.io/message/57468#57470 · In reply to: #57468

hi,

I cannot reproduce the error, mysqlnd builds just fine here.

What's your configure line?

Cheers,

2012/1/21 Christian Seiler <chris_se@gmx.net>:
> Hi,
>
> I was compiling PHP 5.4 SVN for Windows and noticed that the NTS Debug
> version does not compile correctly if mysqlnd is enabled. The ZTS Debug,
> ZTS Release and NTS Release versions work without any problems. Also,
> PHP 5.3 in all 4 variants (Debug/Release, NTS/ZTS) has no problems.
>
> I've attached the error messages I got as a text file, I apologize in
> advance for the German error messages, the Visual Studio version I have
> I have no idea how to make it output English messages. (There appears to
> be no LC_ALL=C in Windows.) However, it should be easy to search for the
> corresponding error message IDs if you have trouble understanding the
> messages.
>
> To summarize the error, it chokes on the following statements:
>
> mysqlnd_driver.c, 100:
>        DBG_ENTER("mysqlnd_error_list_pdtor");
>
> mysqlnd_driver.c, 104:
>        DBG_VOID_RETURN;
>
> Since I have no idea whatsoever about the internals of mysqlnd, I'm
> posting this to the list.
>
> Regards,
> Christian
>
> --
> 
> 



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #57471 — Christian Seiler — 2012-01-22T10:38:29+00:00

URL: https://externals.io/message/57468#57471 · In reply to: #57470

Hi Pierre,

> I cannot reproduce the error, mysqlnd builds just fine here.
>
> What's your configure line?

cscript /nologo configure.js
   "--disable-phar"
   "--disable-ipv6"
   "--disable-zts"
   "--enable-cgi"
   "--disable-bcmath"
   "--disable-calendar"
   "--disable-odbc"
   "--disable-tokenizer"
   "--disable-xmlreader"
   "--disable-xmlwriter"
   "--without-wddx"
   "--enable-debug"
   "--enable-cli-win32"
   "--enable-pdo"
   "--with-openssl"
   "--with-php-build=..\deps"
   "--with-libxml"
   "--with-pdo-sqlite"

This is done in a Windows SDK 6.1 shell with

  setenv /debug /x86 /xp  [*]

and VC9 Pro SP1 is used. The same configure line works fine for PHP 
5.3.9.

Thanks,
Christian

[*] But also setenv /release /x86 /xp has the same issue.

---

## #57472 — Pierre Joye — 2012-01-22T11:37:44+00:00

URL: https://externals.io/message/57468#57472 · In reply to: #57471

hi,

Can reproduce it now, can you open a bug please and assign it to mysql?

The problem is due to TSRMLS_FETCH being called at the wrong place.
I'm not sure how they want it but ideally it should in the DBG macro
already.

Added Andrey to the loop.

Cheers,


> Hi Pierre,
>
>
> > […]
>
>
> cscript /nologo configure.js
>  "--disable-phar"
>  "--disable-ipv6"
>  "--disable-zts"
>  "--enable-cgi"
>  "--disable-bcmath"
>  "--disable-calendar"
>  "--disable-odbc"
>  "--disable-tokenizer"
>  "--disable-xmlreader"
>  "--disable-xmlwriter"
>  "--without-wddx"
>  "--enable-debug"
>  "--enable-cli-win32"
>  "--enable-pdo"
>  "--with-openssl"
>  "--with-php-build=..\deps"
>  "--with-libxml"
>  "--with-pdo-sqlite"
>
> This is done in a Windows SDK 6.1 shell with
>
>  setenv /debug /x86 /xp  [*]
>
> and VC9 Pro SP1 is used. The same configure line works fine for PHP 5.3.9.
>
> Thanks,
> Christian
>
> [*] But also setenv /release /x86 /xp has the same issue.
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #57473 — Andrey Hristov — 2012-01-22T20:15:52+00:00

URL: https://externals.io/message/57468#57473 · In reply to: #57472

Hi Pierre,

> hi,
>
> Can reproduce it now, can you open a bug please and assign it to mysql?
>
> The problem is due to TSRMLS_FETCH being called at the wrong place.
> I'm not sure how they want it but ideally it should in the DBG macro
> already.

called at the wrong place? it should be always before DBG or the 
DBG_ENTER macro won't compile. So how it could be possibly wrong? :)

> Added Andrey to the loop.

> Cheers,
>
> 
> > […]
>
>
>

Best,
Andrey

---

## #57474 — Pierre Joye — 2012-01-22T22:07:01+00:00

URL: https://externals.io/message/57468#57474 · In reply to: #57473

hi Andrey,

The TSRM macro must always be the last declaration, always. The
problem is that the DBG macros have code in them...


>  Hi Pierre,
>
> 
> > […]
>
>
> called at the wrong place? it should be always before DBG or the DBG_ENTER
> macro won't compile. So how it could be possibly wrong? :)
>
>
> > […]
>
>
> > […]
>
> Best,
> Andrey



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #57485 — Christian Seiler — 2012-01-23T23:15:21+00:00

URL: https://externals.io/message/57468#57485 · In reply to: #57472

Hi Pierre,

> Can reproduce it now, can you open a bug please and assign it to mysql?

Done: https://bugs.php.net/bug.php?id=60863

Thanks,
Christian
