patchgperf - Patches: patch #9418, Fix for gperf 3.1 not compiling...

 
 

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

patch #9418: Fix for gperf 3.1 not compiling because of include search order in Makefile.in

Submitter:  Espen Jürgensen <ejurgensen>
Submitted:  Tue 25 Jul 2017 03:31:07 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Wont Do Privacy:  Public
Assigned to:  haible Open/Closed:  Closed

Sun 19 Nov 2017 06:35:36 PM UTC, comment #3: 


> I didn't give configure anything, OpenWrt/LEDE's build system did.


From the point of gperf, that's the same thing.

Apparently OpenWrt/LEDE's build system adds some -I options to the CPPFLAGS. They should use other ways to specify these directories; either - if they provide a custom GCC - in the GCC configuration, or through some of the available GCC options https://gcc.gnu.org/onlinedocs/gcc-5.4.0/gcc/Preprocessor-Options.html , notably -I- or -idirafter.

Note that the gperf source uses #include "getline.h", not #include &lt;getline.h&gt;.

Bruno Haible <haible>
Group administrator
Sun 19 Nov 2017 06:16:48 PM UTC, comment #2: 

I didn't give configure anything, OpenWrt/LEDE's build system did.

I don't understand your reason for rejecting this, gperf clearly needs its own getline.h, and letting the user include anything else will just be a source of errors. It even says in gperf's getline.h that: "Like the glibc functions get_line and get_delim, except that the result must be freed using delete[], not free()." - so using other functions seems like it would be a bad idea.

If you have a suggestion on how to fix the build problem on OpenWrt/LEDE other than with this patch I'm all ears.

Espen Jürgensen <ejurgensen>
Sun 19 Nov 2017 04:22:35 PM UTC, comment #1: 

My reading of your proposed patch is:
You gave to 'configure' a CPPFLAGS value that contains a -I option that references a directory with a getline.h that does not fit gperf's needs.
Then the build it failed.
And you suggest that gperf's build system be changed to prefer its own choices over your choices.

Won't do. In many places in the build system we let the user override defaults through environment variables. The philosophy is: THE USER IS ALWAYS RIGHT. In so many places, a build system is not perfectly adapted to the user's needs, and it is MUCH more convenient for the user to set an environment variable than to modify 5 Makefiles.

Bruno Haible <haible>
Group administrator
Tue 25 Jul 2017 03:31:07 PM UTC, original submission:  

I couldn't compile gperf 3.1 on OpenWrt, and it turned out that it was because the wrong getline.h was being included (not the one shipped with gperf).

Attached is a suggested fix by switching the include search order.

See https://github.com/openwrt/packages/commit/b5af9e0ab2259fc83cc6615158b6a14eda3a524f

Espen Jürgensen <ejurgensen>

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by ejurgensen (Submitted the item)
  •  

    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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-19 haible StatusNone Wont Do
        Assigned toNone haible
        Open/ClosedOpen Closed
    2017-07-25 ejurgensen Attached File- Added 100-include_own_first.patch, #41333

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code