Skip to content
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

[1.3.0] Windows build fails after recent optimization #1786

Closed
pgasiorowski opened this issue Jan 11, 2014 · 2 comments
Closed

[1.3.0] Windows build fails after recent optimization #1786

pgasiorowski opened this issue Jan 11, 2014 · 2 comments

Comments

@pgasiorowski
Copy link
Contributor

Here is my windows build script: build.phalcon.bat
Which has been working pretty well until #1785

::
:: Generate and optimize source code
:: 
php F:\SVN\cphalcon\build\gen-build.php


::
:: Declare VC11. Sets compilation to 32-bit VC11
::
@echo off
cd c:\php-sdk
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
call bin\phpsdk_setvars.bat
set VisualStudioVersion=11.0
@echo n

::
:: Prepare PHP extension for build
::
@cd C:\php-sdk\phpdev\vc11\x86\php-5.5.5-src

@rmdir ext\phalcon /S /Q

@mkdir ext\phalcon

copy F:\SVN\cphalcon\build\32bits ext\phalcon

nmake

Now this is what's happening:

C:\php-sdk\build.phalcon.bat

C:\php-sdk>php F:\SVN\cphalcon\build\gen-build.php 
Generating safe build... OK
Generating builds, optimized for 32-bit and 64-bit platforms... OK
n
F:\SVN\cphalcon\build\32bits\tests
F:\SVN\cphalcon\build\32bits\Makefile.frag
F:\SVN\cphalcon\build\32bits\config.m4
F:\SVN\cphalcon\build\32bits\config.w32
F:\SVN\cphalcon\build\32bits\phalcon.h
F:\SVN\cphalcon\build\32bits\php_phalcon.h
F:\SVN\cphalcon\build\32bits\phalcon.c
        7 file(s) copied.

Microsoft (R) Program Maintenance Utility Version 11.00.50727.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Recreating build dirs
phalcon.c
c:\php-sdk\phpdev\vc11\x86\php-5.5.5-src\ext\phalcon\phalcon.h(645) : fatal error C1083: Cannot open include file: 'php_config.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\cl.exe"' : return code '0x2'
Stop.

ext\phalcon\phalcon.h(645):

#include "php_config.h"

Where this file is supposed to be located?
It's neither in PHP nor Phalcon source

Using PHP 5.5.5 for the build

@pgasiorowski
Copy link
Contributor Author

This is where #include "php_config.h" has been declared
https://github.com/phalcon/cphalcon/blob/1.3.0/ext/cache/exception.h

Having changed:

#include "config.w32.h"

to:

#ifdef PHP_WIN32
#include "config.w32.h"
#else
#include "php_config.h"
#endif

the build starts, but ends up with the following errors:

ext\phalcon\phalcon.c(4644) : error C2373: 'phalcon_array_isset' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2258) : see declaration of 'phalcon_array_isset'
ext\phalcon\phalcon.c(4674) : error C2373: 'phalcon_array_isset_string' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2260) : see declaration of 'phalcon_array_isset_string'
ext\phalcon\phalcon.c(4679) : error C2373: 'phalcon_array_isset_quick_string' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2263) : see declaration of 'phalcon_array_isset_quick_string'
ext\phalcon\phalcon.c(4688) : error C2373: 'phalcon_array_isset_long' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2259) : see declaration of 'phalcon_array_isset_long'
ext\phalcon\phalcon.c(4697) : error C2373: 'phalcon_array_unset' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2266) : see declaration of 'phalcon_array_unset'
ext\phalcon\phalcon.c(4732) : error C2373: 'phalcon_array_unset_string' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2268) : see declaration of 'phalcon_array_unset_string'
ext\phalcon\phalcon.c(4745) : error C2373: 'phalcon_array_unset_long' : redefinition; different type modifiers
        ext\phalcon\phalcon.c(2267) : see declaration of 'phalcon_array_unset_long'

Not sure if that was the best thing to do but it might give you some hints.
And sorry but have zero experience with C to help any further...

@ghost ghost mentioned this issue Jan 11, 2014
@ghost
Copy link

ghost commented Jan 11, 2014

Could you please try the patch from #1787?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants