Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2023 17:20:35 +0100
From:      Danilo Egea Gondolfo <danilo@FreeBSD.org>
To:        Nuno Teixeira <eduardo@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: graphics/xpaint updated to latest version
Message-ID:  <af5d05e8-5a22-57a5-0ae4-3cdd42347b0e@FreeBSD.org>
In-Reply-To: <CAFDf7U%2Btd3spdfHLayDUs_KAT8gKbdDedisC7tVYLwXnopW0OQ@mail.gmail.com>
References:  <CAFDf7U%2B%2B=-O1gY_HSbjQ9mxy%2BQWoDOD25aK4gCjEk6GgOX12cQ@mail.gmail.com> <fb6d9375-9601-e91d-ba64-a55835a9124d@FreeBSD.org> <CAFDf7UKhiUKksMRdst05yj8oCDRPawbLsBJqDUkvpxBREnTKag@mail.gmail.com> <88100d98-8d22-bb31-9181-dbbfb7c1a1f4@FreeBSD.org> <CAFDf7U%2Btd3spdfHLayDUs_KAT8gKbdDedisC7tVYLwXnopW0OQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------Ix3YBJbM8I0Z4J69AwcDlYKa
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

On 14/07/2023 13:40, Nuno Teixeira wrote:

> Oldest version used a patch:
> ###
> --- Makefile.in.orig    2021-08-14 14:31:15 UTC
> +++ Makefile.in
> @@ -1203,16 +1203,15 @@ messages.h: preproc
>  messages.h: preproc
>         ./preproc > messages.h
>
> -XPaint.ad: app-defaults
> -       $(CC) $(CFLAGS) substads.c -o substads
> -       cd app-defaults ; \
> +XPaint.ad: substads app-defaults
> +       (cd app-defaults ; \
>         ../substads -appdefs \
>                     XPAINT_VERSION $(PACKAGE_VERSION) \
>                     XPAINT_SHAREDIR $(SHAREDIR) \
>                     XPAINT_PRINT_COMMAND "$(PRINT_CMD)" \
>                     XPAINT_PRINTER_LIST "$(PRINTER_LIST)" \
>                     XPAINT_POSTSCRIPT_VIEWER "$(POSTSCRIPT_VIEWER)" \
> -                   XPAINT_EXTERN_VIEWER "$(EXTERN_VIEWER)"
> +                   XPAINT_EXTERN_VIEWER "$(EXTERN_VIEWER)")
>         cp -p app-defaults/out/XPaint XPaint.ad
>
>  XPaint.ad.h: substads XPaint.ad
> ###
>
> that I'm not using here.
> Maybe this is related? Could you test it?
>
> Thanks
>
> Danilo Egea Gondolfo <danilo@freebsd.org> escreveu no dia sexta, 
> 14/07/2023 à(s) 13:30:
>
>     On 14/07/2023 12:42, Nuno Teixeira wrote:
>
>>     Hello Danilo,
>>
>>     My tests don't show that under poudriere with ALLOW_MAKE_JOBS=yes
>>     on 2 parallel jobs.
>>
>>     Should we wait for build packagers to see its results?
>>
>>     Thanks,
>>
>>     Danilo Egea Gondolfo <danilo@freebsd.org> escreveu no dia sexta,
>>     14/07/2023 à(s) 12:27:
>>
>>         On 14/07/2023 11:12, Nuno Teixeira wrote:
>>
>>>         Hello all,
>>>
>>>         xpaint has been updated to lastest version.
>>>         Try out new features!
>>>
>>>         I'm working on this update for more than 1 year but only
>>>         yesterday I did have the courage and nerves to build *all*
>>>         releases until 3.1.4 as a way to understand the best way to
>>>         "hack" configures and Makefiles and stuff.
>>>
>>>         Please give it a try and tell me if anything needs to be
>>>         fixed, etc.
>>>
>>>         Cheers!
>>>
>>>         https://cgit.freebsd.org/ports/commit/?id=973a707c70478448af77004a07eab1f85c2f6757
>>>
>>>         -- 
>>>         Nuno Teixeira
>>>         FreeBSD Committer (ports)
>>
>>         Hi Eduardo,
>>
>>         xpaint seems to not be multi-jobs-safe. The build will
>>         eventually fail with this:
>>
>>         cd app-defaults ; \
>>         ../substads -appdefs \
>>                     XPAINT_VERSION 3.1.4 \
>>                     XPAINT_SHAREDIR /usr/local/share/xpaint \
>>                     XPAINT_PRINT_COMMAND "lp -d" \
>>                     XPAINT_PRINTER_LIST "lpstat -p | cut -d' ' -f 2" \
>>                     XPAINT_POSTSCRIPT_VIEWER "evince" \
>>                     XPAINT_EXTERN_VIEWER "display"
>>         /bin/sh: ../substads: Text file busy
>>         gmake[1]: *** [Makefile:1205: XPaint.ad] Error 126
>>         gmake[1]: *** Waiting for unfinished jobs....
>>         gmake[1]: Leaving directory
>>         '/usr/ports/graphics/xpaint/work/xpaint-3.1.4'
>>
>>         You might want to use MAKE_JOBS_UNSAFE=yes.
>>
>>
>>
>>
>>     -- 
>>     Nuno Teixeira
>>     FreeBSD Committer (ports)
>
>     That's because it's a race condition :)
>
>     See:
>
>     [danilo@capeta /usr/ports/graphics/xpaint]$ while : ; do make
>     clean >/dev/null ; make >/dev/null 2>&1 ; if [ $? -ne 0 ] ; then
>     echo 'Failed' ; else echo 'Worked' ; fi ; done
>     Worked
>     Worked
>     Failed
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Failed
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>     Failed
>     Failed
>     Worked
>     Worked
>     Worked
>     Worked
>     Worked
>
>
>
> -- 
> Nuno Teixeira
> FreeBSD Committer (ports)

