ifhp error with make

  • Mat

    Mat - 2011-04-18

    Hi all,

    I installed LPRng, then to install ifhp I run:      $  sh STANDARD_configure

    then I run:  $ make clean all

    and had this error:

    cc1: warnings being treated as errors
    plp_snprintf.c: In function 'fmtquad':
    plp_snprintf.c:926:10: error: the address of 'convert' will always evaluate as 'true'
    plp_snprintf.c: In function 'fmtdouble':
    plp_snprintf.c:984:22: error: the address of 'formatstr' will always evaluate as 'true'
    plp_snprintf.c:987:22: error: the address of 'formatstr' will always evaluate as 'true'
    plp_snprintf.c:990:21: error: the address of 'formatstr' will always evaluate as 'true'
    make: ***  Error 1
    make: Leaving directory `/home/me/lprng_installer/ifhp-3.5.20/src'
    make: ***  Error 2

    Note: system is Arch Linux i686  kernel 

    Hope to find some idea.


  • Patrick Powell

    Patrick Powell - 2011-04-19

        char convert;
        place = strlen(convert);

        size_t strlen(const char *s);

    Patrick Powell papowel at astart dot com

    It appears that 'strlen()' is not the STD-C strlen?

  • Mat

    Mat - 2011-04-19

    Hi Patrick,

    I don't understand. You mean that the compiler has a problem?


  • Patrick Powell

    Patrick Powell - 2011-04-19

    I think the compiler is just fine,  but there is something in one of the
    include files that is redefining 'strlen'.

    If you want,  call me at my office 858-874-6543 and I will have you go through some

  • Bernhard R. Link

    What you see is something which we also had in LPRng: there are some macros (like strstrlen) that cause newer compiler to generate warnings, and the -Werror makes them to errors.

    Try to edit src/Makefile and remove the -Werror from the CFLAGS= line, then those should only be warnings and you are able to compile. (or call configure with an explicit CFLAGS parameter like ./configure CFLAGS="-Wall -O2 -g"

    You can also try to fix those issues if you prefer, those 4 issues should be solved by just replacing safestrlen with strlen.
    (safestrlen checks for NULL first, but as those arguments are static buffers they cannot be NULL, so gcc warns). But I guess you will run over other issues in other files.

  • Mat

    Mat - 2011-04-20

    Hi all,

    I will surely verify Makefile and other include files, and post the result. Thanks Patrick and Brl. bye Mat

  • Patrick Powell

    Patrick Powell - 2011-04-20

    Oh, yes, safeSTRxxxx…  This was done when a whole slew of libraries started to return
    Null (char *)0 values…  And boy was I ever glad I did this.  Now we have the situation
    where we have a compiler level test always failing.    I suggest you simply change the
    safestrlen to strlen at the places where the compiler is failing.  I do NOT suggest you turn
    -Wall off.

    I have done this in other places where this problem has occurred and feel that this is the
    correct/safe way to do this.

    Patrick ("What do you mean it's not a bug,  its a bloody stupid mistake?")  Powell

  • Mat

    Mat - 2011-05-10

    I give up.  I need to understand more things before. Thanks again , anyway. 
    Maybe in next future.
    Regards, Mat.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks