Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 80229
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: desmond.daignault [...] oneil.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From desmond.daignault [...] oneil.com Tue Oct 16 16: 44:48 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
X-Spam-Flag: NO
Content-Language: en-US
content-type: text/plain; charset="utf-8"
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-MS-Tnef-Correlator:
X-Ironport-Av: E=Sophos;i="4.80,595,1344225600"; d="scan'208";a="371771"
X-Spam-Score: -6.899
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9F3632408AE for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Tue, 16 Oct 2012 16:44:48 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kWZkNDfZm+f5 for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Tue, 16 Oct 2012 16:44:47 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id BD4AA24089B for <bug-XML-LibXML [...] rt.cpan.org>; Tue, 16 Oct 2012 16:44:46 -0400 (EDT)
Received: (qmail 32086 invoked by uid 103); 16 Oct 2012 20:44:46 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 16 Oct 2012 20:44:46 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Tue, 16 Oct 2012 13:44:41 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 16 Oct 2012 16:44:38 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Tue, 16 Oct 2012 16:44:38 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
X-RT-Mail-Extension: xml-libxml
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Thread-Index: Ac2r3w6Mu/TEsJbaRdi1Y4fLKIKvrA==
Date: Tue, 16 Oct 2012 20:44:37 +0000
X-Spam-Level:
X-MS-Has-Attach:
Thread-Topic: Fails to create Makefile on windows due to include path having spaces
Accept-Language: en-US
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Content-Transfer-Encoding: quoted-printable
From: Desmond Daignault <desmond.daignault [...] oneil.com>
X-RT-Original-Encoding: iso-8859-1
Content-Length: 3730
Download (untitled) / with headers
text/plain 3.6k
On Windows, check_lib_or_exit always fails. No matter what I set INC= to be on the command line. When using Visual Studio, it looks at the environment variable INCLUDE to find include headers and the environment variable LIB to find library files. eg: INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft SDKs\Windows\v6.0A\include; LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;C:\P rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; In the example above, the libxml2 library was installed in c:\project\win32\install\lib and c:\project\win32\install\include. If I remove the check_lib_or_exit function from Makefile.PL it builds just fine when the environment has INCLUDE and LIB set correctly. Additionally a warning can be removed when checking to see if LIBS was passed on the command line. patch follows: *** Makefile.PL.orig 2012-10-13 16:30:39.000000000 -0400 --- Makefile.PL 2012-10-16 15:06:28.347500000 -0400 *************** *** 286,292 **** # -------------------------------------------------------------------------- # # fix the ld flags # -------------------------------------------------------------------------- # ! if ($config{LIBS} !~ /\-l(?:lib)?xml2\b/) { # in this case we are not able to run xml2-config. therefore we need to # expand the libz as well. if ($is_Win32) { --- 286,292 ---- # -------------------------------------------------------------------------- # # fix the ld flags # -------------------------------------------------------------------------- # ! if (!defined $config{LIBS} || $config{LIBS} !~ /\-l(?:lib)?xml2\b/) { # in this case we are not able to run xml2-config. therefore we need to # expand the libz as well. if ($is_Win32) { *************** *** 356,365 **** $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } ! my $incpath = $config{INC}; ! $incpath =~ s#(\A|\s)\s*-I#$1#g; ! check_lib_or_exit( # fill in what you prompted the user for here lib => [qw(xml2)], incpath => [split(/\s/,$incpath)], --- 356,366 ---- $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } ! unless ($^O =~ /MSWin/) { ! my $incpath = $config{INC}; ! $incpath =~ s#(\A|\s)\s*-I#$1#g; ! check_lib_or_exit( # fill in what you prompted the user for here lib => [qw(xml2)], incpath => [split(/\s/,$incpath)], *************** *** 389,395 **** 'libxml/xpath.h', 'libxml/xpathInternals.h', ], ! ); WriteMakefile( %INFOS, --- 390,397 ---- 'libxml/xpath.h', 'libxml/xpathInternals.h', ], ! ); ! } WriteMakefile( %INFOS, -- Sincerely, Desmond Daignault Senior Software Engineer   O'NEIL & ASSOCIATES, INC. 495 Byers Rd. Miamisburg, Ohio 45342-3662 Office: (937) 865-0846 ext. 3504 Fax: (937) 865-5858 E-mail: desmond.daignault@oneil.com REVOLUTIONIZING DOCUMENTATION >>> POWERING PRODUCT SUPPORT ********************************************************************** Confidentiality Notice The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited. **********************************************************************
MIME-Version: 1.0
In-Reply-To: <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6967-1350424952-403.80229-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2571
Download (untitled) / with headers
text/plain 2.5k
Hi Desmond, On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote: Show quoted text
> On Windows, check_lib_or_exit always fails. No matter what I set INC= > to be on the command line. >
Devel::CheckLib should support Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where this is going wrong and fix it. You can use perl -d (the perl debugger) to assist you. Show quoted text
> When using Visual Studio, it looks at the environment variable INCLUDE > to find include headers and the environment variable LIB to find > library files.
Well, UNIX compilers are using different variables (see the gcc man page). The question is which env vars CL.EXE supports. Show quoted text
> > eg: > INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft > Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft > Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft > SDKs\Windows\v6.0A\include; > LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual > Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio > 9.0\VC\LIB;C:\P > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > In the example above, the libxml2 library was installed in > c:\project\win32\install\lib and c:\project\win32\install\include. > > If I remove the check_lib_or_exit function from Makefile.PL it builds > just fine when the environment has INCLUDE and LIB set correctly. > > Additionally a warning can be removed when checking to see if LIBS was > passed on the command line. >
the check_lib_or_exit call was added to prevent cases where the shared library can be found, but the headers cannot be found, which makes the build fails later. I'd rather not avoid it anywhere. Show quoted text
> > patch follows: >
The patch has two issues: 1. It is not in unified format - use diff -u next time (you can also send us a bitbucket pull request). 2. The second is: Show quoted text
> > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended > for use only by the person(s) or organization listed in the > address. If you have received this communication in error, please > contact the sender at O'Neil & Associates, Inc., immediately. Any > copying, dissemination, or distribution of this communication, > other than by the intended recipient, is strictly prohibited. > ********************************************************************** >
this disclaimer prevents us from using the patch for our FOSS project. Regards, -- Shlomi Fish
From desmond.daignault [...] oneil.com Wed Oct 17 09: 35:14 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118287FE6 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.899
X-Ironport-Av: E=Sophos;i="4.80,600,1344225600"; d="scan'208";a="375100"
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 6DA0B2401AB for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:35:14 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pfInKMALJ1cY for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:35:08 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 3C4EA2400AB for <bug-XML-LibXML [...] rt.cpan.org>; Wed, 17 Oct 2012 09:35:08 -0400 (EDT)
Received: (qmail 8642 invoked by uid 103); 17 Oct 2012 13:35:07 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Oct 2012 13:35:07 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 17 Oct 2012 06:35:00 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 17 Oct 2012 09:34:57 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Wed, 17 Oct 2012 09:34:58 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
Thread-Index: AQHNq+ny34SiETyKGUaYw2IITfHNDpe9fETg
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Wed, 17 Oct 2012 13:34:57 +0000
X-Spam-Level:
Thread-Topic: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
X-MS-Has-Attach:
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: Desmond Daignault <desmond.daignault [...] oneil.com>
RT-Message-ID: <rt-3.8.HEAD-1730-1350480915-1110.80229-0-0 [...] rt.cpan.org>
Content-Length: 3208
Download (untitled) / with headers
text/plain 3.1k
Went through it with the debugger, and it is failing on checking the LIB, even though you already checked it in the Makefile.PL and it passed. How should I call Makefile.PL so that it doesn't fail the 2nd check of linking to xml2? -- Dez. Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-XML-LibXML@rt.cpan.org] Sent: Tuesday, October 16, 2012 6:03 PM To: Desmond Daignault Subject: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces <URL: https://rt.cpan.org/Ticket/Display.html?id=80229 > Hi Desmond, On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote:
> On Windows, check_lib_or_exit always fails. No matter what I set INC= > to be on the command line. >
Devel::CheckLib should support Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where this is going wrong and fix it. You can use perl -d (the perl debugger) to assist you.
> When using Visual Studio, it looks at the environment variable INCLUDE > to find include headers and the environment variable LIB to find > library files.
Well, UNIX compilers are using different variables (see the gcc man page). The question is which env vars CL.EXE supports.
> > eg: > INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft > Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft > Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft > SDKs\Windows\v6.0A\include; > LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual > Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio > 9.0\VC\LIB;C:\P > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > In the example above, the libxml2 library was installed in > c:\project\win32\install\lib and c:\project\win32\install\include. > > If I remove the check_lib_or_exit function from Makefile.PL it builds > just fine when the environment has INCLUDE and LIB set correctly. > > Additionally a warning can be removed when checking to see if LIBS was > passed on the command line. >
the check_lib_or_exit call was added to prevent cases where the shared library can be found, but the headers cannot be found, which makes the build fails later. I'd rather not avoid it anywhere.
> > patch follows: >
The patch has two issues: 1. It is not in unified format - use diff -u next time (you can also send us a bitbucket pull request). 2. The second is:
> > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended > for use only by the person(s) or organization listed in the > address. If you have received this communication in error, please > contact the sender at O'Neil & Associates, Inc., immediately. Any > copying, dissemination, or distribution of this communication, > other than by the intended recipient, is strictly prohibited. > ********************************************************************** >
this disclaimer prevents us from using the patch for our FOSS project. Regards, -- Shlomi Fish
From desmond.daignault [...] oneil.com Wed Oct 17 09: 44:18 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118287FF5 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.899
X-Ironport-Av: E=Sophos;i="4.80,600,1344225600"; d="scan'208";a="375190"
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 9E5C02400F3 for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:44:18 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1+LuwtUu0uQq for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:44:17 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id EBEE52400AB for <bug-XML-LibXML [...] rt.cpan.org>; Wed, 17 Oct 2012 09:44:16 -0400 (EDT)
Received: (qmail 9739 invoked by uid 103); 17 Oct 2012 13:44:16 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Oct 2012 13:44:16 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 17 Oct 2012 06:44:13 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 17 Oct 2012 09:44:11 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Wed, 17 Oct 2012 09:44:11 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
Thread-Index: AQHNq+ny34SiETyKGUaYw2IITfHNDpe9gshg
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Wed, 17 Oct 2012 13:44:10 +0000
X-Spam-Level:
Thread-Topic: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
X-MS-Has-Attach:
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: Desmond Daignault <desmond.daignault [...] oneil.com>
RT-Message-ID: <rt-3.8.HEAD-31045-1350481459-1301.80229-0-0 [...] rt.cpan.org>
Content-Length: 3154
Ok. I got it to work by commenting out line 364 of Makefile.PL. You are already checking to see if linking works so there is no need to do it again in the check_lib_or_exit call. -- Dez. Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-XML-LibXML@rt.cpan.org] Sent: Tuesday, October 16, 2012 6:03 PM To: Desmond Daignault Subject: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces <URL: https://rt.cpan.org/Ticket/Display.html?id=80229 > Hi Desmond, On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote:
> On Windows, check_lib_or_exit always fails. No matter what I set INC= > to be on the command line. >
Devel::CheckLib should support Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where this is going wrong and fix it. You can use perl -d (the perl debugger) to assist you.
> When using Visual Studio, it looks at the environment variable INCLUDE > to find include headers and the environment variable LIB to find > library files.
Well, UNIX compilers are using different variables (see the gcc man page). The question is which env vars CL.EXE supports.
> > eg: > INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft > Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft > Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft > SDKs\Windows\v6.0A\include; > LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual > Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio > 9.0\VC\LIB;C:\P > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > In the example above, the libxml2 library was installed in > c:\project\win32\install\lib and c:\project\win32\install\include. > > If I remove the check_lib_or_exit function from Makefile.PL it builds > just fine when the environment has INCLUDE and LIB set correctly. > > Additionally a warning can be removed when checking to see if LIBS was > passed on the command line. >
the check_lib_or_exit call was added to prevent cases where the shared library can be found, but the headers cannot be found, which makes the build fails later. I'd rather not avoid it anywhere.
> > patch follows: >
The patch has two issues: 1. It is not in unified format - use diff -u next time (you can also send us a bitbucket pull request). 2. The second is:
> > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended > for use only by the person(s) or organization listed in the > address. If you have received this communication in error, please > contact the sender at O'Neil & Associates, Inc., immediately. Any > copying, dissemination, or distribution of this communication, > other than by the intended recipient, is strictly prohibited. > ********************************************************************** >
this disclaimer prevents us from using the patch for our FOSS project. Regards, -- Shlomi Fish
From desmond.daignault [...] oneil.com Wed Oct 17 09: 56:28 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118288004 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.899
X-Ironport-Av: E=Sophos;i="4.80,600,1344225600"; d="scan'208";a="375313"
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D7AFA2401AB for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:56:28 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dwa6vN4wt6Ah for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 09:56:23 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 13DA82400AB for <bug-XML-LibXML [...] rt.cpan.org>; Wed, 17 Oct 2012 09:56:22 -0400 (EDT)
Received: (qmail 11002 invoked by uid 103); 17 Oct 2012 13:56:22 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Oct 2012 13:56:22 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 17 Oct 2012 06:56:19 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 17 Oct 2012 09:56:17 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Wed, 17 Oct 2012 09:56:17 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
Thread-Index: AQHNq+ny34SiETyKGUaYw2IITfHNDpe9hRlw
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Wed, 17 Oct 2012 13:56:16 +0000
X-Spam-Level:
Thread-Topic: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
X-MS-Has-Attach:
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: Desmond Daignault <desmond.daignault [...] oneil.com>
RT-Message-ID: <rt-3.8.HEAD-6967-1350482189-996.80229-0-0 [...] rt.cpan.org>
Content-Length: 3512
Download (untitled) / with headers
text/plain 3.4k
Also, it works if I change line 364 to show qw(libxml2). Not sure how to fix this so that it works all the time for everybody. If you want to use check_lib_or_exit to check linking too, and deprecate your own have_library function, it needs to check for both xml2 and libxml2 as well. I tried putting both xml2 and libxml2 in the libs[] for check_lib_or_exit but it fails on xml2. So it needs to be wrapped in an eval and called twice, once for xml2 and once for libxml2. This will allow you to deprecate your have_library function. -- Dez. Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-XML-LibXML@rt.cpan.org] Sent: Tuesday, October 16, 2012 6:03 PM To: Desmond Daignault Subject: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces <URL: https://rt.cpan.org/Ticket/Display.html?id=80229 > Hi Desmond, On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote:
> On Windows, check_lib_or_exit always fails. No matter what I set INC= > to be on the command line. >
Devel::CheckLib should support Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where this is going wrong and fix it. You can use perl -d (the perl debugger) to assist you.
> When using Visual Studio, it looks at the environment variable INCLUDE > to find include headers and the environment variable LIB to find > library files.
Well, UNIX compilers are using different variables (see the gcc man page). The question is which env vars CL.EXE supports.
> > eg: > INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft > Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft > Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft > SDKs\Windows\v6.0A\include; > LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual > Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio > 9.0\VC\LIB;C:\P > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > In the example above, the libxml2 library was installed in > c:\project\win32\install\lib and c:\project\win32\install\include. > > If I remove the check_lib_or_exit function from Makefile.PL it builds > just fine when the environment has INCLUDE and LIB set correctly. > > Additionally a warning can be removed when checking to see if LIBS was > passed on the command line. >
the check_lib_or_exit call was added to prevent cases where the shared library can be found, but the headers cannot be found, which makes the build fails later. I'd rather not avoid it anywhere.
> > patch follows: >
The patch has two issues: 1. It is not in unified format - use diff -u next time (you can also send us a bitbucket pull request). 2. The second is:
> > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended > for use only by the person(s) or organization listed in the > address. If you have received this communication in error, please > contact the sender at O'Neil & Associates, Inc., immediately. Any > copying, dissemination, or distribution of this communication, > other than by the intended recipient, is strictly prohibited. > ********************************************************************** >
this disclaimer prevents us from using the patch for our FOSS project. Regards, -- Shlomi Fish
From desmond.daignault [...] oneil.com Wed Oct 17 10: 24:37 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118288010 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.899
X-Ironport-Av: E=Sophos;i="4.80,600,1344225600"; d="scan'208";a="375711"
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 92A002401AB for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 10:24:37 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I7oUi8r3UQQJ for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 10:24:31 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 07E462400AB for <bug-XML-LibXML [...] rt.cpan.org>; Wed, 17 Oct 2012 10:24:30 -0400 (EDT)
Received: (qmail 14362 invoked by uid 103); 17 Oct 2012 14:24:30 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Oct 2012 14:24:30 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 17 Oct 2012 07:24:27 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 17 Oct 2012 10:24:24 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Wed, 17 Oct 2012 10:24:24 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
Thread-Index: AQHNq+ny34SiETyKGUaYw2IITfHNDpe9jazw
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Wed, 17 Oct 2012 14:24:23 +0000
X-Spam-Level:
Thread-Topic: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
X-MS-Has-Attach:
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: Desmond Daignault <desmond.daignault [...] oneil.com>
RT-Message-ID: <rt-3.8.HEAD-5126-1350483878-1049.80229-0-0 [...] rt.cpan.org>
Content-Length: 9787
Download (untitled) / with headers
text/plain 9.5k
Sorry for all the spam. Here is a patch that doesn't use your have_library function and only uses Devel-CheckLib. It should work for everybody. *** Makefile.PL.orig 2012-10-13 16:30:39.000000000 -0400 --- Makefile.PL 2012-10-17 09:13:57.972500000 -0400 *************** *** 286,292 **** # -------------------------------------------------------------------------- # # fix the ld flags # -------------------------------------------------------------------------- # ! if ($config{LIBS} !~ /\-l(?:lib)?xml2\b/) { # in this case we are not able to run xml2-config. therefore we need to # expand the libz as well. if ($is_Win32) { --- 286,292 ---- # -------------------------------------------------------------------------- # # fix the ld flags # -------------------------------------------------------------------------- # ! if (!defined $config{LIBS} || $config{LIBS} !~ /\-l(?:lib)?xml2\b/) { # in this case we are not able to run xml2-config. therefore we need to # expand the libz as well. if ($is_Win32) { *************** *** 327,365 **** # if the Build Target is set correctly. Otherwise we have to set it by # hand - # -------------------------------------------------------------------------- # - - # -------------------------------------------------------------------------- # - # test if the libraries are really installed! - unless (have_library("xml2") or have_library("libxml2")) { - print STDERR <<"DEATH"; - libxml2, zlib, and/or the Math library (-lm) have not been found. - Try setting LIBS and INC values on the command line - Or get libxml2 from - http://xmlsoft.org/ - If you install via RPMs, make sure you also install the -devel - RPMs, as this is where the headers (.h files) are. - - Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter - to see the exact reason why the detection of libxml2 installation - failed or why Makefile.PL was not able to compile a test program. - DEATH - exit 0; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors) - } - # -------------------------------------------------------------------------- # - - # -------------------------------------------------------------------------- # - # _NOW_ write the Makefile - my $ldflags = delete $config{LDFLAGS}; if ($ldflags) { $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } ! my $incpath = $config{INC}; $incpath =~ s#(\A|\s)\s*-I#$1#g; ! check_lib_or_exit( # fill in what you prompted the user for here lib => [qw(xml2)], incpath => [split(/\s/,$incpath)], --- 327,344 ---- # if the Build Target is set correctly. Otherwise we have to set it by # hand my $ldflags = delete $config{LDFLAGS}; if ($ldflags) { $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; } ! my $incpath = $config{INC} || ""; $incpath =~ s#(\A|\s)\s*-I#$1#g; ! ! print "Checking for ability to link against xml2..."; ! if( ! check_lib( # fill in what you prompted the user for here lib => [qw(xml2)], incpath => [split(/\s/,$incpath)], *************** *** 389,395 **** 'libxml/xpath.h', 'libxml/xpathInternals.h', ], ! ); WriteMakefile( %INFOS, --- 368,430 ---- 'libxml/xpath.h', 'libxml/xpathInternals.h', ], ! )) { ! print "yes\n"; ! } else { ! print "no\n"; ! print "Checking for ability to link against libxml2..."; ! if( ! check_lib( ! # fill in what you prompted the user for here ! lib => [qw(libxml2)], ! incpath => [split(/\s/,$incpath)], ! header => ! [ ! 'libxml/c14n.h', ! 'libxml/catalog.h', ! 'libxml/entities.h', ! 'libxml/globals.h', ! 'libxml/HTMLparser.h', ! 'libxml/HTMLtree.h', ! 'libxml/parser.h', ! 'libxml/parserInternals.h', ! 'libxml/pattern.h', ! 'libxml/relaxng.h', ! 'libxml/tree.h', ! 'libxml/uri.h', ! 'libxml/valid.h', ! 'libxml/xinclude.h', ! 'libxml/xmlerror.h', ! 'libxml/xmlIO.h', ! 'libxml/xmlmemory.h', ! 'libxml/xmlreader.h', ! 'libxml/xmlregexp.h', ! 'libxml/xmlschemas.h', ! 'libxml/xmlversion.h', ! 'libxml/xpath.h', ! 'libxml/xpathInternals.h', ! ], ! )) { ! print "yes\n"; ! } else { ! print STDERR <<"DEATH"; ! libxml2, zlib, and/or the Math library (-lm) have not been found. ! Try setting LIBS and INC values on the command line ! Or get libxml2 from ! http://xmlsoft.org/ ! If you install via RPMs, make sure you also install the -devel ! RPMs, as this is where the headers (.h files) are. ! ! Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter ! to see the exact reason why the detection of libxml2 installation ! failed or why Makefile.PL was not able to compile a test program. ! DEATH ! exit 0; # 0 recommended by http://cpantest.grango.org (Notes for CPAN Authors) ! } ! } ! ! # -------------------------------------------------------------------------- # ! # _NOW_ write the Makefile WriteMakefile( %INFOS, *************** *** 681,732 **** return $result; } - sub have_library { - my ($lib, $func) = (@_, "blank"); - printf("checking for %s() in -l%s... ", $func, $lib) if $func ne "blank"; - printf("looking for -l%s... ", $lib) if $func eq "blank"; - - my $result; - if ($func) { - my $libs = $is_Win32 ? " $lib.lib " : "-l$lib"; - # my $libs = "-l$lib"; - if ($is_Win32) { - $result = try_link(<<"SRC", undef); - #include <windows.h> - #include <winsock.h> - blank() { return 0; } - int t() { ${func}(); return 0; } - SRC - unless ($result) { - $result = try_link(<<"SRC", undef); - #include <windows.h> - #include <winsock.h> - blank() { return 0; } - int t() { void ((*p)()); p = (void ((*)()))${func}; return 0; } - SRC - } - } - else { - $result = try_link(<<"SRC", undef); - blank() { return 0; } - int t() { ${func}(); return 0; } - SRC - } - } - - unless ($result) { - print "no\n"; - return 0; - } - - if ($func ne "main") { - $config{DEFINE} .= uc(" -Dhave_$func"); - } - - print "yes\n"; - return 1; - } - # -------------------------------------------------------------------------- # # try_libconfig class a generic config file and requests --version, --libs and # --cflags --- 716,721 ---- -- Dez. Show quoted text
-----Original Message----- From: Shlomi Fish via RT [mailto:bug-XML-LibXML@rt.cpan.org] Sent: Tuesday, October 16, 2012 6:03 PM To: Desmond Daignault Subject: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces <URL: https://rt.cpan.org/Ticket/Display.html?id=80229 > Hi Desmond, On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote:
> On Windows, check_lib_or_exit always fails. No matter what I set INC= > to be on the command line. >
Devel::CheckLib should support Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where this is going wrong and fix it. You can use perl -d (the perl debugger) to assist you.
> When using Visual Studio, it looks at the environment variable INCLUDE > to find include headers and the environment variable LIB to find > library files.
Well, UNIX compilers are using different variables (see the gcc man page). The question is which env vars CL.EXE supports.
> > eg: > INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft > Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft > Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft > SDKs\Windows\v6.0A\include; > LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual > Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio > 9.0\VC\LIB;C:\P > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > In the example above, the libxml2 library was installed in > c:\project\win32\install\lib and c:\project\win32\install\include. > > If I remove the check_lib_or_exit function from Makefile.PL it builds > just fine when the environment has INCLUDE and LIB set correctly. > > Additionally a warning can be removed when checking to see if LIBS was > passed on the command line. >
the check_lib_or_exit call was added to prevent cases where the shared library can be found, but the headers cannot be found, which makes the build fails later. I'd rather not avoid it anywhere.
> > patch follows: >
The patch has two issues: 1. It is not in unified format - use diff -u next time (you can also send us a bitbucket pull request). 2. The second is:
> > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended > for use only by the person(s) or organization listed in the > address. If you have received this communication in error, please > contact the sender at O'Neil & Associates, Inc., immediately. Any > copying, dissemination, or distribution of this communication, > other than by the intended recipient, is strictly prohibited. > ********************************************************************** >
this disclaimer prevents us from using the patch for our FOSS project. Regards, -- Shlomi Fish
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-5126-1350483878-1049.80229-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118288010 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-5126-1350483878-1049.80229-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-14249-1350486695-1628.80229-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 10738
Download (untitled) / with headers
text/plain 10.4k
On Wed Oct 17 10:24:38 2012, desmond.daignault@oneil.com wrote: Show quoted text
> Sorry for all the spam. Here is a patch that doesn't use your > have_library function and only uses Devel-CheckLib. > > It should work > for everybody.
Thanks! However this patch is not in unfied diff format, and so I find it delightfully hard to follow. Please include a patch in that format - you can use gnudiff -u to generate it. You can find gnudiff in cygwin or in http://gnuwin32.sourceforge.net/packages/diffutils.htm (old version, but should work fine). As an alternative, you can send me a Bitbcuket pull request. Finally, I should note that it is possible you are listing all the headers and other parameters for check_lib() twice. If os, please extract them into a function or a variable. Regards, Shlomi Fish Show quoted text
> > > *** Makefile.PL.orig 2012-10-13 16:30:39.000000000 > -0400 > --- Makefile.PL 2012-10-17 09:13:57.972500000 -0400 > *************** > *** 286,292 **** > # > -------------------------------------------------------------------------- > # > # fix the ld flags > # > -------------------------------------------------------------------------- > # > ! if ($config{LIBS} !~ /\-l(?:lib)?xml2\b/) { > # in this case > we are not able to run xml2-config. therefore we need to > # > expand the libz as well. > if ($is_Win32) { > --- 286,292 ---- > # > -------------------------------------------------------------------------- > # > # fix the ld flags > # > -------------------------------------------------------------------------- > # > ! if (!defined $config{LIBS} || $config{LIBS} !~ /\- > l(?:lib)?xml2\b/) { > # in this case we are not able to run xml2- > config. therefore we need to > # expand the libz as well. > if > ($is_Win32) { > *************** > *** 327,365 **** > # if the Build > Target is set correctly. Otherwise we have to set it by > # hand > - # > -------------------------------------------------------------------------- > # > - > - # > -------------------------------------------------------------------------- > # > - # test if the libraries are really installed! > - unless > (have_library("xml2") or have_library("libxml2")) { > - print > STDERR <<"DEATH"; > - libxml2, zlib, and/or the Math library (-lm) have > not been found. > - Try setting LIBS and INC values on the command line > - Or get libxml2 from > - http://xmlsoft.org/ > - If you install via > RPMs, make sure you also install the -devel > - RPMs, as this is where > the headers (.h files) are. > - > - Also, you may try to run perl > Makefile.PL with the DEBUG=1 parameter > - to see the exact reason why > the detection of libxml2 installation > - failed or why Makefile.PL was > not able to compile a test program. > - DEATH > - exit 0; # 0 > recommended by http://cpantest.grango.org (Notes for CPAN Authors) > - > } > - # > -------------------------------------------------------------------------- > # > - > - # > -------------------------------------------------------------------------- > # > - # _NOW_ write the Makefile > - > my $ldflags = delete > $config{LDFLAGS}; > if ($ldflags) { > $config{dynamic_lib} = { > OTHERLDFLAGS => " $ldflags " }; > } > > ! my $incpath = > $config{INC}; > $incpath =~ s#(\A|\s)\s*-I#$1#g; > > ! > check_lib_or_exit( > # fill in what you prompted the user for > here > lib => [qw(xml2)], > incpath => > [split(/\s/,$incpath)], > --- 327,344 ---- > # if the Build Target is > set correctly. Otherwise we have to set it by > # hand > > my > $ldflags = delete $config{LDFLAGS}; > if ($ldflags) { > $config{dynamic_lib} = { OTHERLDFLAGS => " $ldflags " }; > } > > ! > my $incpath = $config{INC} || ""; > $incpath =~ s#(\A|\s)\s*-I#$1#g; > ! > ! print "Checking for ability to link against xml2..."; > ! if( > ! > check_lib( > # fill in what you prompted the user for here > lib => [qw(xml2)], > incpath => [split(/\s/,$incpath)], > *************** > *** 389,395 **** > 'libxml/xpath.h', > 'libxml/xpathInternals.h', > ], > ! ); > > WriteMakefile( > %INFOS, > --- 368,430 ---- > 'libxml/xpath.h', > 'libxml/xpathInternals.h', > ], > ! )) { > ! print "yes\n"; > ! > } else { > ! print "no\n"; > ! print "Checking for ability to link > against libxml2..."; > ! if( > ! check_lib( > ! # fill in > what you prompted the user for here > ! lib => [qw(libxml2)], > ! > incpath => [split(/\s/,$incpath)], > ! header => > ! [ > ! > 'libxml/c14n.h', > ! 'libxml/catalog.h', > ! > 'libxml/entities.h', > ! 'libxml/globals.h', > ! > 'libxml/HTMLparser.h', > ! 'libxml/HTMLtree.h', > ! > 'libxml/parser.h', > ! 'libxml/parserInternals.h', > ! > 'libxml/pattern.h', > ! 'libxml/relaxng.h', > ! > 'libxml/tree.h', > ! 'libxml/uri.h', > ! > 'libxml/valid.h', > ! 'libxml/xinclude.h', > ! > 'libxml/xmlerror.h', > ! 'libxml/xmlIO.h', > ! > 'libxml/xmlmemory.h', > ! 'libxml/xmlreader.h', > ! > 'libxml/xmlregexp.h', > ! 'libxml/xmlschemas.h', > ! > 'libxml/xmlversion.h', > ! 'libxml/xpath.h', > ! > 'libxml/xpathInternals.h', > ! ], > ! )) { > ! print > "yes\n"; > ! } else { > ! print STDERR <<"DEATH"; > ! libxml2, > zlib, and/or the Math library (-lm) have not been found. > ! Try > setting LIBS and INC values on the command line > ! Or get libxml2 from > ! http://xmlsoft.org/ > ! If you install via RPMs, make sure you also > install the -devel > ! RPMs, as this is where the headers (.h files) > are. > ! > ! Also, you may try to run perl Makefile.PL with the DEBUG=1 > parameter > ! to see the exact reason why the detection of libxml2 > installation > ! failed or why Makefile.PL was not able to compile a > test program. > ! DEATH > ! exit 0; # 0 recommended by > http://cpantest.grango.org (Notes for CPAN Authors) > ! } > ! } > ! > ! > # > -------------------------------------------------------------------------- > # > ! # _NOW_ write the Makefile > > WriteMakefile( > %INFOS, > *************** > *** 681,732 **** > return $result; > } > - sub have_library { > - my ($lib, $func) = (@_, "blank"); > - > printf("checking for %s() in -l%s... ", $func, $lib) if $func ne > "blank"; > - printf("looking for -l%s... ", $lib) if $func eq > "blank"; > - > - my $result; > - if ($func) { > - my > $libs = $is_Win32 ? " $lib.lib " : "-l$lib"; > - # my $libs = > "-l$lib"; > - if ($is_Win32) { > - $result = > try_link(<<"SRC", undef); > - #include <windows.h> > - #include > <winsock.h> > - blank() { return 0; } > - int t() { ${func}(); return 0; > } > - SRC > - unless ($result) { > - $result > = try_link(<<"SRC", undef); > - #include <windows.h> > - #include > <winsock.h> > - blank() { return 0; } > - int t() { void ((*p)()); p = > (void ((*)()))${func}; return 0; } > - SRC > - } > - > } > - else { > - $result = try_link(<<"SRC", undef); > - blank() { return 0; } > - int t() { ${func}(); return 0; } > - SRC > - > } > - } > - > - unless ($result) { > - print "no\n"; > - > return 0; > - } > - > - if ($func ne "main") { > - > $config{DEFINE} .= uc(" -Dhave_$func"); > - } > - > - print > "yes\n"; > - return 1; > - } > - > # > -------------------------------------------------------------------------- > # > # try_libconfig class a generic config file and requests > --version, --libs and > # --cflags > --- 716,721 ---- > > > -- > Dez. > -----Original Message----- > From: Shlomi Fish via RT [mailto:bug-XML- > LibXML@rt.cpan.org] > Sent: Tuesday, October 16, 2012 6:03 PM > To: > Desmond Daignault > Subject: [rt.cpan.org #80229] Fails to create > Makefile on windows due to include path having spaces > > <URL: > https://rt.cpan.org/Ticket/Display.html?id=80229 > > > Hi Desmond, > On Tue Oct 16 16:44:49 2012, desmond.daignault@oneil.com wrote:
> > On
> Windows, check_lib_or_exit always fails. No matter what I set INC=
> >
> to be on the command line.
> >
> > Devel::CheckLib should support > Microsoft Visual C++ (CL.EXE) pretty well, and so you should see where > this is going wrong and fix it. You can use perl -d (the perl > debugger) to assist you. >
> > When using Visual Studio, it looks at
> the environment variable INCLUDE
> > to find include headers and the
> environment variable LIB to find
> > library files.
> > Well, UNIX > compilers are using different variables (see the gcc man page). The > question is which env vars CL.EXE supports. >
> > > > eg: > >
> INCLUDE=C:\project\win32\install\include;C:\Program Files\Microsoft
> >
> Visual Studio 9.0\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft
> >
> Visual Studio 9.0\VC\INCLUDE;C:\Program Files\\Microsoft
> >
> SDKs\Windows\v6.0A\include;
> >
> LIB=C:\project\win32\install\lib;C:\Program Files\Microsoft Visual
> >
> Studio 9.0\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio
> >
> 9.0\VC\LIB;C:\P
> > rogram Files\\Microsoft SDKs\Windows\v6.0A\lib; > > > > In the example above, the libxml2 library was installed in > >
> c:\project\win32\install\lib and c:\project\win32\install\include.
> > > > If I remove the check_lib_or_exit function from Makefile.PL it
> builds
> > just fine when the environment has INCLUDE and LIB set
> correctly.
> > > > Additionally a warning can be removed when checking
> to see if LIBS was
> > passed on the command line. > >
> > the > check_lib_or_exit call was added to prevent cases where the shared > library can be found, but the headers cannot be found, which makes the > build fails later. I'd rather not avoid it anywhere. >
> > > > patch
> follows:
> >
> > The patch has two issues: > > 1. It is not in unified > format - use diff -u next time (you can also send us a bitbucket pull > request). > > 2. The second is: >
> > > >
> **********************************************************************
> > Confidentiality Notice > > The information contained in this e-mail
> is confidential and intended
> > for use only by the person(s) or
> organization listed in the
> > address. If you have received this
> communication in error, please
> > contact the sender at O'Neil &
> Associates, Inc., immediately. Any
> > copying, dissemination, or
> distribution of this communication,
> > other than by the intended
> recipient, is strictly prohibited.
> >
> **********************************************************************
> >
> > this disclaimer prevents us from using the patch for our FOSS > project. > > Regards, > > -- Shlomi Fish
From desmond.daignault [...] oneil.com Wed Oct 17 11: 14:25 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-6.899 tagged_above=-99.9 required=10 tests=[AWL=0.000, BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-14249-1350486696-690.80229-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-80229 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-6967-1350424953-85.80229-6-0 [...] rt.cpan.org> <7DD03DA25AED30469CE7D69587B498EC0118288010 [...] daytonexmbx.oneilinc.net> <rt-3.8.HEAD-5126-1350483878-1049.80229-6-0 [...] rt.cpan.org> <rt-3.8.HEAD-14249-1350486696-690.80229-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <7DD03DA25AED30469CE7D69587B498EC0118288022 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -6.899
X-Ironport-Av: E=Sophos;i="4.80,601,1344225600"; d="scan'208";a="376238"
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 8F6652401CB for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 11:14:25 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLQPDGeyJ+hj for <cpan-bug+XML-LibXML [...] hipster.bestpractical.com>; Wed, 17 Oct 2012 11:14:19 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id D60612400AB for <bug-XML-LibXML [...] rt.cpan.org>; Wed, 17 Oct 2012 11:14:18 -0400 (EDT)
Received: (qmail 19762 invoked by uid 103); 17 Oct 2012 15:14:18 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 17 Oct 2012 15:14:18 -0000
Received: from ironport.oneil.com (HELO ironport.oneil.com) (66.194.184.36) by 16.mx.develooper.com (qpsmtpd/0.84/v0.84-167-g4ed6cab) with ESMTP; Wed, 17 Oct 2012 08:14:14 -0700
Received: from unknown (HELO daytonexcasht.oneilinc.net) ([192.168.1.194]) by ironport.oneil.com with ESMTP; 17 Oct 2012 11:13:44 -0400
Received: from DAYTONEXMBX.oneilinc.net ([::1]) by daytonexcasht.oneilinc.net ([::1]) with mapi; Wed, 17 Oct 2012 11:13:44 -0400
Delivered-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
Return-Path: <desmond.daignault [...] oneil.com>
Thread-Index: AQHNq+ny34SiETyKGUaYw2IITfHNDpe9jazwgAAN6a6AAAB4cA==
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+XML-LibXML [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Wed, 17 Oct 2012 15:13:43 +0000
X-Spam-Level:
Thread-Topic: [rt.cpan.org #80229] Fails to create Makefile on windows due to include path having spaces
X-MS-Has-Attach:
To: "bug-XML-LibXML [...] rt.cpan.org" <bug-XML-LibXML [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: Desmond Daignault <desmond.daignault [...] oneil.com>
RT-Message-ID: <rt-3.8.HEAD-31045-1350486866-666.80229-0-0 [...] rt.cpan.org>
Content-Length: 17558
Download (untitled) / with headers
text/plain 17.1k

Message body is not shown because it is too large.

MIME-Version: 1.0
In-Reply-To: <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <7DD03DA25AED30469CE7D69587B498EC0118287FA7 [...] daytonexmbx.oneilinc.net>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-7695-1350493617-117.80229-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 248
Download (untitled) / with headers
text/plain 248b
Hi, I applied a modified version of this patch and released it as XML-LibXML-2.0007. Thanks for the report and the patch. A few notes: 1. You should have avoided the duplicate code. I fixed it. 2. Please use 4-whitespace indents instead of 2.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.