NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding an ARM compatible package for install or compile directly on target?

Solved!
Go to solution

I had successfully loaded Gnuplot on a 9033 which has a 64 bit architecture. The gnuplot package was included in the opkg update from NI. However I now have a 9066 which is an ARM and Gnuplot is not listed in the feed. I forced the feed  to the x64 and of course it won't load becuase it is not comptaible with the ARM architecture.

Can anyone suggest a feed that has gnuplot.ipk for ARM or help me work through loading an uncompiled gnuplot tarball to the 9066 and then compiling there. I have done a quick search on the internet and it seems possible to compile gnuplot on an ARM device.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 1 of 9
(5,696 Views)

I am trying to compile using gcc and I get an error that says my compiler can't create executables...

Taken frm the config.log in the gnuplot folder...

./configure: line 3347: /usr/lib/gcc: Is a directory

configure:3349: $? = 126

configure:3386: result:

configure: failed program was:

| /* confdefs.h */

| #define PACKAGE_NAME "gnuplot"

| #define PACKAGE_TARNAME "gnuplot"

| #define PACKAGE_VERSION "4.4.1"

| #define PACKAGE_STRING "gnuplot 4.4.1"

| #define PACKAGE_BUGREPORT ""

| #define PACKAGE_URL ""

| #define PACKAGE "gnuplot"

| #define VERSION "4.4.1"

| /* end confdefs.h.  */

| #include <stdio.h>

| int

| main ()

| {

| FILE *f = fopen ("conftest.out", "w");

|  return ferror (f) || fclose (f) != 0;

|

|   ;

|   return 0;

| }

configure:3392: error: in `/home/lvuser/gnuplot-4.4.1':

configure:3396: error: C compiler cannot create executables

See `config.log' for more details.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 2 of 9
(4,607 Views)

I think there's a key in this output:

doug@southerndaqsolutions.com wrote:

...

./configure: line 3347: /usr/lib/gcc: Is a directory

...

Check the actual configure script, line 3347. It seems like the script is trying to use the directory as an executable?

How did you install the tools to attempt to build gnuplot?

0 Kudos
Message 3 of 9
(4,607 Views)
Solution
Accepted by topic author DougFerguson

Well, I am VERY new to this all so at first I tired:

opkg install gcc

that didn't work. I then tried

opkg install gnupg

that didnt work. I found another NI forum post https://decibel.ni.com/content/thread/20236?start=15&tstart=0 and someone in there pointed out that gcc, etc. wouldn't have all the dependencies, and suggested

opkg update

opkg install packagegroup-core-buildessential

After doing this I downloaded the gnuplot source files and extracted to the main folder and then was able to use

./configure

make

make install

Much to my delight IT WORKED!!!!! I now now have a compiled version of gnuplot for my armv7-A architecture!

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 4 of 9
(4,607 Views)

Now, the next thing to do is to compile this off the target and then just move gnuplot to the target so I don't eat of memory with the compiler and any overhead it my bring with it.

Any suggestions? I am running a virtual machine with Fedora 23 on it.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 5 of 9
(4,607 Views)

With this next step, there are realistically two venues to take: using the tools that can cross-compile for the target or use the same build infrastructure that NI uses for building the images and package feeds themselves.

The latter is a bit more complex but it closer to what is done internally, mostly useful if you want to make a wide-spread change to the actual base image. This is probably more than you wanted to tackle, but if you wanted to try this out you will need your VM since it's Linux-only. There are instructions that acccompany the version of the OS image that you are working with, use git to clone that repository down and checkout the branch that matches what you are using for the correct instructions.

The other, which is a bit more one-off, would be to take the packaged tools that NI provides for cross-compiling for the targets and using either a project building system/IDE (e.g. Eclipse) or creating a cross-compilation project in a text-based alternative (e.g. CMake).

The tools can be downloaded here (note that 2014 is the most recent version of the tools):

