You are not logged in.

#1 2019-07-15 08:07:59

ThoSte
Member
Registered: 2019-07-15
Posts: 3

[Solved] cups-bjnp Installation error

Hi,
I own a Canon PIXMA MX725, that's available to all useres at home via network.
To print I need to install the cups-bjnp package, but when I try to install it via yay -S cups-bjnp it get errors like the following

In Funktion »strncpy«,
    eingefügt von »bjnp_set_command_header« beibjnp-commands.c:40:5,
    eingefügt von »get_printer_id« beibjnp-commands.c:52:5:
/usr/include/bits/string_fortified.h:106:10: Fehler: »__builtin_strncpy« Ausgabe abgeschnitten vor dem abschließenden NUL, beim Kopieren von 4 Bytes aus einem String derselben Länge [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Does anybody know how I could fix this?

Tanks for your help,
Thomas

Last edited by ThoSte (2019-07-16 09:06:56)

Offline

#2 2019-07-15 08:59:56

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 8,913
Website

Re: [Solved] cups-bjnp Installation error

Try building it without the AUR helper. Also please post the full output, in English: https://wiki.archlinux.org/index.php/Co … s_and_code

Mod note: moving to AUR Issues.


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-07-15 17:00:59

ThoSte
Member
Registered: 2019-07-15
Posts: 3

Re: [Solved] cups-bjnp Installation error

Hi,

when I try to install it manually I get the same error message:

$ LC_ALL=C makepkg -si
==> Making package: cups-bjnp 2.0.1-1 (Mon Jul 15 18:54:50 2019)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found cups-bjnp-2.0.1.tar.gz
==> Validating source files with sha256sums...
    cups-bjnp-2.0.1.tar.gz ... Passed
==> Extracting sources...
  -> Extracting cups-bjnp-2.0.1.tar.gz with bsdtar
==> Removing existing $pkgdir/ directory...
==> Starting build()...
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 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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ftime... yes
checking for getaddrinfo... yes
checking for getnameinfo... yes
checking for gethostname... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for ntohl... yes
checking for ntohs... yes
checking for memset... yes
checking for select... yes
checking for socket... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strerror... yes
checking for strncasecmp... yes
checking for strstr... yes
checking for strtol... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for getifaddrs... yes
checking whether to enable IPv6... yes
checking whether struct sockaddr_storage has an ss_family member... yes
checking cups development support... yes
checking cups backend directory... /usr/lib/cups/backend
checking for library containing strerror... none required
checking for library containing socket... none required
checking for ANSI C header files... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for string.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for sys/socket.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking cups/cups.h usability... yes
checking cups/cups.h presence... yes
checking for cups/cups.h... yes
checking cups/backend.h usability... yes
checking cups/backend.h presence... yes
checking for cups/backend.h... yes
checking cups/http.h usability... yes
checking cups/http.h presence... yes
checking for cups/http.h... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... (cached) yes
checking for arpa/nameser.h... yes
checking for netdb.h... (cached) yes
checking for resolv.h... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
make  all-am
make[1]: Entering directory '/home/thomas/aur/cups-bjnp/src/cups-bjnp-2.0.1'
gcc -DHAVE_CONFIG_H -I.   -D_FORTIFY_SOURCE=2 -Wall  -Werror  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -MT bjnp-bjnp-commands.o -MD -MP -MF .deps/bjnp-bjnp-commands.Tpo -c -o bjnp-bjnp-commands.o `test -f 'bjnp-commands.c' || echo './'`bjnp-commands.c
In file included from /usr/include/string.h:494,
                 from /usr/include/cups/http.h:25,
                 from /usr/include/cups/ipp.h:23,
                 from /usr/include/cups/cups.h:32,
                 from bjnp.h:22,
                 from bjnp-commands.c:21:
In function 'strncpy',
    inlined from 'bjnp_set_command_header' at bjnp-commands.c:40:5,
    inlined from 'get_printer_id' at bjnp-commands.c:52:5:
/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'bjnp_set_command_header' at bjnp-commands.c:40:5,
    inlined from 'bjnp_send_job_details' at bjnp-commands.c:52:5:
/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'bjnp_set_command_header' at bjnp-commands.c:40:5,
    inlined from 'bjnp_defaults_set_command_header' at bjnp-commands.c:52:5:
/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'bjnp_set_command_header' at bjnp-commands.c:40:5,
    inlined from 'bjnp_printer_set_command_header' at bjnp-commands.c:60:5:
/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:528: bjnp-bjnp-commands.o] Error 1
make[1]: Leaving directory '/home/thomas/aur/cups-bjnp/src/cups-bjnp-2.0.1'
make: *** [Makefile:315: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Any ideas?

Thank you,
Thomas

Offline

#4 2019-07-15 19:15:51

loqs
Member
Registered: 2014-03-06
Posts: 8,155

Re: [Solved] cups-bjnp Installation error

As a workaround pass disable-Werror to configure e.g.

  ./configure --prefix='/usr' --disable-Werror

Please report the issue to the package maintainer and upstream.

Offline

#5 2019-07-16 06:18:00

ThoSte
Member
Registered: 2019-07-15
Posts: 3

Re: [Solved] cups-bjnp Installation error

Thanks a lot, that did the trick.

The clean solution would be to replace the strncpy() call with memcpy(). I'll try to file this patch at sourceforge for cups-bjnp.

Regards, Thomas

Offline

Board footer

Powered by FluxBB