php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45900 timelib_structs.h include path issue on Windows
Submitted: 2008-08-23 17:52 UTC Modified: 2008-09-24 22:45 UTC
From: Keisial at gmail dot com Assigned: pajoye (profile)
Status: Not a bug Package: Compile Failure
PHP Version: 5.3CVS-2008-08-23 (snap) OS: Windows
Private report: No CVE-ID: None
 [2008-08-23 17:52 UTC] Keisial at gmail dot com
Description:
------------
Compiling date extension on windows has the same problem reported in bug 37163.
ext/date/lib is included in the config.w32, but with the wrong switch. Being for windows, it should use /I instead of -I

--- config.w32 2006-01-05 07:41:10.000000000 +0100
+++ config.w32  2008-08-23 19:45:58.000000000 +0200
@@ -1,7 +1,7 @@
 // $Id: config.w32,v 1.5.2.1 2006/01/05 06:41:09 sebastian Exp $
 // vim:ft=javascript

-EXTENSION("date", "php_date.c", false, "-Iext/date/lib");
+EXTENSION("date", "php_date.c", false, "/Iext/date/lib");
 ADD_SOURCES("ext/date/lib", "astro.c timelib.c dow.c parse_date.c parse_tz.c tm2unixtime.c unixtime2tm.c", "date");
 AC_DEFINE('HAVE_DATE', 1, 'Have date/time support');


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-23 18:00 UTC] pajoye@php.net
-I works like /I

There is other extension using the -I (gd, pcre, etc.) without problems. Which error do you get (exactly)?
 [2008-08-23 21:28 UTC] Keisial at gmail dot com
You're right. The issue is not the switch style. Why is it always documented with / ?  :)

The error is:
.\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory

I have gone deeper into it, and is not caused on compiling date but when compiling ext\standard\microtime.c  which #include "ext/date/php_date.h"

Interestingly, i only see it with --enable-snapshot-build and running again nmake skips it.
 [2008-08-25 18:25 UTC] jani@php.net
Is timelib_config.h generated or not when this happens? WHERE is it generated to? Search for it, it might get generated but in a wrong directory..
 [2008-08-25 18:55 UTC] pajoye@php.net
I have discussed with Keisal on IRC and the issue is fixed (clean co and al).
 [2008-09-24 22:45 UTC] Keisial at gmail dot com
Looks it wasn't fixed as it is happening with a clean folder :(
Calling configure again after the error it then builds !?

php5.3-200809241430>
del * /s /q
cd ..
tar xjf php5.3-200809241430.tar.bz2
cd php5.3-200809241430
buildconf
cscript /nologo configure.js
nmake

<snip>

head.c
C:\PROGRA~1\Microsoft Platform SDK\Include\Ws2tcpip.h(593) : warning C4142: benign redefinition of type
.\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory
NMAKE : fatal error U1077: '"cl.exe"' : return code '0x2'
Stop.

nmake
head.c
C:\PROGRA~1\Microsoft Platform SDK\Include\Ws2tcpip.h(593) : warning C4142: benign redefinition of type
.\ext/date/lib/timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory
NMAKE : fatal error U1077: '"cl.exe"' : return code '0x2'
Stop.

cscript /nologo configure.js
nmake

<builds>


It doesn't hit the error with --disable-calendar
 [2011-01-31 10:34 UTC] dave dot kelly at dawkco dot com
The status of this bug should not be 'Bogus' (yet anyway).  I'm still getting this error with the 5.3.5 (production) source build.

.../timelib_structs.h(24) : fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory
NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
Stop.

It appears that the file:
C:/php-sdk/php53dev/vc9/x86/php-5.3.5/ext/date/config.w32
is not executing properly during config.

At the bottom of .../ext/date/config.w32 is the following:

var tl_config = FSO.CreateTextFile("ext/date/lib/timelib_config.h", true);
tl_config.WriteLine("#include \"config.w32.h\"");
tl_config.Close();

If this code were executing properly during config, there wouldn't be a problem, but the timelib_config.h file is not being created for some reason.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 19:01:28 2024 UTC