Menu

#597 Gutenprint ipk package for OpenWRT (GL-iNet AR750) failed to compile

None
closed-rejected
nobody
None
5
2024-11-12
2021-09-21
Khurram
No

Hello,

I am trying to create an ipk package using gutenprint for OpenWRT. More specifically for use with the GL-iNet AR750. I am running Ubuntu 20.04 and have set up an OpenWRT build environment (using the instructions at https://openwrt.org/docs/guide-developer/helloworld/start)

Here is what I did to create the ipk package for gutenprint:
- Downloaded the gutenprint-5.3.3.tar.xz package and extracted it using file explorer (in the locationo /home/ubuntu20/gutenprint-5.3.3)
- Opened terminal in extracted folder and configured gutenprint using "./configure --enable-cups-ppds" and installed "libusb" (sudo apt-get install libusb-1.0-0-dev) to enable dyesub USB backend
- Then ran "make" and "sudo make install"

  • I created a Makefile (will attach in comment if possible) which is stored in the directory "/home/ubuntu20/mypackages/printing/gutenprint-5.3.3" and also installed (or save their respective Makefile's in "mypackages") some required dependencies (libcups2-dev, libpam, net-snmp and xz).
  • The SOURCE_DIR in the Makefile is /home/ubuntu20/gutenprint-5.3.3

  • in the OpenWRT build environment I ran "./scripts/feeds update mypackages" and "./scripts/feeds install -a -p mypackages" both of which run successfully (ending with the message "Installing all packages from feed mypackages"). Note I have created the feeds.conf file as indicated here (https://openwrt.org/docs/guide-developer/helloworld/chapter4) and specified mypackages feed.

  • I then run "make menuconfig" and able to find my device (Target system: "Atheros ATH79", Subtarget="Generic", Target Progile="GL-iNet GL-AR750"). I am also able to include the gutenprint package in the configuration (in printing > the highlight "gutenprint" and press "y") --> everything runs as expected up to this point

---- Here is where I'm running into problems :
- When I run "make package/gutenprint-5.3.3/compile -j1 V=s" (similar to the steps here https://openwrt.org/docs/guide-developer/helloworld/chapter5) I get the error in the attached file. How can I resolve this?

I am thinking something is not right with the Makefile or its missing something. It seems I can only attach 1 file per post, so I will try to attach the Makefile with a comment.

Any help would be appreciated. Thank you

1 Attachments

Discussion

  • Khurram

    Khurram - 2021-09-21

    Here is the gutenprint-5.3.3 Makefile that I am using. Stored in /home/ubuntu20/mypackages/printing/gutenprint-5.3.3

     
  • Robert Krawitz

    Robert Krawitz - 2021-09-21

    Do you have output from make within the Gutenprint source tree? I have no experience with OpenWRT.

     
  • Khurram

    Khurram - 2021-09-21

    I'm quite new to all of this, so I'm not exactly sure how to do that. But replacing $(eval $(call BuildPackage,...)) with $(error $(call BuildPackage,...)) seems to output a lot more details (attached file)

    This method is suggested by a commenter here https://forum.openwrt.org/t/debugging-package-makefile/13764/3.

    But when I replace "eval" with "error" in the Makefile, I get an error when trying to update and install the feed

    EDIT: if I update the package feeds twice, the error asking to fix the Makefile goes away

     

    Last edit: Khurram 2021-09-21
  • Robert Krawitz

    Robert Krawitz - 2021-09-21

    Can you cd into the root of the Gutenprint source tree and run make there directly (after running configure)?

     
    • Khurram

      Khurram - 2021-09-21

      Yes I can run "Make" after configure in the root of Gutenprint. Here is the result while configuring:

      ubuntu20@ubuntu20-VirtualBox:~/gutenprint-5.3.3$ ./configure --enable-cups-ppds
      checking for a BSD-compatible install... /usr/bin/install -c
      checking whether build environment is sane... yes
      checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
      checking for gawk... gawk
      checking whether make sets $(MAKE)... yes
      checking whether make supports nested variables... yes
      checking whether UID '1000' is supported by ustar format... yes
      checking whether GID '1000' is supported by ustar format... yes
      checking how to create a ustar tar archive... gnutar
      checking whether make supports nested variables... (cached) yes
      checking build system type... x86_64-pc-linux-gnu
      checking host system type... x86_64-pc-linux-gnu
      checking how to print strings... printf
      checking whether make supports the include directive... yes (GNU style)
      checking for gcc... gcc
      checking whether the C compiler works... yes
      checking for C compiler default output file name... a.out
      checking for suffix of executables... 
      checking whether we are cross compiling... no
      checking for suffix of object files... o
      checking whether we are using the GNU C compiler... yes
      checking whether gcc accepts -g... yes
      checking for gcc option to accept ISO C89... none needed
      checking whether gcc understands -c and -o together... yes
      checking dependency style of gcc... gcc3
      checking for a sed that does not truncate output... /usr/bin/sed
      checking for grep that handles long lines and -e... /usr/bin/grep
      checking for egrep... /usr/bin/grep -E
      checking for fgrep... /usr/bin/grep -F
      checking for ld used by gcc... /usr/bin/ld
      checking if the linker (/usr/bin/ld) is GNU ld... yes
      checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
      checking the name lister (/usr/bin/nm -B) interface... BSD nm
      checking whether ln -s works... yes
      checking the maximum length of command line arguments... 1572864
      checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
      checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
      checking for /usr/bin/ld option to reload object files... -r
      checking for objdump... objdump
      checking how to recognize dependent libraries... pass_all
      checking for dlltool... no
      checking how to associate runtime and link libraries... printf %s\n
      checking for ar... ar
      checking for archiver @FILE support... @
      checking for strip... strip
      checking for ranlib... ranlib
      checking command to parse /usr/bin/nm -B output from gcc object... ok
      checking for sysroot... no
      checking for a working dd... /usr/bin/dd
      checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
      checking for mt... mt
      checking if mt is a manifest tool... no
      checking how to run the C preprocessor... gcc -E
      checking for ANSI C header files... yes
      checking for sys/types.h... yes
      checking for sys/stat.h... yes
      checking for stdlib.h... yes
      checking for string.h... yes
      checking for memory.h... yes
      checking for strings.h... yes
      checking for inttypes.h... yes
      checking for stdint.h... yes
      checking for unistd.h... yes
      checking for dlfcn.h... yes
      checking for objdir... .libs
      checking if gcc supports -fno-rtti -fno-exceptions... no
      checking for gcc option to produce PIC... -fPIC -DPIC
      checking if gcc PIC flag -fPIC -DPIC works... yes
      checking if gcc static flag -static works... yes
      checking if gcc supports -c -o file.o... yes
      checking if gcc supports -c -o file.o... (cached) yes
      checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
      checking whether -lc should be explicitly linked in... no
      checking dynamic linker characteristics... GNU/Linux ld.so
      checking how to hardcode library paths into programs... immediate
      checking whether stripping libraries is possible... yes
      checking if libtool supports shared libraries... yes
      checking whether to build shared libraries... yes
      checking whether to build static libraries... yes
      ./configure: line 9255: dlopen: command not found
      checking whether to enable maintainer-specific portions of Makefiles... no
      checking for cups-config... /usr/bin/cups-config
      checking whether to whether to build CUPS driver... (automatic)
      checking whether NLS is requested... yes
      checking for msgfmt... /usr/bin/msgfmt
      checking for gmsgfmt... /usr/bin/msgfmt
      checking for xgettext... /usr/bin/xgettext
      checking for msgmerge... /usr/bin/msgmerge
      checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
      checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
      checking for shared library run path origin... done
      checking for CFPreferencesCopyAppValue... no
      checking for CFLocaleCopyCurrent... no
      checking for GNU gettext in libc... yes
      checking whether to use NLS... yes
      checking where the gettext function comes from... libc
      checking whether to build CUPS PPD files... (automatic)
      checking whether to build CUPS PPD files... yes
      checking whether to build CUPS 1.2 enhancements... yes
      checking whether to build translated CUPS PPD files... yes
      checking whether to build globalized CUPS PPD files... yes
      checking whether to build simplified CUPS PPD files... no
      checking whether to place CUPS PPD files at top level... no
      checking whether to generate PostScript level 3 PPD files... yes
      checking whether to build a statically-linked cups-genppd and rastertogutenprint.  WARNING: Please read the README and NEWS (release notes) CAREFULLY before using --disable-static-genppd!... yes
      checking whether to enable loadable modules... (automatic)
      checking whether to turn on debugging in build... no
      checking whether to turn on profiling in build... no
      checking whether to use readline... yes
      checking for pkg-config... /usr/bin/pkg-config
      checking pkg-config is at least version 0.9.0... yes
      checking for libusb-1.0... yes
      checking whether to install GIMP plugin in home directory... no
      checking for gimptool-2.0... no
      checking for gtk+-2.0... no
      checking whether to build GIMP 2.x Print plugin... no
      checking whether to name GIMP 2.x Print plugin gutenprint (requires GIMP 2.2; normally used with GIMP 2.4 or above)... (automatic)
      checking whether to build Gutenprint GTK+-2.0 user interface library... no
      checking whether to install sample images... yes
      checking whether to build escputil... yes
      checking whether to build test programs... yes
      checking whether to build Gutenprint documentation... yes
      checking whether to build testpattern generator... yes
      checking for iconv... yes
      checking for library containing strerror... none required
      checking for gawk... (cached) gawk
      checking for gcc... (cached) gcc
      checking whether we are using the GNU C compiler... (cached) yes
      checking whether gcc accepts -g... (cached) yes
      checking for gcc option to accept ISO C89... (cached) none needed
      checking whether gcc understands -c and -o together... (cached) yes
      checking dependency style of gcc... (cached) gcc3
      checking for gcc... (cached) gcc
      checking whether we are using the GNU C compiler... (cached) yes
      checking whether gcc accepts -g... (cached) yes
      checking for gcc option to accept ISO C89... (cached) none needed
      checking whether gcc understands -c and -o together... (cached) yes
      checking dependency style of gcc... (cached) gcc3
      checking whether ln -s works... yes
      checking for flex... no
      checking for lex... no
      checking for bison... no
      checking for byacc... no
      checking for test... /usr/bin/test
      checking for true... /usr/bin/true
      checking for find... /usr/bin/find
      checking for perl... /usr/bin/perl
      checking for glib-mkenums... no
      checking for convert... no
      checking for bash... /usr/bin/bash
      checking for texi2html... no
      checking for dvips... no
      checking for db2pdf... no
      checking for dvipdf... /usr/bin/dvipdf
      checking for db2ps... no
      checking for db2html... no
      checking for doxygen... no
      checking for xz... /usr/bin/xz
      checking for gzip... /usr/bin/gzip
      checking for bzip2... /usr/bin/bzip2
      checking for lrzip... no
      checking for rzip... no
      checking for zpaq... no
      checking for bash... /bin/bash
      checking if gcc supports -Wall... yes
      checking if gcc supports -Wcast-align... yes
      checking if gcc supports -Wstrict-prototypes... no
      checking if gcc supports -Wmissing-prototypes... yes
      checking if gcc supports -Wmissing-declarations... yes
      checking if gcc supports -Wnested-externs... yes
      checking if gcc supports -Wwrite-strings... yes
      checking if gcc supports -Werror-implicit-function-declaration... yes
      checking if gcc supports -Winline... yes
      checking if gcc supports -Wformat=2... yes
      checking if gcc supports -finline-limit=131072... yes
      checking if gcc supports -Wformat... yes
      checking if gcc supports -Werror=format-security... yes
      checking if gcc supports -Wmissing-prototypes... yes
      checking if gcc supports -O3... yes
      checking if gcc supports __attribute__ syntax... yes
      checking for readline in -lreadline... no
      checking for readline in -lreadline... no
      checking for readline in -lreadline... no
      checking for readline in -lreadline... no
      checking for lt_dlopen in -lltdl... yes
      checking for dlopen in -ldl... yes
      checking for pow in -lm... yes
      checking for pow in -lm... (cached) yes
      checking for gzgets in -lz... yes
      checking for cups-config... /usr/bin/cups-config
      checking for ANSI C header files... (cached) yes
      checking getopt.h usability... yes
      checking getopt.h presence... yes
      checking for getopt.h... yes
      checking readline/readline.h usability... no
      checking readline/readline.h presence... no
      checking for readline/readline.h... no
      checking for dlfcn.h... (cached) yes
      checking fcntl.h usability... yes
      checking fcntl.h presence... yes
      checking for fcntl.h... yes
      checking limits.h usability... yes
      checking limits.h presence... yes
      checking for limits.h... yes
      checking locale.h usability... yes
      checking locale.h presence... yes
      checking for locale.h... yes
      checking ltdl.h usability... yes
      checking ltdl.h presence... yes
      checking for ltdl.h... yes
      checking stdarg.h usability... yes
      checking stdarg.h presence... yes
      checking for stdarg.h... yes
      checking for stdlib.h... (cached) yes
      checking for string.h... (cached) yes
      checking sys/time.h usability... yes
      checking sys/time.h presence... yes
      checking for sys/time.h... yes
      checking for sys/types.h... (cached) yes
      checking time.h usability... yes
      checking time.h presence... yes
      checking for time.h... yes
      checking for unistd.h... (cached) yes
      checking for an ANSI C-conforming const... yes
      checking for inline... inline
      checking for off_t... yes
      checking for size_t... yes
      checking for nanosleep... yes
      checking for poll... yes
      checking for usleep... yes
      checking for getopt_long... yes
      checking for library containing finite... none required
      checking which module system will be used... dlopen
      checking that generated files are newer than configure... done
      configure: creating ./config.status
      config.status: creating Makefile
      config.status: creating doc/Makefile
      config.status: creating doc/gutenprint.dox
      config.status: creating doc/gutenprintui2.dox
      config.status: creating doc/developer/Makefile
      config.status: creating include/Makefile
      config.status: creating include/gutenprint/Makefile
      config.status: creating include/gutenprintui2/Makefile
      config.status: creating include/gutenprint/gutenprint-version.h
      config.status: creating man/Makefile
      config.status: creating man/cups-calibrate.8
      config.status: creating man/cups-genppd.8
      config.status: creating man/cups-genppdupdate.8
      config.status: creating man/escputil.1
      config.status: creating po/Makefile.in
      config.status: creating samples/Makefile
      config.status: creating src/Makefile
      config.status: creating src/cups/Makefile
      config.status: creating src/cups/Info.plist
      config.status: creating src/cups/cups-genppdupdate
      config.status: creating src/cups/test-ppds.test
      config.status: creating src/cups/min-pagesize
      config.status: creating src/escputil/Makefile
      config.status: creating src/testpattern/compare-image-files
      config.status: creating src/testpattern/run-testpattern
      config.status: creating src/testpattern/run-testpattern-1.test
      config.status: creating src/testpattern/run-testpattern-2
      config.status: creating src/testpattern/run-testpattern-2.test
      config.status: creating src/testpattern/compare-checksums
      config.status: creating src/testpattern/compress-checksums
      config.status: creating src/cups/test-rastertogutenprint
      config.status: creating src/cups/test-rastertogutenprint.test
      config.status: creating src/testpattern/Makefile
      config.status: creating src/gimp2/Makefile
      config.status: creating src/main/Makefile
      config.status: creating src/main/gutenprint.pc
      config.status: creating src/xml/Makefile
      config.status: creating src/xml/dither/Makefile
      config.status: creating src/xml/papers/Makefile
      config.status: creating src/xml/printers/Makefile
      config.status: creating src/xml/escp2/Makefile
      config.status: creating src/xml/escp2/media/Makefile
      config.status: creating src/xml/escp2/mediasizes/Makefile
      config.status: creating src/xml/escp2/model/Makefile
      config.status: creating src/xml/escp2/model/base/Makefile
      config.status: creating src/xml/escp2/inputslots/Makefile
      config.status: creating src/xml/escp2/inks/Makefile
      config.status: creating src/xml/escp2/weaves/Makefile
      config.status: creating src/xml/escp2/qualitypresets/Makefile
      config.status: creating src/xml/escp2/resolutions/Makefile
      config.status: creating src/gutenprintui2/Makefile
      config.status: creating src/gutenprintui2/gutenprintui2.pc
      config.status: creating test/Makefile
      config.status: creating test/compress-5level.sh
      config.status: creating test/compress-6level.sh
      config.status: creating test/uncompress-5level.sh
      config.status: creating test/uncompress-6level.sh
      config.status: creating test/parse-bjc
      config.status: creating test/parse-escp2
      config.status: creating test/run-testdither.test
      config.status: creating test/run-weavetest.test
      config.status: creating test/test-curve.test
      config.status: creating scripts/Makefile
      config.status: creating scripts/mkgitlog
      config.status: creating scripts/gversion
      config.status: creating scripts/test-gversion
      config.status: creating scripts/wzpaq
      config.status: creating config.h
      config.status: config.h is unchanged
      config.status: executing depfiles commands
      config.status: executing libtool commands
      rm: cannot remove 'libtoolT': No such file or directory
      config.status: executing po-directories commands
      config.status: creating po/POTFILES
      config.status: creating po/Makefile
      config.status: executing default commands
      
      
      Gutenprint Configuration Summary:
      ---------- ------------- --------
      
      If you have any problems, please report the information below to
      gimp-print-devel@lists.sourceforge.net
      
      ================================================================
        Release: gutenprint 5.3.3 generated on 25 Aug 2019
        Generated at Tue Sep 21 11:21:10 EDT 2021 by ubuntu20
      
        Features:
          Build CUPS:                                 yes, installing in /usr
              Build CUPS 1.2 enhancements:            yes
              Build CUPS PPD files:                   yes
                  Build translated CUPS PPD files:    yes
                      Build global CUPS PPD files:    yes
                  Build simplified CUPS PPD files:    no
                  Install CUPS PPDs at top level:     no
              Generate PS level 3 CUPS PPD files:     yes
              Build genppd statically:                yes
              Build CUPS dyesub USB backend:          yes
          Build EPSON inkjet utility:                 yes
          Build enhanced Print plugin for GIMP:       no
          Build test programs:                        yes
          Build testpattern generator:                yes
      
        Installation summary:
          Installation prefix:                        /usr/local
          Exec prefix:                                /usr/local (${prefix})
          Data directory:                             /usr/local/share/gutenprint
          Library directory:                          /usr/local/lib/gutenprint (/usr/local/lib/gutenprint)
          Executable directory:                       /usr/local/bin (/usr/local/bin)
          XML data directory:                         /usr/local/share/gutenprint/5.3/xml
          Module directory:                           /usr/local/lib/gutenprint/5.3/modules (/usr/local/lib/gutenprint/5.3/modules)
          Install sample images:                      yes
      
        General configuration:
          Configure arguments:                        --enable-cups-ppds
          Compiler:                                   gcc
          Compiler Version:                           gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 
          Compiler options:                           -Disfinite=finite  -O3  -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wwrite-strings -Werror-implicit-function-declaration -Winline -Wformat=2 -finline-limit=131072 -Wformat -Werror=format-security -Wmissing-prototypes
          Build static libraries:                     yes
          Build shared libraries:                     yes
          Maintainer mode:                            no
          Use i18n:                                   yes
          Generate profiling information:             no
          Generate debugging symbols:                 no
          Use modules:                                static
          Use readline libraries:                     yes
          uname -a output:                            Linux ubuntu20-VirtualBox 5.11.0-34-generic #36~20.04.1-Ubuntu SMP Fri Aug 27 08:06:32 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
      ================================================================
      
      VERY IMPORTANT:
      If you expect to build the CUPS driver or the enhanced Print plugin for
      GIMP, but the output above indicates that that component will not be built,
      it almost certainly indicates that development packages required to build
      that component are not installed on your system.  Please read the README
      file and install the necessary development packages before reporting any
      error to the development team.  Depending upon your operating system version,
      you may have to install packages from the installation medium or over
      the network.
      
      Finished configuring.  Please review CAREFULLY the configuration summary above.
      This summary is also stored in config.summary
      Type 'make clean' followed by 'make' to build the package
      then 'make install' to install it.
      

      "Make" is still running I will post the result once its done. (it always runs successfully and as well as "sudo make install" after that)

       

      Last edit: Khurram 2021-09-21
    • Khurram

      Khurram - 2021-09-21

      The text is quite long so I have attached the result from "make" from within the root Gutenprint source tree.

       
      • Khurram

        Khurram - 2021-09-21

        Something else that might be helpful is that when I run "make package/gutenprint-5.3.3/{clean,prepare, compile, install} V=s" in the OpenWRT build environment I get the following results saying "No rule to make target..." and stops at "prepare"

        ubuntu20@ubuntu20-VirtualBox:~/source$ make package/gutenprint-5.3.3/{clean,prepare, compile, install} V=s
        make[1]: Entering directory '/home/ubuntu20/source'
        make[1]: *** No rule to make target 'package/gutenprint-5.3.3/{clean,prepare,'.  Stop.
        make[1]: Leaving directory '/home/ubuntu20/source'
        make: *** [/home/ubuntu20/source/include/toplevel.mk:230: package/gutenprint-5.3.3/{clean,prepare,] Error 2
        
         
        • Robert Krawitz

          Robert Krawitz - 2021-09-21

          Again, I suggest you contact the OpenWRT people, since Gutenprint proper builds cleanly (albeit there are some warnings that we'll want to clean up). We aren't in a position to help with OpenWRT issues.

           
  • Robert Krawitz

    Robert Krawitz - 2021-09-21

    The Gutenprint portion did build correctly. You'd probably do best contacting the OpenWRT team for assistance.

     
    • Khurram

      Khurram - 2021-09-21

      Thank you will look into that.

      I was wondering if there is a package available for gutenprint which can be be installed using the package manager on Ubuntu. For example right now I need to install the compressed file > extract it, then "make" and "make install' to install the package.

      Is there a gutenprint package which can be installed with the default package manager on Ubuntu?

      Thanks

       
      • Robert Krawitz

        Robert Krawitz - 2021-09-21

        No, I'm sorry, we don't provide pre-built packages for any system other than Macintosh.

         
      • Solomon Peachy

        Solomon Peachy - 2021-09-21

        On Tue, Sep 21, 2021 at 08:42:16PM -0000, Khurram wrote:

        Is there a gutenprint package which can be installed with the default package manager on Ubuntu?

        Ubuntu already provides a prebuilt gutenprint package, but it tends to
        be a bit out of date.

         
  • Solomon Peachy

    Solomon Peachy - 2024-11-12
    • status: open --> closed-rejected
    • Group: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.