building php 5.2.1 on windows

building php 5.2.1 on windows

am 09.08.2007 06:24:14 von Rashmi Badan

------=_Part_55087_1112732.1186633454986
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I'm trying to build php 5.2.1 on windows and am hitting the following
problem at link time ....

Creating library Release\php5ts.lib and object Release\php5ts.exp
libxml.obj : error LNK2019: unresolved external symbol _xmlDllMain
referenced in function _DllMain@12
Release\php5ts.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program
Files\Intel\CPP\Compiler81\IA32\bin\icl.
exe"' : return code '0x460'

I am linking it to a libxml2.lib that I have compiled. When I do a dumpbin i
do not see the _xmlDllMain symbol. I tried downloading some libxml2 binaries
but they didn't have that symbol either.

Would appreciate some help on this issue.

Thanks,
Rashmi

------=_Part_55087_1112732.1186633454986--

Re: building php 5.2.1 on windows

am 10.08.2007 00:26:00 von Rob Richards

Hi Rashimi,

Rashmi Badan wrote:
> Hi,
>
> I'm trying to build php 5.2.1 on windows and am hitting the following
> problem at link time ....
>
> Creating library Release\php5ts.lib and object Release\php5ts.exp
> libxml.obj : error LNK2019: unresolved external symbol _xmlDllMain
> referenced in function _DllMain@12
> Release\php5ts.dll : fatal error LNK1120: 1 unresolved externals
> NMAKE : fatal error U1077: '"C:\Program
> Files\Intel\CPP\Compiler81\IA32\bin\icl.
> exe"' : return code '0x460'
>
> I am linking it to a libxml2.lib that I have compiled. When I do a dumpbin i
> do not see the _xmlDllMain symbol. I tried downloading some libxml2 binaries
> but they didn't have that symbol either.

That symbol is not made available by default in the builds.

You have a couple of options:
1) Use my libxml2 builds - the ones that the official binaries are built
off of. http://ctindustries.net/libxml/
I haven't had a chance to publish the .29 build and was not satisfied
with the .27 and .28 builds to build those, so all I have are .26 until
I have time.

2) Build libxml2 2.6.29 from source (must compile with a MS compiler)
and have PHP link against the libxml2_a_dll.lib file. I added that to
the default libxml2 MSVC build but still need to commit the additon to
the PHP build system (will be post 5.2.4). Once done, then the official
libxml2 binaries (2.6.29+) will be able to be used.
all you need to do is change the config.w32 file in ext/libxml to:

if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
*AND* add the LIBXML_STATIC_FOR_DLL flag
ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL ");

Rob

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: building php 5.2.1 on windows

am 10.08.2007 16:38:01 von Rashmi Badan

------=_Part_69313_13121131.1186756681834
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi
>
> > I'm trying to build php 5.2.1 on windows and am hitting the following
> > problem at link time ....
> >
> > Creating library Release\php5ts.lib and object Release\php5ts.exp
> > libxml.obj : error LNK2019: unresolved external symbol _xmlDllMain
> > referenced in function _DllMain@12
> > Release\php5ts.dll : fatal error LNK1120: 1 unresolved externals
> > NMAKE : fatal error U1077: '"C:\Program
> > Files\Intel\CPP\Compiler81\IA32\bin\icl.
> > exe"' : return code '0x460'
> >
> > I am linking it to a libxml2.lib that I have compiled. When I do a
> dumpbin i
> > do not see the _xmlDllMain symbol. I tried downloading some libxml2
> binaries
> > but they didn't have that symbol either.
>
> That symbol is not made available by default in the builds.
>
> You have a couple of options:
> 1) Use my libxml2 builds - the ones that the official binaries are built
> off of. http://ctindustries.net/libxml/
> I haven't had a chance to publish the .29 build and was not satisfied
> with the .27 and .28 builds to build those, so all I have are .26 until
> I have time.
>
> 2) Build libxml2 2.6.29 from source (must compile with a MS compiler)
> and have PHP link against the libxml2_a_dll.lib file. I added that to
> the default libxml2 MSVC build but still need to commit the additon to
> the PHP build system (will be post 5.2.4). Once done, then the official
> libxml2 binaries (2.6.29+) will be able to be used.
> all you need to do is change the config.w32 file in ext/libxml to:
>
> if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
> *AND* add the LIBXML_STATIC_FOR_DLL flag
> ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL ");



