#25321 closed defect (invalid)
configure.env variables overwritten between pre-configure and configure stages
Reported by: | michaelld (Michael Dickens) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | High | Milestone: | |
Component: | base | Version: | 1.9.0 |
Keywords: | Cc: | ||
Port: |
Description (last modified by michaelld (Michael Dickens))
See ticket #25320 comment 3 and 4. This overwriting might also occur between other pre- and regular stages; I haven't checked for those.
Change History (6)
comment:1 Changed 14 years ago by michaelld (Michael Dickens)
Priority: | Normal → High |
---|
comment:2 Changed 14 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | new → closed |
You're not meant to use *.env when there is a specific variable available for that purpose. For example, you use configure.cc instead of setting CC in configure.env. In this case, you want compiler.cpath and compiler.library_path.
comment:3 Changed 14 years ago by michaelld (Michael Dickens)
Had no idea those configure. variables existed, so I'll try using them & see if that takes care of the issue.
comment:4 Changed 14 years ago by michaelld (Michael Dickens)
Do those same .variables exist for the other phases (e.g., build, destroot, etc..)? I need them for at least build.
comment:5 Changed 14 years ago by michaelld (Michael Dickens)
Sorry; just reread that you wrote "compiler." instead of "configure." ... so ignore that last comment.
comment:6 Changed 14 years ago by michaelld (Michael Dickens)
Description: | modified (diff) |
---|---|
Summary: | configure.env variables truncated between pre-configure and configure stages → configure.env variables overwritten between pre-configure and configure stages |
Yes, I realized that this ticket is closed, but I want to correct the info for future reference.
Playing with the compiler.cpath (via the qt4-mac Portfile), it looks like what was going on is:
(0) environment variable CPATH was being set in configure.env correctly. Yes, I know this is the not the correct way to do it, but that's the way the Portfile has worked for quite a while now; I'm just inheriting its behavior.
(1) compiler.cpath was not being set, and so defaults to "${prefix}/include" alone (without ""s).
(2) when creating the environment for the 'configure' stage, the compiler.cpath entirely overwrites whatever is in the configure.env's CPATH variable.
I don't know if the above is desirable behavior or not, but: Given that qt4-mac worked by setting the configure.env CPATH variable once upon a time, the above represents a change in Portfile interpretation that was (AFAICT, stealthily) detrimental to the qt4-mac port -- and might be to other ports as well.
Is it possible to modify whatever routine is tweaking the configure.env (or XX.env) between the 'pre-configure' and 'configure' stages (or 'pre-build' and 'build', etc), such that it either (1) merges the CPATH (or other variable, etc) from both the compiler.cpath (etc) and the configure.env; or (2) prints out a warning that the CPATH (etc) variable is being overwritten, and to use compiler.cpath (etc) instead? Either might be a tall order, but something needs to happen IMHO: stealthily overwriting will only add confusion to Portfile behavior.
Given our discussion about header include paths on the macports-dev list, I think the qt4-mac Portfile (for the most part) is correct in using the CPATH to specific where headers are located. Hence, this ticket becomes a high priority, as this issue seems to be truncating the configure environment variables (at least CPATH and LIBRARY_PATH) such that some ports may not configure correctly. I have no idea where to look to fix this issue.