On 8/6/19 2:58 PM, Jean-Marc Pigeon via blfs-dev wrote:
Hello,


Seems we have another kernel-5.2, sockio problem...

Building cups-2.2.11  with glibc-2.30+sockio adjustment
(as described in  SVN-20190804) cause cups build to fail
at very very early stage...

;-------------------------------------------------------------------
In file included from /usr/include/bits/socket.h:355,
                 from /usr/include/sys/socket.h:33,
                 from ../cups/http.h:39,
                 from ../cups/ipp.h:23,
                 from ../cups/ipp-private.h:23,
                 from ../cups/cups-private.h:26,
                 from ipptool.c:20:
ipptool.c:5044:30: error: 'TIOCOUTQ' undeclared (first use in this function); did you mean 'SIOCOUTQ'?
 5044 |   if (ioctl(httpGetFd(http), SIOCOUTQ, &buffered))
      |                              ^~~~~~~~
ipptool.c:5044:30: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [../Makedefs:269: ipptool.o] Error 1
make[1]: *** Waiting for unfinished jobs...
;-------------------------------------------------------------------
a search within /usr/include file

#define SIOCOUTQ    TIOCOUTQ        /* output queue size (not sent + not acked) */
./linux/sockios.h

#define TIOCOUTQ    0x5411
./asm-generic/ioctls.h

My guess in some way asm-generic/ioctls.h  is not included (really?)

Previous (yesterday) "full recompilation" was working using
glibc-2.29 WITHOUT asm.socket.h patch
In today "full recompilation", qtwebsengine went fine
with glibc-2.30+patch.

My guess, we overlook something in this sockios story...

Could someone confirm  my finding?
(and propose Yet Another Adjustement ;) )


I just ran into this myself, so I can confirm it. It's also not part of the test suite, ipptool is used to query information from printers over the Internet Printing Protocol (but for some reason, it's still in the "test" folder, maybe because of it's usage in the test suite? ippfind is in there too, and that makes no sense to me)

Here's my output:

renodr [ /sources/cups-2.2.11-source/cups-2.2.11 ]$ make
Using ARCHFLAGS=
Using ALL_CFLAGS=-I.. -D_CUPS_SOURCE -I/usr/include/libusb-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -DDBUS_API_SUBJECT_TO_CHANGE -D_REENTRANT -I/usr/include/p11-kit-1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT Using ALL_CXXFLAGS=-I.. -D_CUPS_SOURCE  -I/usr/include/p11-kit-1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT
Using CC=gcc
Using CXX=gcc
Using DSOFLAGS=-L../cups  -Wl,-soname,all -shared -Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion -fPIC -Os -g -fstack-protector -D_GNU_SOURCE Using LDFLAGS=-L../cgi-bin -L../cups -L../filter -L../ppdc -L../scheduler -fPIE -pie -Wall -Wno-format-y2k -Wunused -Wno-unused-result -Wsign-conversion -fPIC -Os -g -fstack-protector -D_GNU_SOURCE Using LIBS=-lcups -Wl,--enable-new-dtags -Wl,-rpath -Wl,/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lavahi-common -lavahi-client -lgnutls -lz -lpthread -lm -lcrypt   -lz
Making all in cups...
Making all in test...
Compiling ipptool.c...
ipptool.c: In function ‘timeout_cb’:
ipptool.c:5044:7: warning: implicit declaration of function ‘ioctl’ [-Wimplicit-function-declaration]
 5044 |   if (ioctl(httpGetFd(http), SIOCOUTQ, &buffered))
      |       ^~~~~
In file included from /usr/include/sys/socket.h:34,
                 from ../cups/http.h:39,
                 from ../cups/ipp.h:23,
                 from ../cups/ipp-private.h:23,
                 from ../cups/cups-private.h:26,
                 from ipptool.c:20:
ipptool.c:5044:30: error: ‘TIOCOUTQ’ undeclared (first use in this function); did you mean ‘SIOCOUTQ’?
 5044 |   if (ioctl(httpGetFd(http), SIOCOUTQ, &buffered))
      |                              ^~~~~~~~
ipptool.c:5044:30: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [../Makedefs:269: ipptool.o] Error 1
make: *** [Makefile:38: all] Error 1

I think the best course of action here is to add <asm-generic/ioctls.h> below <sys/stat.h>, like so:

#include <cups/cups-private.h>
#include <cups/file-private.h>
#include <regex.h>
#include <sys/stat.h>
#include <asm-generic/ioctls.h>

It would then be present on line 24. Doing something like this does the trick (and I'll drop it into the book):

sed -i '/stat.h/a #include <asm-generic/ioctls.h>' test/ipptool.c

Tests still look good too (output below), so I'll drop it in.

renodr [ /sources ]$ grep FAIL cups-2.2.11-tests.log
httpAddrGetList(tigger.local.): FAIL
1 TESTS FAILED!


Thanks for the report, Jean!

--
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to