Yeah apparently that addresses the problem. But as you are using 
USES=autoreconf, you need to patch Makefile.am actually.

This change seems to be enough:

-XPaint.ad: app-defaults
+XPaint.ad: substads app-defaults

--------------Ix3YBJbM8I0Z4J69AwcDlYKa
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>On 14/07/2023 13:40, Nuno Teixeira wrote:<br>
    </p>
    <blockquote type="cite"
cite="mid:CAFDf7U+td3spdfHLayDUs_KAT8gKbdDedisC7tVYLwXnopW0OQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Oldest version used a patch:</div>
        <div>###<br>
        </div>
        <div>--- Makefile.in.orig    2021-08-14 14:31:15 UTC<br>
          +++ Makefile.in<br>
          @@ -1203,16 +1203,15 @@ messages.h: preproc<br>
           messages.h: preproc<br>
                  ./preproc &gt; messages.h<br>
          <br>
          -XPaint.ad: app-defaults<br>
          -       $(CC) $(CFLAGS) substads.c -o substads<br>
          -       cd app-defaults ; \<br>
          +XPaint.ad: substads app-defaults<br>
          +       (cd app-defaults ; \<br>
                  ../substads -appdefs \<br>
                              XPAINT_VERSION $(PACKAGE_VERSION) \<br>
                              XPAINT_SHAREDIR $(SHAREDIR) \<br>
                              XPAINT_PRINT_COMMAND "$(PRINT_CMD)" \<br>
                              XPAINT_PRINTER_LIST "$(PRINTER_LIST)" \<br>
                              XPAINT_POSTSCRIPT_VIEWER
          "$(POSTSCRIPT_VIEWER)" \<br>
          -                   XPAINT_EXTERN_VIEWER "$(EXTERN_VIEWER)"<br>
          +                   XPAINT_EXTERN_VIEWER "$(EXTERN_VIEWER)")<br>
                  cp -p app-defaults/out/XPaint XPaint.ad<br>
          <br>
           XPaint.ad.h: substads XPaint.ad</div>
        <div>###</div>
        <div><br>
        </div>
        <div>that I'm not using here.</div>
        <div>Maybe this is related? Could you test it?<br>
        </div>
        <div><br>
        </div>
        <div>Thanks<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">Danilo Egea Gondolfo &lt;<a
            href="mailto:danilo@freebsd.org" moz-do-not-send="true"
            class="moz-txt-link-freetext">danilo@freebsd.org</a>&gt;
          escreveu no dia sexta, 14/07/2023 à(s) 13:30:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>On 14/07/2023 12:42, Nuno Teixeira wrote:<br>
            </p>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hello Danilo,</div>
                <div><br>
                </div>
                <div>My tests don't show that under poudriere with
                  ALLOW_MAKE_JOBS=yes on 2 parallel jobs.</div>
                <div><br>
                </div>
                <div>Should we wait for build packagers to see its
                  results?</div>
                <div><br>
                </div>
                <div>Thanks,</div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">Danilo Egea Gondolfo
                  &lt;<a href="mailto:danilo@freebsd.org"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">danilo@freebsd.org</a>&gt;
                  escreveu no dia sexta, 14/07/2023 à(s) 12:27:<br>
                </div>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px 0.8ex;border-left:1px solid
                  rgb(204,204,204);padding-left:1ex">
                  <div>
                    <p>On 14/07/2023 11:12, Nuno Teixeira wrote:<br>
                    </p>
                    <blockquote type="cite">
                      <div dir="ltr">
                        <div>Hello all,</div>
                        <div><br>
                        </div>
                        <div>xpaint has been updated to lastest version.</div>
                        <div>Try out new features!</div>
                        <div><br>
                        </div>
                        <div>I'm working on this update for more than 1
                          year but only yesterday I did have the courage
                          and nerves to build *all* releases until 3.1.4
                          as a way to understand the best way to "hack"
                          configures and Makefiles and stuff.</div>
                        <div><br>
                        </div>
                        <div>Please give it a try and tell me if
                          anything needs to be fixed, etc.</div>
                        <div><br>
                        </div>
                        <div>Cheers!</div>
                        <div><br>
                        </div>
                        <div><a