Windows (ARM and x64 w/ Eclipse): http://www.ni.com/download/labview-real-time-module-2014/4846/en/

Linux (ARM and x64 w/o Eclipse): http://www.ni.com/download/labview-real-time-module-2014/4957/en/

Getting started guide (Windows-centric): http://www.ni.com/tutorial/14625/en/

There's a good chance that you'll have some questions, be sure to ask them on the forums as I'm sure others have the same questions (or have already solved that issue).

Message 6 of 9
(4,607 Views)

Wow, Eclipse makes my head hurt.

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 7 of 9
(4,607 Views)

doug@southerndaqsolutions.com wrote:

Wow, Eclipse makes my head hurt.

As bad as it is, it's usually easier to fix an issue with the build in Eclipse than it is to fix the issue in OpenEmbedded. Of couse, this statement is tantamount to saying that Moe was the smartest of the Three Stooges.

0 Kudos
Message 8 of 9
(4,607 Views)

Eventhough I was able to get gnuplot to compile directly on the target, I found that it was missing some libraries required to use the PNG terminal. After some digging around on the internet I found that I needed 'libgd' which is a support library for graphics drivers. Before I could use libgd properly I needed to compile another library called 'libpng', which went smoothly using "./configure", "make", "make install".

However when I went to compile the 'lingd' I noticed that the PNG library wasn't loading properly. To finally get it working properly I had to force the libpng location.

admin@NI-cRIO-9066-030c6c27:/home/lvuser# cd /home/lvuser/libgd-2.1.1

admin@NI-cRIO-9066-030c6c27:/home/lvuser/libgd-2.1.1# ./configure

** Configuration summary for libgd 2.1.1:

   Support for Zlib:                 yes

   Support for PNG library:          no

   Support for JPEG library:         no

admin@NI-cRIO-9066-030c6c27:/home/lvuser/libgd-2.1.1# find / -name libpng

/home/lvuser/libpng-1.6.21/projects/vstudio/libpng

admin@NI-cRIO-9066-030c6c27:/home/lvuser/libgd-2.1.1# ./configure --with-png=/usr/local/

** Configuration summary for libgd 2.1.1:

   Support for Zlib:                 yes

  Support for PNG library:          yes

   Support for JPEG library:         no

   Support for VPX library:          no

   Support for TIFF library:         no

   Support for Freetype 2.x library: no

   Support for Fontconfig library:   no

   Support for Xpm library:          no

   Support for pthreads:             yes

admin@NI-cRIO-9066-030c6c27:/home/lvuser/libgd-2.1.1# make

admin@NI-cRIO-9066-030c6c27:/home/lvuser/libgd-2.1.1# make install

After success compile of 'libgd' it was time to recompile 'gnuplot'

admin@NI-cRIO-9066-030c6c27:/home/lvuser# cd /home/lvuser/gnuplot-4.4.1

admin@NI-cRIO-9066-030c6c27:/home/lvuser/gnuplot-4.4.1# ./configure

** Configuration summary for gnuplot 4.4.1:

gnuplot will be compiled with the following terminals:

  Standalone terminals: yes (always builtin)

    (canvas, cgm, corel, dumb, dxf, eepic, emf, emtex,

    epslatex, epson_180dpi, epson_60dpi, epson_lx800, fig, gpic, hp2623A,

    hp2648, hp500c, hpdj, hpgl, hpljii, hppj, imagen,

    latex, metafont, metapost, mif, pbm, postscript, pslatex, nec_cp6, okidata,

    pcl5, pstex, pstricks, qms, regis, svg, tandy_60dpi,

    tek40xx, tek410x, texdraw, tgif, tkcanvas, tpic, vttek)

  X Window System terminal: no (requires X libraries)

  jpeg terminal: no (requires libgd with jpeg support)

  gif terminal: yes (with animated gif)

  png terminal: yes

    (jpeg, gif and png terminals cannot use TTF fonts, requires libgd support)

admin@NI-cRIO-9066-030c6c27:/home/lvuser/gnuplot-4.4.1# make

