You are not logged in.

#1 2021-05-09 14:12:03

portaro
Member
Registered: 2020-01-03
Posts: 41

Zint Barcode Generator how to install it ?

I try to install Zint Barcode Generator but follow the instructions on the readme file I have problems on make and in make install.

joao@debian-asus:~/programas-varios/zint-barcode/zint-2.4.2/build$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/joao/programas-varios/zint-barcode/zint-2.4.2/build
joao@debian-asus:~/programas-varios/zint-barcode/zint-2.4.2/build$ make
[  1%] Building C object backend/CMakeFiles/zint.dir/png.c.o
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c: In function ‘png_pixel_plot’:
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:174:37: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function); did you mean ‘PNG_Z_DEFAULT_COMPRESSION’?
  png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
                                     ^~~~~~~~~~~~~~~~~~
                                     PNG_Z_DEFAULT_COMPRESSION
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:174:37: note: each undeclared identifier is reported only once for each function it appears in
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:85:16: warning: variable ‘rowbytes’ set but not used [-Wunused-but-set-variable]
  unsigned long rowbytes;
                ^~~~~~~~
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c: In function ‘bmp_pixel_plot’:
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:307:16: warning: variable ‘rowbytes’ set but not used [-Wunused-but-set-variable]
  unsigned long rowbytes;
                ^~~~~~~~
make[2]: *** [backend/CMakeFiles/zint.dir/build.make:167: backend/CMakeFiles/zint.dir/png.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:123: backend/CMakeFiles/zint.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
joao@debian-asus:~/programas-varios/zint-barcode/zint-2.4.2/build$ 

Then in make install

joao@debian-asus:~/programas-varios/zint-barcode/zint-2.4.2/build$ make install
[  1%] Building C object backend/CMakeFiles/zint.dir/png.c.o
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c: In function ‘png_pixel_plot’:
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:174:37: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function); did you mean ‘PNG_Z_DEFAULT_COMPRESSION’?
  png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
                                     ^~~~~~~~~~~~~~~~~~
                                     PNG_Z_DEFAULT_COMPRESSION
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:174:37: note: each undeclared identifier is reported only once for each function it appears in
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:85:16: warning: variable ‘rowbytes’ set but not used [-Wunused-but-set-variable]
  unsigned long rowbytes;
                ^~~~~~~~
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c: In function ‘bmp_pixel_plot’:
/home/joao/programas-varios/zint-barcode/zint-2.4.2/backend/png.c:307:16: warning: variable ‘rowbytes’ set but not used [-Wunused-but-set-variable]
  unsigned long rowbytes;
                ^~~~~~~~