href="https://cgit.freebsd.org/ports/commit/?id=973a707c70478448af77004a07eab1f85c2f6757"
                            target="_blank" moz-do-not-send="true"
                            class="moz-txt-link-freetext">https://cgit.freebsd.org/ports/commit/?id=973a707c70478448af77004a07eab1f85c2f6757</a></div>;
                        <div><br>
                          <span class="gmail_signature_prefix">-- </span><br>
                          <div dir="ltr" class="gmail_signature">
                            <div dir="ltr"><span
                                style="color:rgb(102,102,102)">Nuno
                                Teixeira<br>
                                FreeBSD Committer (ports)</span></div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <p>Hi Eduardo,</p>
                    <p>xpaint seems to not be multi-jobs-safe. The build
                      will eventually fail with this:<br>
                    </p>
                    cd app-defaults ; \<br>
                    ../substads -appdefs \<br>
                                XPAINT_VERSION 3.1.4 \<br>
                                XPAINT_SHAREDIR /usr/local/share/xpaint
                    \<br>
                                XPAINT_PRINT_COMMAND "lp -d" \<br>
                                XPAINT_PRINTER_LIST "lpstat -p | cut -d'
                    ' -f 2" \<br>
                                XPAINT_POSTSCRIPT_VIEWER "evince" \<br>
                                XPAINT_EXTERN_VIEWER "display"<br>
                    /bin/sh: ../substads: Text file busy<br>
                    gmake[1]: *** [Makefile:1205: XPaint.ad] Error 126<br>
                    gmake[1]: *** Waiting for unfinished jobs....<br>
                    gmake[1]: Leaving directory
                    '/usr/ports/graphics/xpaint/work/xpaint-3.1.4'<br>
                    <p>You might want to use MAKE_JOBS_UNSAFE=yes.</p>
                    <p><br>
                    </p>
                  </div>
                </blockquote>
              </div>
              <br clear="all">
              <br>
              <span class="gmail_signature_prefix">-- </span><br>
              <div dir="ltr" class="gmail_signature">
                <div dir="ltr"><span style="color:rgb(102,102,102)">Nuno
                    Teixeira<br>
                    FreeBSD Committer (ports)</span></div>
              </div>
            </blockquote>
            <p>That's because it's a race condition :)</p>
            <p>See:</p>
            <p>[danilo@capeta /usr/ports/graphics/xpaint]$ while : ; do
              make clean &gt;/dev/null ; make &gt;/dev/null 2&gt;&amp;1
              ; if [ $? -ne 0 ] ; then echo 'Failed' ; else echo
              'Worked' ; fi ; done<br>
              Worked<br>
              Worked<br>
              Failed<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Failed<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Failed<br>
              Failed<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
              Worked<br>
            </p>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr"><span style="color:rgb(102,102,102)">Nuno
            Teixeira<br>
            FreeBSD Committer (ports)</span></div>
      </div>
    </blockquote>
    <p>Yeah apparently that addresses the problem. But as you are using
      USES=autoreconf, you need to patch Makefile.am actually.</p>
    <p>This change seems to be enough:</p>
    <p>-XPaint.ad: app-defaults<br>
      +XPaint.ad: substads app-defaults<br>
      <br>
    </p>
  </body>
</html>

--------------Ix3YBJbM8I0Z4J69AwcDlYKa--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?af5d05e8-5a22-57a5-0ae4-3cdd42347b0e>