Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#16233 closed defect (fixed)

Leopard environment variable issue remains

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: Cc: afb@…, blb@…
Port:

Description

The Leopard environment variable issue remains even after r36719 and r36722 which were supposed to fix it. The following test is with MacPorts base @39006 on Mac OS X 10.5.4 with Xcode 3.1 on Intel.

Make sure that nmap and py25-numpy are not installed. Then try to install umit, which depends on both.

$ port install umit
--->  Fetching nmap
--->  Verifying checksum(s) for nmap
--->  Extracting nmap
--->  Configuring nmap
--->  Building nmap
--->  Staging nmap into destroot
--->  Installing nmap @4.68_0
--->  Activating nmap @4.68_0
--->  Cleaning nmap
--->  Fetching py25-numpy
--->  Verifying checksum(s) for py25-numpy
--->  Extracting py25-numpy
--->  Applying patches to py25-numpy
--->  Configuring py25-numpy
--->  Building py25-numpy
Error: Target org.macports.build returned: shell command " cd "/mp/var/macports/build/_Users_rschmidt_macports_dports_python_py25-numpy/work/numpy-1.1.1" && /mp/bin/python2.5 setup.py build " returned error 1
Command output: Running from numpy source directory.
non-existing path in 'numpy/distutils': 'site.cfg'
F2PY Version 2_5585
blas_opt_info:
  FOUND:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    define_macros = [('NO_ATLAS_INFO', 3)]
    extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']

lapack_opt_info:
  FOUND:
    extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
    define_macros = [('NO_ATLAS_INFO', 3)]
    extra_compile_args = ['-msse3']

running build
running scons
customize UnixCCompiler
Could not locate executable -fno-strict-aliasing
error: Could not find compiler executable info for scons

Error: The following dependencies failed to build: py25-gtk py25-cairo py25-numpy py25-sqlite3
Error: Status 1 encountered during processing.
$

Cleaning py25-numpy and trying again allows it to proceed.

$ port clean --work py25-numpy
--->  Cleaning py25-numpy
$ port install umit
--->  Fetching py25-numpy
--->  Verifying checksum(s) for py25-numpy
--->  Extracting py25-numpy
--->  Applying patches to py25-numpy
--->  Configuring py25-numpy
--->  Building py25-numpy
--->  Staging py25-numpy into destroot
--->  Installing py25-numpy @1.1.1_0
--->  Activating py25-numpy @1.1.1_0
--->  Cleaning py25-numpy
--->  Fetching py25-cairo
[snip]

Change History (15)

comment:1 Changed 16 years ago by blb@…

There are three places where array unset env are used:

Perhaps a good fix for #16010 would fix this as well? I didn't provide a patch there since I wasn't sure if moving the package require Pextlib 1.0 before the environment handling is a good idea, or if the env handling should be moved after the package require bits, or something else entirely.

comment:2 Changed 16 years ago by afb@…

Bugs in Leopard's Tcl are best fixed by Apple, all MacPorts can hope for is workarounds... But it does seem like more of those are needed, since "unset env" is broken and needs working around everywhere.

comment:5 in reply to:  1 Changed 16 years ago by afb@…

Replying to blb@macports.org:

There are three places where array unset env are used:

comment:6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Anders, you're awesome. That seems to fix it.

My remaining concern is that everywhere we want to unset environment variables now, we have to call two procedures. Can there be a single procedure that takes care of everything we need? Do we still need "array unset env" now that we have "unsetenv"? If we do still need both, then it would be good to have a wrapper function which we can call which itself calls both of those.

comment:7 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Bryan, you're awesome too, for the fix suggested in #16010 and for finding where all the issue needed to be fixed. :)

comment:8 in reply to:  6 Changed 16 years ago by afb@…

Thank you. :-)

We could make an "array_unset_env" wrapper, to call both of them in sequence.

comment:9 Changed 16 years ago by blb@…

Just note that the 'array unset env' is all that should be needed, but until Apple fixes their @%^$, both are needed. We could do a wrapper like afb says, but then again it'd only be needed until tclsh is fixed. On the other hand, it could be 10.6 that fixes it...

comment:10 Changed 16 years ago by afb@…

And of course, having to remember to type "array_unset_env" instead of "array unset env" isn't much easier than remembering to call unsetenv. And since unsetenv requires pextlib to be loaded first, combining the two into a wrapper isn't possible for all uses either. So I think we'll avoid the whole wrapper idea.

comment:11 Changed 16 years ago by afb@…

Still not fixed in http://www.opensource.apple.com/darwinsource/10.5.5/tcl-64/.

Probably waiting for Snow Leopard, so not likely to see any fixes in Leopard...

comment:12 Changed 16 years ago by blb@…

Can you reproduce this since r41650?

comment:13 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Am currently testing.

comment:14 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

No problem now! Must've been fixed by the recent improvements.

comment:15 Changed 16 years ago by blb@…

Milestone: MacPorts base bugsMacPorts 1.7.0
Note: See TracTickets for help on using tickets.