<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    For the moment I'm using the default Makefile of libpd (version
    tagged 0.11.0), which makes use of the -DHAVE_LIBDL flag.<br>
    It can't find the HAVE_LIBPD definition anywhere, though ... is this
    normal ?<br>
    Sorry for my lack of knowledge of autotools, makefile, etc, but
    should I add `HAVE_LIBPD =` at the beginning of the Makefile ? (e.g.
    after `LIBPD_IMPLIB =` and `LIBPD_DEF =` lines ?)<br>
    Or should it be added to the cflags with -DHAVE_LIBPD ?<br>
    <br>
    I added both and the addon builds fine (I got rid of the char *
    related errors by adding the -fpermissive flag), but I still get
    stuck when trying to run the js automated tests :<br>
    they fail with an `undefined symbol` error, the undefined symbol
    being `canvas_undo_undo`.<br>
    Sounds familiar to anybody ?<br>
    I have no idea how to solve this ...<br>
    <br>
    Thanks,<br>
    Joseph<br>
    <br>
    <div class="moz-cite-prefix">Le 14/02/19 à 14:32, Dan Wilcox a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEf=z08_ZxTNVVrzwV7z-+BFwy0=gMs3ZeaFjnA2Ab8zEziCUg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">If you're building libpd via a custom Makefile, see
        the flags used in the libpd Makefile. Also, if you're using the
        libpd Makefile, double-check that HAVE_LIBPD is being defined.</div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Thu, Feb 14, 2019 at 2:30
          PM Joseph Larralde <<a
            href="mailto:joseph.larralde@gmail.com"
            moz-do-not-send="true">joseph.larralde@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF"> Thank you Dan for your explanation.<br>
            And thanks everyone for helping.<br>
            <br>
            Yesterday I tried to recompile the node addon to use it
            locally but got into other trouble.<br>
            I first recompiled libpd with MULTI=false after Christof's
            suggestion (to enable the PDINSTANCE flag) but node-gyp was
            the first wall I was still hitting.<br>
            It seems there are still some slight updates I need to do in
            the addon's code (I got some char * vs const char * error).<br>
            Your 3rd point makes obvious sense and I'll try this in the
            first place today.<br>
            <br>
            Joseph<br>
            <br>
            <div class="gmail-m_3399932457901766906moz-cite-prefix">Le
              14/02/19 à 13:07, Dan Wilcox a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">
                    <div>A few things:</div>
                    <div><br>
                    </div>
                    <div>1. libpd does not use any paths, settings,
                      audio/midi backends, etc from desktop pd. It is
                      only the core and less than "pd without the gui."
                      This is by design as it makes no assumptions about
                      the environment since it can be running in all
                      manner of places. This means it will only search
                      paths relative to an opened patch and those added
                      explicitly by llibpd_add_to_search_path().</div>
                    <div dir="ltr"><br>
                    </div>
                    <div>2. Loading an external, whether it was compiled
                      against 0.47 or 0.49 should work as, largely, the
                      pd API has not changed that much.</div>
                    <div><br>
                    </div>
                    <div>3. libpd needs to be built with -DHAVE_LIBDL in
                      order to be able to load separate, precompiled
                      externals.</div>
                    <div><br>
                    </div>
                    <div>4. Some environments do *not* allow loading
                      dynamic libraries for legal/security reasons, ie.
                      iOS. I don't this is the problem, but it's good to
                      know...</div>
                    <div><br>
                    </div>
                    <div>I image you're issue is more to do with 3.</div>
                    <div><br>
                    </div>
                    <div class="gmail_quote">
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Message:
                        1<br>
                        Date: Wed, 13 Feb 2019 15:04:19 +0100<br>
                        From: Joseph Larralde <<a
                          href="mailto:joseph.larralde@gmail.com"
                          target="_blank" moz-do-not-send="true">joseph.larralde@gmail.com</a>><br>
                        To: Giulio Moro <<a
                          href="mailto:giuliomoro@yahoo.it"
                          target="_blank" moz-do-not-send="true">giuliomoro@yahoo.it</a>>,
                        Lucas Cordiviola<br>
                                <<a
                          href="mailto:lucarda27@hotmail.com"
                          target="_blank" moz-do-not-send="true">lucarda27@hotmail.com</a>>,
                        pd-dev <<a href="mailto:pd-dev@lists.iem.at"
                          target="_blank" moz-do-not-send="true">pd-dev@lists.iem.at</a>><br>
                        Subject: Re: [PD-dev] libpd search paths<br>
                        Message-ID: <<a
                          href="mailto:2354c1c4-e6db-9143-1402-76dcd37b43a8@gmail.com"
                          target="_blank" moz-do-not-send="true">2354c1c4-e6db-9143-1402-76dcd37b43a8@gmail.com</a>><br>
                        Content-Type: text/plain; charset="utf-8";
                        Format="flowed"<br>
                        <br>
                        Mmmh you might have found the clue ...<br>
                        Actually I built the externals against pd
                        version 0.49-0 and it makes <br>
                        sense that they load properly with the same
                        version.<br>
                        node-libpd comes with an arm libpd binary which
                        seems to come from an <br>
                        older version of pd (added 1 year ago).<br>
                        I can already tell that it's not an architecture
                        issue because <br>
                        everything is working on my pi : the addon is
                        loading and running <br>
                        abstractions when used in a node program, and pd
                        is loading and running <br>
                        my externals.<br>
                        Only loading my externals from node-libpd
                        doesn't work.<br>
                        Still trying to get a local version of
                        node-libpd to work ... then I'll <br>
                        replace the libpd.so with one that I'll build
                        from the latest version.<br>
                        I can't see another explanation.<br>
                        Do you know something about incompatibilities
                        between different versions <br>
                        of pd ?<br>
                        The libpd.so used by the addon is probably not
                        older than 0.47<br>
                      </blockquote>
                    </div>
                    <br clear="all">
                    <div><br>
                    </div>
                    -- <br>
                    <div dir="ltr"
                      class="gmail-m_3399932457901766906gmail_signature">
                      <div dir="ltr">
                        <div>Dan Wilcox</div>
                        <div>@danomatika<br>
                          <a href="http://danomatika.com"
                            target="_blank" moz-do-not-send="true">danomatika.com</a><br>
                          <a href="http://robotcowboy.com"
                            target="_blank" moz-do-not-send="true">robotcowboy.com</a></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <br>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>Dan Wilcox</div>
          <div>@danomatika<br>
            <a href="http://danomatika.com" target="_blank"
              moz-do-not-send="true">danomatika.com</a><br>
            <a href="http://robotcowboy.com" target="_blank"
              moz-do-not-send="true">robotcowboy.com</a></div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>