Loading ...
Sorry, an error occurred while loading the content.

Re: Gnuplot made to work with FreeType font for SlugOS 4.8.

Expand Messages
  • Brian
    Hi Rudolf, Thanks for the detailed report. I ve fixed optware libgd cross build, now gnuplot should use correctly use libgd and its dependencies. I ve also
    Message 1 of 6 , Mar 7, 2010
    • 0 Attachment
      Hi Rudolf,

      Thanks for the detailed report.

      I've fixed optware libgd cross build, now gnuplot should use correctly use libgd and its dependencies. I've also upgraded gnuplot to the latest in the process.

      http://trac.nslu2-linux.org/optware/changeset/11433
      http://trac.nslu2-linux.org/optware/changeset/11434

      Cheers,

      -Brian

      --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@...> wrote:
      >
      > In order to create a diagram as PNG file together with a nice looking FreeType font (bitstream Vera), you have to install the following packages with ipkg:
      > 1. gnuplot (ipkg-opt: gnuplot)
      > 2. ipkg-opt: libgd
      > 3. libfreetype6 (ipkg-opt: freetype)
      > 4. libfontconfig1 (ipkg-opt: fontconfig)
      > 5. libexpat1 (ipkg-opt: expat)
      > 6. libpng12-0 (ipkg-opt: libpng)
      > 7. ipkg-opt: ttf-bitstream-vera
      >
      > Unfortunately in a new build from optware "gnuplot" the Freetype, PNG and JPG support was canceled, but you can use gnuplot from the ipkg packages which still include that. That also means you have to use all libraries from /usr/lib, but there "libgd" ist missing, so you have to symlink it from /opt/lib. It took me several days to figure that out.
      >
      > At the end of the adventure you are using "gnuplot" from ipkg and "libgd" from ipkg-opt.
      > A more detailed explanation can be found at:
      > http://rudiswiki.homelinux.org:8080/rudiswiki8/HeizungSoftware
      >
      > In order to make it straight forward, it would be nice to include in the optware "gnuplot" the Freetype, PNG and JPG support, as it is in the ipkg "gnuplot" package. That is maybe something for Brian ;-)
      >
      > Best regards,
      > Rudolf
      >
      > p.s. I also made it in SlugOS 5.3, but a menory leak somewhere prevents me from using it.
      >
    • reuter.rudolf
      Hello Brian, Thank you very much for the quick help. It works now as it should. When I look to your changesets, Hmm very cryptic. Fascinating. When I think how
      Message 2 of 6 , Mar 8, 2010
      • 0 Attachment
        Hello Brian,

        Thank you very much for the quick help. It works now as it should.
        When I look to your changesets, Hmm very cryptic. Fascinating.
        When I think how long I worked to figure out what was wrong, it is amazing to see how quick you fixed it, congratulation to that know how.

        The only thing for me to do, was to rename /usr/bin/gnuplot because it came first in the PATH list.

        Best regards,
        Rudolf

        --- In nslu2-linux@yahoogroups.com, "Brian" <b88zhou@...> wrote:
        >
        > Hi Rudolf,
        >
        > Thanks for the detailed report.
        >
        > I've fixed optware libgd cross build, now gnuplot should use correctly use libgd and its dependencies. I've also upgraded gnuplot to the latest in the process.
        >
        > http://trac.nslu2-linux.org/optware/changeset/11433
        > http://trac.nslu2-linux.org/optware/changeset/11434
        >
        > Cheers,
        >
        > -Brian
        >
        > --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@> wrote:
        > >
        > > In order to create a diagram as PNG file together with a nice looking FreeType font (bitstream Vera), you have to install the following packages with ipkg:
        > > 1. gnuplot (ipkg-opt: gnuplot)
        > > 2. ipkg-opt: libgd
        > > 3. libfreetype6 (ipkg-opt: freetype)
        > > 4. libfontconfig1 (ipkg-opt: fontconfig)
        > > 5. libexpat1 (ipkg-opt: expat)
        > > 6. libpng12-0 (ipkg-opt: libpng)
        > > 7. ipkg-opt: ttf-bitstream-vera
        > >
        > > Unfortunately in a new build from optware "gnuplot" the Freetype, PNG and JPG support was canceled, but you can use gnuplot from the ipkg packages which still include that. That also means you have to use all libraries from /usr/lib, but there "libgd" ist missing, so you have to symlink it from /opt/lib. It took me several days to figure that out.
        > >
        > > At the end of the adventure you are using "gnuplot" from ipkg and "libgd" from ipkg-opt.
        > > A more detailed explanation can be found at:
        > > http://rudiswiki.homelinux.org:8080/rudiswiki8/HeizungSoftware
        > >
        > > In order to make it straight forward, it would be nice to include in the optware "gnuplot" the Freetype, PNG and JPG support, as it is in the ipkg "gnuplot" package. That is maybe something for Brian ;-)
        > >
        > > Best regards,
        > > Rudolf
        > >
        > > p.s. I also made it in SlugOS 5.3, but a menory leak somewhere prevents me from using it.
        > >
        >
      • Brian
        Rudolf, Here is a brief explanation: 1) libgd installs a $prefix/bin/gdlib-config script. Installed from ipk on device, this will be /opt/bin/gdlib-config;
        Message 3 of 6 , Mar 8, 2010
        • 0 Attachment
          Rudolf,

          Here is a brief explanation:

          1) libgd installs a $prefix/bin/gdlib-config script. Installed from ipk on device, this will be /opt/bin/gdlib-config; installed in the optware cross build environment for other package to use at build time, it is staging/opt/bin/gdlib-config;

          2) gnuplot relies on running this script to get libdir and includedir, to compile and link with dependent libs (jpeg, png, etc)

          3) staging/opt/bin/gdlib-config, if not modified, will internally have /opt as prefix, and thus result -I/opt/include in cppflag, and -L/opt/lib in ldflag

          4) openembedded generated cross toolchain will refuse to compile if -I/opt/include is in cppflag, which is a good practice to prevent mixup of native header files with cross header files.

          5) during gnuplot configure phase, cross compiler would fail if gdlib-config gives -I/opt/include, resulting gnuplot not recognizing and thus skipping gd and all dependencies.

          This happened only to openembedded toolchain, optware/slugos*.

          The fix is to simply modify staging/opt/bin/gdlib-config to use staging/opt (STAGING_PREFIX) as prefix, and force a rebuild of gnuplot.

          Hope this makes it clear.

          -Brian


          --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@...> wrote:
          >
          > Hello Brian,
          >
          > Thank you very much for the quick help. It works now as it should.
          > When I look to your changesets, Hmm very cryptic. Fascinating.
          > When I think how long I worked to figure out what was wrong, it is amazing to see how quick you fixed it, congratulation to that know how.
          >
          > The only thing for me to do, was to rename /usr/bin/gnuplot because it came first in the PATH list.
          >
          > Best regards,
          > Rudolf
          >
          > --- In nslu2-linux@yahoogroups.com, "Brian" <b88zhou@> wrote:
          > >
          > > Hi Rudolf,
          > >
          > > Thanks for the detailed report.
          > >
          > > I've fixed optware libgd cross build, now gnuplot should use correctly use libgd and its dependencies. I've also upgraded gnuplot to the latest in the process.
          > >
          > > http://trac.nslu2-linux.org/optware/changeset/11433
          > > http://trac.nslu2-linux.org/optware/changeset/11434
          > >
          > > Cheers,
          > >
          > > -Brian
          > >
          > > --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@> wrote:
          > > >
          > > > In order to create a diagram as PNG file together with a nice looking FreeType font (bitstream Vera), you have to install the following packages with ipkg:
          > > > 1. gnuplot (ipkg-opt: gnuplot)
          > > > 2. ipkg-opt: libgd
          > > > 3. libfreetype6 (ipkg-opt: freetype)
          > > > 4. libfontconfig1 (ipkg-opt: fontconfig)
          > > > 5. libexpat1 (ipkg-opt: expat)
          > > > 6. libpng12-0 (ipkg-opt: libpng)
          > > > 7. ipkg-opt: ttf-bitstream-vera
          > > >
          > > > Unfortunately in a new build from optware "gnuplot" the Freetype, PNG and JPG support was canceled, but you can use gnuplot from the ipkg packages which still include that. That also means you have to use all libraries from /usr/lib, but there "libgd" ist missing, so you have to symlink it from /opt/lib. It took me several days to figure that out.
          > > >
          > > > At the end of the adventure you are using "gnuplot" from ipkg and "libgd" from ipkg-opt.
          > > > A more detailed explanation can be found at:
          > > > http://rudiswiki.homelinux.org:8080/rudiswiki8/HeizungSoftware
          > > >
          > > > In order to make it straight forward, it would be nice to include in the optware "gnuplot" the Freetype, PNG and JPG support, as it is in the ipkg "gnuplot" package. That is maybe something for Brian ;-)
          > > >
          > > > Best regards,
          > > > Rudolf
          > > >
          > > > p.s. I also made it in SlugOS 5.3, but a menory leak somewhere prevents me from using it.
          > > >
          > >
          >
        • reuter.rudolf
          Hello Brian, That was an excellent analysis of the problem, and also a brilliant solution with sed. Thank you very much taking your time, to explain that for
          Message 4 of 6 , Mar 8, 2010
          • 0 Attachment
            Hello Brian,

            That was an excellent analysis of the problem, and also a brilliant solution with sed. Thank you very much taking your time, to explain that for me. Now I can understand why it fails.

            In file /opt/bin/gdlib-config the change must be:

            1. prefix=/opt -> prefix=staging/opt - understood

            2. in echo "ldflags: -L/opt/lib -L/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/slug/optware/slugosbe/staging/opt/lib -Wl,-rpath-link=/home/slug/optware/slugosbe/staging/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib"

            all occurrences of " -L/opt/lib" must be removed - But why?

            Why all occurrences of " -L/opt/lib" must be removed is not clear for me. If you have the time, please give me a brief explanation for that.

            Best regards,
            Rudolf

            --- In nslu2-linux@yahoogroups.com, "Brian" <b88zhou@...> wrote:
            >
            > Rudolf,
            >
            > Here is a brief explanation:
            >
            > 1) libgd installs a $prefix/bin/gdlib-config script. Installed from ipk on device, this will be /opt/bin/gdlib-config; installed in the optware cross build environment for other package to use at build time, it is staging/opt/bin/gdlib-config;
            >
            > 2) gnuplot relies on running this script to get libdir and includedir, to compile and link with dependent libs (jpeg, png, etc)
            >
            > 3) staging/opt/bin/gdlib-config, if not modified, will internally have /opt as prefix, and thus result -I/opt/include in cppflag, and -L/opt/lib in ldflag
            >
            > 4) openembedded generated cross toolchain will refuse to compile if -I/opt/include is in cppflag, which is a good practice to prevent mixup of native header files with cross header files.
            >
            > 5) during gnuplot configure phase, cross compiler would fail if gdlib-config gives -I/opt/include, resulting gnuplot not recognizing and thus skipping gd and all dependencies.
            >
            > This happened only to openembedded toolchain, optware/slugos*.
            >
            > The fix is to simply modify staging/opt/bin/gdlib-config to use staging/opt (STAGING_PREFIX) as prefix, and force a rebuild of gnuplot.
            >
            > Hope this makes it clear.
            >
            > -Brian
            >
            >
            > --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@> wrote:
            > >
            > > Hello Brian,
            > >
            > > Thank you very much for the quick help. It works now as it should.
            > > When I look to your changesets, Hmm very cryptic. Fascinating.
            > > When I think how long I worked to figure out what was wrong, it is amazing to see how quick you fixed it, congratulation to that know how.
            > >
            > > The only thing for me to do, was to rename /usr/bin/gnuplot because it came first in the PATH list.
            > >
            > > Best regards,
            > > Rudolf
            > >
            > > --- In nslu2-linux@yahoogroups.com, "Brian" <b88zhou@> wrote:
            > > >
            > > > Hi Rudolf,
            > > >
            > > > Thanks for the detailed report.
            > > >
            > > > I've fixed optware libgd cross build, now gnuplot should use correctly use libgd and its dependencies. I've also upgraded gnuplot to the latest in the process.
            > > >
            > > > http://trac.nslu2-linux.org/optware/changeset/11433
            > > > http://trac.nslu2-linux.org/optware/changeset/11434
            > > >
            > > > Cheers,
            > > >
            > > > -Brian
            > > >
            > > > --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@> wrote:
            > > > >
            > > > > In order to create a diagram as PNG file together with a nice looking FreeType font (bitstream Vera), you have to install the following packages with ipkg:
            > > > > 1. gnuplot (ipkg-opt: gnuplot)
            > > > > 2. ipkg-opt: libgd
            > > > > 3. libfreetype6 (ipkg-opt: freetype)
            > > > > 4. libfontconfig1 (ipkg-opt: fontconfig)
            > > > > 5. libexpat1 (ipkg-opt: expat)
            > > > > 6. libpng12-0 (ipkg-opt: libpng)
            > > > > 7. ipkg-opt: ttf-bitstream-vera
            > > > >
            > > > > Unfortunately in a new build from optware "gnuplot" the Freetype, PNG and JPG support was canceled, but you can use gnuplot from the ipkg packages which still include that. That also means you have to use all libraries from /usr/lib, but there "libgd" ist missing, so you have to symlink it from /opt/lib. It took me several days to figure that out.
            > > > >
            > > > > At the end of the adventure you are using "gnuplot" from ipkg and "libgd" from ipkg-opt.
            > > > > A more detailed explanation can be found at:
            > > > > http://rudiswiki.homelinux.org:8080/rudiswiki8/HeizungSoftware
            > > > >
            > > > > In order to make it straight forward, it would be nice to include in the optware "gnuplot" the Freetype, PNG and JPG support, as it is in the ipkg "gnuplot" package. That is maybe something for Brian ;-)
            > > > >
            > > > > Best regards,
            > > > > Rudolf
            > > > >
            > > > > p.s. I also made it in SlugOS 5.3, but a menory leak somewhere prevents me from using it.
            > > > >
            > > >
            > >
            >
          • Brian
            ... It s for the same reason we removed -I/opt/include. Let s take one extreme convoluted example, say I m using a super-fast slug as build host to cross build
            Message 5 of 6 , Mar 8, 2010
            • 0 Attachment
              --- In nslu2-linux@yahoogroups.com, "reuter.rudolf" <reuterru@...> wrote:
              >
              >
              >
              > 2. in echo "ldflags: -L/opt/lib -L/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib -Wl,-rpath,/opt/lib -Wl,-rpath-link,/home/slug/optware/slugosbe/staging/opt/lib -Wl,-rpath-link=/home/slug/optware/slugosbe/staging/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib -L/home/slug/optware/slugosbe/staging/opt/lib"
              >
              > all occurrences of " -L/opt/lib" must be removed - But why?
              >
              > Why all occurrences of " -L/opt/lib" must be removed is not clear for me. If you have the time, please give me a brief explanation for that.
              >

              It's for the same reason we removed -I/opt/include.

              Let's take one extreme convoluted example, say I'm using a super-fast slug as build host to cross build for a very slow x86 target:

              What would be in /opt/include and /opt/lib? Totally depends on which ipk version of libjpeg[-dev], libpng[-dev] happen to be installed on the build host;
              What would be in staging/opt/include and staging/opt/lib? As long as we manage the build .mk files correctly, it should use the exact version we have in .mk files. It's much more predictable and requires less dependencies of the build host.

              If you have linux host with prefix set to /usr (most distros do that), it might work fine since we probably don't have anything in /opt. But what if we do? I won't have any problem if cross toolchain starts to bomb on -L/opt/lib either.

              Best regards,

              -Brian
            Your message has been successfully submitted and would be delivered to recipients shortly.