make[2]: *** [backend/CMakeFiles/zint.dir/build.make:167: backend/CMakeFiles/zint.dir/png.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:123: backend/CMakeFiles/zint.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
joao@debian-asus:~/programas-varios/zint-barcode/zint-2.4.2/build$ 

Anyone have a Deb package compatible to install here.

Thanks.

Offline

#2 2021-05-09 14:54:07

twoion
ほやほや
Registered: 2015-08-10
Posts: 3,209

Re: Zint Barcode Generator how to install it ?

The version you're working with seems out of date by 8 years and doesn't compile against recent libpng (tried it). Check out the ArchLinux package zint; it references sourcecode here: https://sourceforge.net/projects/zint/files/zint/2.9.1/. Just download this tarball and install the dependencies as suggest by the Arch Linux PKGBUILD file on Debian: https://github.com/archlinux/svntogit-c … GBUILD#L11 ; seems like qt5 dev libraries, cmake and libpng (you should be able to find the package names on Debian using the package search). Then just mimic the build commands in the PKGBUILD, but install into /usr/local or similar.

This should get you started.

With a little luck you could also download the Arch binary package https://archlinux.org/packages/communit … /download/, unpack the tarball, and see if you can just execute the binary in there. Just move the lib folder from in there into /usr/local/lib, the bin folder contents into /usr/local/bin and so on. (This is unclean!) Of course you still need to have libpng and the entire qt5 graphics libraries installed.


Nassdachs

Online

#3 2021-05-09 16:03:12

portaro
Member
Registered: 2020-01-03
Posts: 41

Re: Zint Barcode Generator how to install it ?

twoion wrote:

The version you're working with seems out of date by 8 years and doesn't compile against recent libpng (tried it). Check out the ArchLinux package zint; it references sourcecode here: https://sourceforge.net/projects/zint/files/zint/2.9.1/. Just download this tarball and install the dependencies as suggest by the Arch Linux PKGBUILD file on Debian: https://github.com/archlinux/svntogit-c … GBUILD#L11 ; seems like qt5 dev libraries, cmake and libpng (you should be able to find the package names on Debian using the package search). Then just mimic the build commands in the PKGBUILD, but install into /usr/local or similar.

This should get you started.

With a little luck you could also download the Arch binary package https://archlinux.org/packages/communit … /download/, unpack the tarball, and see if you can just execute the binary in there. Just move the lib folder from in there into /usr/local/lib, the bin folder contents into /usr/local/bin and so on. (This is unclean!) Of course you still need to have libpng and the entire qt5 graphics libraries installed.

Thanks for the info I didn't see that the source is than oldest.
The 2.9.1 installs but zint-qt command dont works only have text command available to use, I prefer the Gui version if possible, but works.

joao@debian-asus:~$ zint 
Zint version 2.9.0
Encode input data in a barcode and save as BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT

  -b, --barcode=NUMBER  Number of barcode type. Default is 20 (Code 128)
  --addongap=NUMBER     Set add-on gap in multiples of X-dimension for UPC/EAN
  --batch               Treat each line of input file as a separate data set
  --bg=COLOUR           Specify a background colour (in hex)
  --binary              Treat input as raw binary data
  --bind                Add boundary bars
  --bold                Use bold text
  --border=NUMBER       Set width of border in multiples of X-dimension
  --box                 Add a box around the symbol
  --cmyk                Use CMYK colour space in EPS symbols
  --cols=NUMBER         Set the number of data columns in symbol
  -d, --data=DATA       Set the symbol content
  --direct              Send output to stdout
  --dmre                Allow Data Matrix Rectangular Extended
  --dotsize=NUMBER      Set radius of dots in dotty mode
  --dotty               Use dots instead of squares for matrix symbols
  --dump                Dump hexadecimal representation to stdout
  -e, --ecinos          Display table of ECI character encodings
  --eci=NUMBER          Set the ECI (Extended Channel Interpretation) code
  --esc                 Process escape characters in input data
  --fg=COLOUR           Specify a foreground colour (in hex)
  --filetype=TYPE       Set output file type BMP/EMF/EPS/GIF/PCX/PNG/SVG/TIF/TXT
  --fullmultibyte       Use multibyte for binary/Latin (QR/Han Xin/Grid Matrix)
  --gs1                 Treat input as GS1 compatible data
  --gssep               Use separator GS for GS1 (Data Matrix)
  -h, --help            Display help message
  --height=NUMBER       Set height of symbol in multiples of X-dimension
  -i, --input=FILE      Read input data from FILE
  --init                Create reader initialisation/programming symbol
  --mirror              Use batch data to determine filename
  --mode=NUMBER         Set encoding mode (Maxicode/Composite)
  --nobackground        Remove background (PNG/SVG/EPS only)
  --notext              Remove human readable text
  -o, --output=FILE     Send output to FILE. Default is out.png
  --primary=STRING      Set structured primary message (Maxicode/Composite)
  --scale=NUMBER        Adjust size of X-dimension
  --secure=NUMBER       Set error correction level (ECC)
  --separator=NUMBER    Set height of row separator bars (stacked symbologies)
  --small               Use small text
  --square              Force Data Matrix symbols to be square
  -r, --reverse         Reverse colours (white on black)
  --rotate=NUMBER       Rotate symbol by NUMBER degrees (BMP/GIF/PCX/PNG/TIF)
  --rows=NUMBER         Set number of rows (Codablock-F)
  -t, --types           Display table of barcode types
  --vers=NUMBER         Set symbol version (size, check digits, other options)
  -w, --whitesp=NUMBER  Set width of whitespace in multiples of X-dimension
joao@debian-asus:~$ zint-qt
bash: zint-qt: comando não encontrado
joao@debian-asus:~$ 

Thanks.

Offline

Board footer

Powered by FluxBB