bugThe FreeType Project - Bugs: bug #44261, Configure does not honour...


You are not allowed to post comments on this tracker with your current authentication level.

bug #44261: Configure does not honour CONFIG_SHELL

Submitted by:  Andreas Enge <enge>
Submitted on:  Sun 15 Feb 2015 06:12:50 PM UTC
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.6.1
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


( Jump to the original submission )

Fri 14 Aug 2015 12:59:06 PM UTC, comment #10: 



Andreas Enge <enge>
Fri 14 Aug 2015 12:31:46 PM UTC, comment #9: 

Thanks!  Patch applied to the git repository.

Werner LEMBERG <wl>
Project Administrator
Fri 14 Aug 2015 09:18:09 AM UTC, comment #8: 


works nicely.

Peter Breitenlohner <breitenlohner>
Fri 14 Aug 2015 06:50:10 AM UTC, comment #7: 


please have a look at the attached patch.  It was you who has originally contributed the change, and I guess it's you also who needs this feature.

Werner LEMBERG <wl>
Project Administrator
Wed 12 Aug 2015 08:11:03 PM UTC, comment #6: 

I confirm that the attached patch, which implements the change proposed in my previous comment, works for me.

(file #34632)

Andreas Enge <enge>
Wed 12 Aug 2015 07:23:14 PM UTC, comment #5: 

Well, in our environment we cheat, by just setting the CONFIG_SHELL environment variable before calling configure.

I think the problem here is the multiple indirections with a first configure script, which calls "make", which calls (via the inclusion of builds/unix/detect.mk) the real configure script with the parameters passed in the user's call to "configure" and which have ended up in the CFG variable (among which is 'CONFIG_SHELL=...').

Only the "real" configure would then evaluate this parameter and set the variable CONFIG_SHELL. So I think that in builds/unix/detect.mk, the line
   CONFIG_SHELL ?= /bin/sh
will always set the variable to /bin/sh, which does not exist.

A solution that could work for us would be to not use CONFIG_SHELL in the makefiles at all; towards the end of builds/unix/detect.mk, it would be enough to have
  ifdef must_configure
    ifneq ($(have_Makefile),)
      # we are building FT2 not in the src tree
                $(TOP_DIR)/builds/unix/configure $(value CFG)
              cd builds/unix; \
                ./configure $(value CFG)
since the configure script starts with #! and the path to a shell (this would be equivalent to the user calling "./configure").

I do not know whether this would be a good general solution.

Andreas Enge <enge>
Sat 06 Jun 2015 04:02:28 AM UTC, comment #4: 

Ping! Please assist :-) 

Werner LEMBERG <wl>
Project Administrator
Wed 04 Mar 2015 06:09:34 AM UTC, comment #3: 

Sorry for the delay.  Could you provide a patch that makes it work in your environment?

Werner LEMBERG <wl>
Project Administrator
Tue 17 Feb 2015 08:50:08 PM UTC, comment #2: 

I still get the same problem:

cd builds/unix; \
      CONFIG_SHELL="/bin/sh" \
        /bin/sh ./configure  'CONFIG_SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash' 'SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash' '--prefix=/gnu/store/f975y9gg4v199qj63l114gwi1f1l4vf0-freetype-2.4.11' '--enable-fast-install'
/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash: line 1: /bin/sh: No such file or directory

So while $CFG seems to be set, it is not evaluated, so that $CONFIG_SHELL is not set.

Andreas Enge <enge>
Mon 16 Feb 2015 06:31:19 AM UTC, comment #1: 

Thanks for the report.  Should be fixed in the git repository, please test.

Werner LEMBERG <wl>
Project Administrator
Sun 15 Feb 2015 06:12:50 PM UTC, original submission:  


when trying to update from freetype 2.4.1 to 2.5.5 in the guix system distribution, I notice that the current build system does not take the value of CONFIG_SHELL into account during the configure phase.

We build in a chroot with the following configure flags:
onfigure flags: ("CONFIG_SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash" "SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash" "--prefix=/gnu/store/cpl4ws8zikmwpm9wbh8q6rfnnxwwjpah-freetype-2.5.5" "--enable-fast-install")

Then the configure phase fails with
cd builds/unix; /bin/sh ./configure  'CONFIG_SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash' 'SHELL=/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash' '--prefix=/gnu/store/cpl4ws8zikmwpm9wbh8q6rfnnxwwjpah-freetype-2.5.5' '--enable-fast-install'
/gnu/store/nx4zd42igyb7ghmv4mxv6ncg8wr7ypa1-bash-4.3.33/bin/bash: /bin/sh: No such file or directory

This appears to correspond to the following line in builds/unix/detekt.mk:
cd builds/unix; $(CONFIG_SHELL) ./configure $(value CFG)
where CONFIG_SHELL is set above as
      CONFIG_SHELL ?= /bin/sh

Setting the environment variable CONFIG_SHELL in addition to passing it as a configure flag solves the problem.


Andreas Enge <enge>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #34632:  freetype-config-shell.patch added by enge (830B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by enge (Posted a comment)
  • -email is unavailable- added by breitenlohner (Posted a comment)
  • -email is unavailable- added by wl
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by enge

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-08-14 wl StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 2.6.1
    2015-08-14 wl Carbon-Copy- => Added peter breitenlohner
    2015-08-14 wl Carbon-CopyRemoved 84843 => -
    2015-08-12 enge Attached File- => Added freetype-config-shell.patch, #34632
    2015-06-06 wl Planned Release2.6.0 => None
    2015-03-04 wl StatusFixed => Confirmed
        Open/ClosedClosed => Open
    2015-02-16 wl StatusNone => Fixed
        Assigned toNone => wl
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 2.6.0
    2015-02-15 enge Carbon-Copy- => Added enge

    Back to the top

    Powered by Savane 3.9