Opened 2 months ago

Last modified 2 months ago

#1842 new defect

Possibly inconsistent install/lookup behavior in the presence of CHICKEN_INSTALL_PREFIX — at Initial Version

Reported by: Mario Domenech Goulart Owned by:
Priority: major Milestone: someday
Component: core libraries Version: 5.4.0
Keywords: CHICKEN_INSTALL_PREFIX, chicken-install, srfi-29 Cc:
Estimated difficulty:

Description

The title is very poor and the description is going to be a paste of the discussion in #chicken.

Basically, the issue is highlighted by one of the tests of srfi-29

        -- testing Installed Test Bundle -------------------------------------
        (localized-template/default 'srfi-29 'srfi-29) ............... [ FAIL]
            expected "SRFI 29" but got srfi-29

Discussion in #chicken:

<mario-goulart> klovett: apparently srfi-29 is installing the srfi-29 bundle via the `data' section
                in the .egg file.  That makes the bundle be installed under PREFIX/share/chicken
                when CHICKEN_INSTALL_PREFIX is *unset*.  When CHICKEN_INSTALL_PREFIX *is set*
                (that's what salmonella does), the srfi-29 bundle is installed under PREFIX/share
                (no chicken directory).
<mario-goulart> Then srfi-29 looks for bundles under include-path, which resolves to
                C_INSTALL_SHARE_HOME when CHICKEN_INCLUDE_PATH is *unset*.  In that case,
                PREFIX/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX). However when
                CHICKEN_INCLUDE_PATH *is set*, chicken-install installs the bundle under
                PREFIX/share, but in runtime it looks for bundles under include-path, which is the
                value of CHICKEN_INCLUDE_PATH, which is set by salmonella as
<mario-goulart> PREFIX/share/chicken.
<Bunny351> hm...
<mario-goulart> Now I don't know if salmonella is setting CHICKEN_INCLUDE_PATH wrongly of if the
                default values given to override-prefix in egg-compile.scm is wrong.
<Bunny351> possible
<mario-goulart> The default values given to override-prefix definitely don't match the values of
                C_INSTALL_INCLUDE_HOME and C_INSTALL_SHARE_HOME.
<klovett> originally it only looked in (chicken-home)
<mario-goulart> I think that was the same as what now (include-path) is, if I'm not mistaken.
<klovett> well, one is a set
<mario-goulart> I _think_ (don't quote me on that) the root cause of the issue is the inconsistency
                between the values of C_INSTALL_INCLUDE_HOME/C_INSTALL_SHARE_HOME and the way that
                override-prefix assembles paths when when CHICKEN_INSTALL_PREFIX is set.
<klovett> is something is chicken.platform returning PREFIX/share? i can code the envvar test &
          subsequent path assumption but rather not.
<mario-goulart> That's part of the problem I'm implying.  You can get PREFIX/share *if*
                CHICKEN_INCLUDE_PATH is set to PREFIX/share.  If CHICKEN_INCLUDE_PATH is *not set*
                you'll get PREFIX/share/chicken (or, more accurately,
                PREFIX/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)).
<mario-goulart> This whole thing is very confusing.
<klovett> there is not a '(data-path)' so i will assume if CHICKEN_INSTALL_PREFIX is set then push
          "...PREFIX/share" onto the search list
<mario-goulart> I think it would be better to wait a bit.  I _think_ srfi-29 is probably doing the
                right thing.  The issue _might_ be in salmonella or in CHICKEN.
<klovett> ok
<klovett> looks like a job for chicken.platform#data-repository or similar

Change History (0)

Note: See TracTickets for help on using tickets.