Opened 22 years ago

Closed 21 years ago

Last modified 21 years ago

#208 closed defect (fixed)

[configure] Problem on MacOSX with 'perl -V' stuff

Reported by: dmorissette Owned by: zjames@…
Priority: high Milestone:
Component: MapScript-PHP Version: 4.0
Severity: normal Keywords: VERIFIED
Cc:

Description

Note that this is not an issue any more in 3.7 since we dropped the configure 
macro based on Perl -v, but it could be worth patching this for 3.6 for MacOSX 
users.
------------

Subject:         configure and os x
   Date:         Tue, 8 Oct 2002 16:09:01 -0400
   From:         Zak James <zak@aiya.dhs.org>
     To:         Daniel Morissette <morissette@dmsolutions.ca>

Hi Daniel,

I hope you had a good trip.

I'm trying to tie up some loose ends so that I can finally add a 
mapserver wiki page for building on os x. I have a problem with 
configure and I am wondering whether to put a workaround in the howto 
or if it is feasible to change the configure script.

The problem is that the perl -V output from the perl installed with os 
x is not handled properly so that PHP_LD is left as /bin/true and the 
php mapscript linking doesn't get done.

  In line 5365 of configure, PERL_LDDLFLAGS=`grep ' lddlflags' perl.out 
| cut -d, -f2 | cut -d\' -f2 | grep -v undef` is returning a blank. I'm 
including the os x perl -V output so you can see for yourself but the 
if I modify the line to be
PERL_LDDLFLAGS `grep ' lddlflags' perl.out |cut -d\' -f4` it picks up 
the right flags (-bundle -flat_namespace -undefined suppress).

I didn't want to start hacking around with it because I'd surely break 
it for some other platform. Any ideas?

Zak

[frazzle:~/mapserver] zak% perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
   Platform:
     osname=darwin, osvers=6.0, archname=darwin
     uname='darwin fisheye 6.0 darwin kernel version 5.2: mon jun 17 
09:55:14 pdt 2002; root:xnu-201-14.rootsxnu-201-14.objrelease_ppc power 
macintosh powerpc '
     config_args='-ds -e -Dprefix=/usr -Dccflags=-g  -pipe  -Dldflags='
     hint=recommended, useposix=true, d_sigaction=define
     usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=undef
     useperlio=undef d_sfio=undef uselargefiles=define
     use64bitint=undef use64bitall=undef uselongdouble=undef 
usesocks=undef
   Compiler:
     cc='cc', optimize='-Os', gccversion=Apple cpp-precomp 6.14
     cppflags='-g -pipe -pipe -fno-common -no-cpp-precomp 
-flat_namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing'
     ccflags ='-g -pipe -pipe -fno-common -no-cpp-precomp 
-flat_namespace -DHAS_TELLDIR_PROTOTYPE -fno-strict-aliasing'
     stdchar='char', d_stdstdio=undef, usevfork=true
     intsize=4, longsize=4, ptrsize=4, doublesize=8
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
     ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
     alignbytes=8, usemymalloc=n, prototype=define
   Linker and Libraries:
     ld='cc', ldflags =''
     libpth=/usr/lib
     libs=-lm -lc
     libc=/System/Library/Frameworks/System.framework/System, so=dylib, 
useshrplib=true, libperl=libperl.dylib
   Dynamic Linking:
     dlsrc=dl_dyld.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
     cccdlflags=' ', lddlflags='-bundle  -flat_namespace -undefined 
suppress'


Characteristics of this binary (from libperl):
   Compile-time options: USE_LARGE_FILES
   Built under darwin
   Compiled at Jul 14 2002 04:04:33
   %ENV:
     PERL_LDDLFLAGS="-bundle -flat_namespace -undefined suppress"
   @INC:
     /System/Library/Perl/darwin
     /System/Library/Perl
     /Library/Perl/darwin
     /Library/Perl
     /Library/Perl
     /Network/Library/Perl/darwin
     /Network/Library/Perl
     /Network/Library/Perl

Change History (7)

comment:1 by dmorissette, 22 years ago

Owner: changed from assefa to morissette@…

comment:2 by dmorissette, 21 years ago

Cc: assefa@… added
Component: PROJ-PHP ModuleMapScript-PHP
Owner: changed from morissette@… to zjames@…
Version: 3.64.1
Zak has been doing some work on this in the 4.0 version but I don't think it's 
fixed completely yet.  

Marking as a V4.1 bug and reassigning to Zak.

comment:3 by zjames@…, 21 years ago

Status: newassigned

comment:4 by zjames@…, 21 years ago

op_sys: Windows NTMacOS X
rep_platform: PCMacintosh
In testing, looks like OS X passes the necessary tests, but ends up being
assigned all the various flags, ending up with the last (-dynamic) which is
valid, but not for a dynamically loadable module. To short circuit this,
something like this:

---------
  if test -n "`uname -a | grep Darwin`" ; then
    SHARED_FLAG="-bundle -flat_namespace -undefined suppress"
    LD_SHARED="${CXX} $SHARED_FLAG"
  fi
---------
around line 5430 (before the other LD tests) forces it to do the right thing.

comment:5 by dmorissette, 21 years ago

Resolution: fixed
Status: assignedclosed
For the record, line 5430 muct have been in the generated configure script, the 
lines to change were in the aclocal.m4 file which is used to generate the 
configure script with autoconf.

I have applied your change and committed to the 4.0 CVS.  I'll mark the bug 
fixed and you can mark as VERIFIED if things work fine for you.

comment:6 by zjames@…, 21 years ago

Keywords: VERIFIED added
now successfully configures and builds on OS X 10.2 with gcc 2.95

comment:7 by dmorissette, 21 years ago

Version: 4.14.0
This was fixed in 4.0, setting version accordingly.
Note: See TracTickets for help on using tickets.