I tried #2 but it didn't seem to help. I'm working with libxml2 2.6.27 and
so I had to build libxml2_a_dll.lib by referring to the makefiles in 2.6.29.
But now I get some additional warnings, old problem persists :(

Any idea what I might be doing wrong!

-------------------------------------------
Creating library Release\php5ts.lib and object Release\php5ts.exp
php_xmlwriter.obj : warning LNK4217: locally defined symbol _xmlFree
imported in
function _zm_startup_xmlwriter
libxml.obj : warning LNK4217: locally defined symbol _xmlFree imported in
functi
on _php_libxml_node_free
simplexml.obj : warning LNK4217: locally defined symbol _xmlFree imported in
fun
ction _sxe_prop_dim_read
compat.obj : warning LNK4049: locally defined symbol _xmlFree imported
php_xmlreader.obj : warning LNK4217: locally defined symbol _xmlFree
imported in
function _zm_startup_xmlreader
compat.obj : warning LNK4217: locally defined symbol _xmlMalloc imported in
func
tion __build_comment
libxml.obj : error LNK2019: unresolved external symbol _xmlDllMain
referenced in
function _DllMain@12
Release\php5ts.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: '"C:\Program
Files\Intel\CPP\Compiler81\IA32\bin\icl.
exe"' : return code '0x460'
Stop.
----------------------------------

Thanks,
Rashmi

------=_Part_69313_13121131.1186756681834--

Re: building php 5.2.1 on windows

am 10.08.2007 23:25:12 von Rob Richards

Hi Rashmi,

Rashmi Badan wrote:
> Hi
.. . .
>> 2) Build libxml2 2.6.29 from source (must compile with a MS compiler)
>> and have PHP link against the libxml2_a_dll.lib file. I added that to
>> the default libxml2 MSVC build but still need to commit the additon to
>> the PHP build system (will be post 5.2.4). Once done, then the official
>> libxml2 binaries (2.6.29+) will be able to be used.
>> all you need to do is change the config.w32 file in ext/libxml to:
>>
>> if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
>> *AND* add the LIBXML_STATIC_FOR_DLL flag
>> ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL ");
>
>
>
> I tried #2 but it didn't seem to help. I'm working with libxml2 2.6.27 and
> so I had to build libxml2_a_dll.lib by referring to the makefiles in 2.6.29.
> But now I get some additional warnings, old problem persists :(

It won't work with un-modified 2.6.27 code. I had also made a few
modifications to threads.c and threads.h, which were committed for
2.6.29. Is there any reason you need .27 and can't use the .26 (or build
against .29)?

Rob

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: building php 5.2.1 on windows

am 14.08.2007 07:58:44 von Rashmi Badan

------=_Part_36849_16736954.1187071124212
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

>
> >> 2) Build libxml2 2.6.29 from source (must compile with a MS compiler)
> >> and have PHP link against the libxml2_a_dll.lib file. I added that to
> >> the default libxml2 MSVC build but still need to commit the additon to
> >> the PHP build system (will be post 5.2.4). Once done, then the official
> >> libxml2 binaries (2.6.29+) will be able to be used.
> >> all you need to do is change the config.w32 file in ext/libxml to:
> >>
> >> if (CHECK_LIB("libxml2_a_dll.lib;libxml2_a.lib", "libxml") &&
> >> *AND* add the LIBXML_STATIC_FOR_DLL flag
> >> ADD_FLAG("CFLAGS_LIBXML", "/D LIBXML_STATIC /D LIBXML_STATIC_FOR_DLL
> ");
> >
> >
> >
> > I tried #2 but it didn't seem to help. I'm working with libxml2 2.6.27and
> > so I had to build libxml2_a_dll.lib by referring to the makefiles in
> 2.6.29.
> > But now I get some additional warnings, old problem persists :(
>
> It won't work with un-modified 2.6.27 code. I had also made a few
> modifications to threads.c and threads.h, which were committed for
> 2.6.29. Is there any reason you need .27 and can't use the .26 (or build
> against .29)?


I was using .27 on linux and had to get the same working on windows as well,
so am using that version.
Will using .29 solve my problem of not being able to build on windows? Is
that a recommended version anyway? Then I could probably upgrade to .29 -
although it would save me some effort in being able to work with .27 itself.

Thanks,
Rashmi


Rob
>

------=_Part_36849_16736954.1187071124212--

Re: building php 5.2.1 on windows

am 14.08.2007 11:27:49 von Rob Richards

Rashmi Badan wrote:


> I was using .27 on linux and had to get the same working on windows as well,
> so am using that version.
> Will using .29 solve my problem of not being able to build on windows? Is
> that a recommended version anyway? Then I could probably upgrade to .29 -
> although it would save me some effort in being able to work with .27 itself.

..29 will solve your problem and contains the latest bug fixes so always
recommended. As in my last message, if you want to use .27 on windows,
you need to patch threads.c and threads.h with the changes that are in
..29 to get the symbol properly exposed and exported.

Rob

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: building php 5.2.1 on windows

am 16.08.2007 07:59:31 von Rashmi Badan

------=_Part_56338_22327298.1187243971995
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

>
>
>
> > I was using .27 on linux and had to get the same working on windows as
> well,
> > so am using that version.
> > Will using .29 solve my problem of not being able to build on windows?
> Is
> > that a recommended version anyway? Then I could probably upgrade to .29
> -
> > although it would save me some effort in being able to work with .27
> itself.
>
> .29 will solve your problem and contains the latest bug fixes so always
> recommended. As in my last message, if you want to use .27 on windows,
> you need to patch threads.c and threads.h with the changes that are in
> .29 to get the symbol properly exposed and exported.



Thanks Rob. I'll go with the patching for now.

Rgds,
Rashmi

Rob
>

------=_Part_56338_22327298.1187243971995--