admin@NI-cRIO-9066-030c6c27:/home/lvuser/gnuplot-4.4.1# make install

admin@NI-cRIO-9066-030c6c27:/# gnuplot

        G N U P L O T

        Version 4.4 patchlevel 1

        last modified Fri Sep 10 12:10:34 PDT 2010

        System: Linux 3.2.35-rt52-2.0.0f0

        Copyright (C) 1986-1993, 1998, 2004, 2007-2010

        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info

        faq, bugs, etc:   type "help seeking-assistance"

        immediate help:   type "help"

        plot window:      hit 'h'

Terminal type set to 'unknown'

gnuplot> set terminal

Available terminal types:

           canvas  HTML Canvas object

              cgm  Computer Graphics Metafile

            corel  EPS format for CorelDRAW

           dpu414  Seiko DPU-414 thermal printer [small medium large]

             dumb  ascii art for anything that prints text

              dxf  dxf-file for AutoCad (default size 120x80)

            eepic  EEPIC -- extended LaTeX picture environment

              emf  Enhanced Metafile format

            emtex  LaTeX picture environment with emTeX specials

         epslatex  LaTeX picture environment using graphicx package

     epson_180dpi  Epson LQ-style 180-dot per inch (24 pin) printers

      epson_60dpi  Epson-style 60-dot per inch printers

      epson_lx800  Epson LX-800, Star NL-10, NX-1000, PROPRINTER ...

              fig  FIG graphics language for XFIG graphics editor

              gif  GIF images using libgd and TrueType fonts

             gpic  GPIC -- Produce graphs in groff using the gpic preprocessor

          hp2623A  HP2623A and maybe others

           hp2648  HP2648 and HP2647

           hp500c  HP DeskJet 500c, [75 100 150 300] [rle tiff]

             hpdj  HP DeskJet 500, [75 100 150 300]

             hpgl  HP7475 and relatives [number of pens] [eject]

           hpljii  HP Laserjet series II, [75 100 150 300]

             hppj  HP PaintJet and HP3630 [FNT5X9 FNT9X17 FNT13X25]

           imagen  Imagen laser printer

            latex  LaTeX picture environment

               mf  Metafont plotting standard

              mif  Frame maker MIF 3.00 format

               mp  MetaPost plotting standard

          nec_cp6  NEC printer CP6, Epson LQ-800 [monocrome color draft]

          okidata  OKIDATA 320/321 Standard

              pbm  Portable bitmap [small medium large] [monochrome gray color]

             pcl5  HP Designjet 750C, HP Laserjet III/IV, etc. (many options)

             png  PNG images using libgd and TrueType fonts

       postscript  PostScript graphics, including EPSF embedded files (*.eps)

          pslatex  LaTeX picture environment with PostScript \specials

            pstex  plain TeX with PostScript \specials

         pstricks  LaTeX picture environment with PSTricks macros

              qms  QMS/QUIC Laser printer (also Talaris 1200 and others)

            regis  REGIS graphics language

            starc  Star Color Printer

              svg  W3C Scalable Vector Graphics driver

      tandy_60dpi  Tandy DMP-130 series 60-dot per inch graphics

          tek40xx  Tektronix 4010 and others; most TEK emulators

          tek410x  Tektronix 4106, 4107, 4109 and 420X terminals

Press return for more:

          texdraw  LaTeX texdraw environment

             tgif  TGIF X11 [mode] [x,y] [dashed] ["font" [fontsize]]

         tkcanvas  Tk/Tcl canvas widget [perltk] [interactive]

             tpic  TPIC -- LaTeX picture environment with tpic \specials

          unknown  Unknown terminal type - not a plotting device

            vttek  VT-like tek40xx terminal emulator

            xterm  Xterm Tektronix 4014 Mode

gnuplot>

Doug Ferguson

www.southerndaqsolutions.com
0 Kudos
Message 9 of 9
(4,607 Views)