Bug 2507 - xprint package not building on GNU/Hurd
Summary: xprint package not building on GNU/Hurd
Status: RESOLVED FIXED
Alias: None
Product: xprint
Classification: Unclassified
Component: Build config (show other bugs)
Version: unspecified
Hardware: All other
: high blocker
Assignee: Roland Mainz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-08 19:46 UTC by Roland Mainz
Modified: 2005-02-08 10:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch for 2005-02-09-trunk (3.50 KB, patch)
2005-02-08 20:05 UTC, Roland Mainz
no flags Details | Splinter Review

Description Roland Mainz 2005-02-08 19:46:32 UTC
The Debian Xprint package does not build on GNU/Hurd.

Originally reported in linux.debian.ports.hurd:
-- snip --
From: Michael Banck <mba...@debian.org>
Newsgroups: linux.debian.ports.hurd
Subject: porters wanted: xprint-xprintorg
Date: Mon, 07 Feb 2005 20:30:17 +0100
Message-ID: <3vmKl-2Rl-17@gated-at.bofh.it>
X-Original-To: debian-h...@lists.debian.org
Old-Return-Path: <mba...@gmx.net>
X-Authenticated: #686195
Mail-Followup-To: debian-h...@lists.debian.org
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.6+20040523i
Sender: robo...@news.nic.it
X-Rc-Virus: 2005-01-21_01
X-Rc-Spam: 2005-02-02_01
X-Mailing-List: <debian-hurd@lists.debian.org> archive/latest/16800
List-ID: <debian-hurd.lists.debian.org>
List-Archive: <http://lists.debian.org/debian-hurd/>
Approved: robo...@news.nic.it
Lines: 69
Organization: linux.* mail to news gateway
X-Original-Date: Mon, 7 Feb 2005 18:31:41 +0100
X-Original-Message-ID: <20050207173141.GB4671@chemicalconnection.dyndns.org>
X-Original-Sender: Michael Banck <mba...@gmx.net>

Hi,

xprt-xprintorg seems to be the last package missing from the
x-window-system meta-package (at least, after taking a casual look, I
could be wrong), so it would be nice to have it ported.

I just tried to build it, and there are issues with the contained
config/cf/gnu.cf:

Automatic build of xprint-xprintorg_0.1.0.alpha1-8 on beethoven by
sbuild/hurd-i386 1.170.5
Build started at 20050207-1740
[...]
dpkg-source: extracting xprint-xprintorg in xprint-xprintorg-0.1.0.alpha1
dpkg-buildpackage: source package is xprint-xprintorg
dpkg-buildpackage: source version is 0.1.0.alpha1-8
dpkg-buildpackage: host architecture is hurd-i386
[...]
/usr/bin/make -C build-tree/xc World
make[1]: Entering directory
`/home/mbanck/tmp/tmp/xprint-xprintorg-0.1.0.alpha1/build-tree/xc'

Building Release 6.8.

I hope you checked the configuration parameters in ./config/cf
to see if you need to pass BOOTSTRAPCFLAGS.
[...]
./config/imake/imake -I./config/cf  -s
./config/makedepend/Makefile.proto -f ./config/makedepend/Imakefile
         -DTOPDIR=../.. -DCURDIR=./config/makedepend
In file included from config/cf/Imake.tmpl:109,
                 from Imakefile.c:14:
config/cf/gnu.cf:55: warning: "HasShm" redefined
In file included from config/cf/host.def:3,
                 from config/cf/site.def:44,
                 from config/cf/Imake.tmpl:46,
                 from Imakefile.c:14:
config/cf/xprint_host.def:119: warning: this is the location of the previous
definition
In file included from config/cf/Imake.tmpl:109,
                 from Imakefile.c:14:
config/cf/gnu.cf:108: no macro name given in #ifndef directive
./config/imake/imake: Exit code 1.
  Stop.
make[2]: *** [config/makedepend/Makefile.proto] Error 1
make[2]: Leaving directory
        `/home/mbanck/tmp/tmp/xprint-xprintorg-0.1.0.alpha1/build-tree/xc'
make[1]: *** [World] Error 2

The full log is at
http://people.debian.org/~mbanck/xprint-xprintorg_0.1.0.alpha1-8_20050207-1740

It might be that the provided gnu.cf is out of sync with the one in the
xfree86 source package. So the first thing should be to check both and
change this one apropriately.


happy hacking,
-- snip --
Comment 1 Roland Mainz 2005-02-08 20:05:24 UTC
Created attachment 1871 [details] [review]
Patch for 2005-02-09-trunk
Comment 2 Roland Mainz 2005-02-08 20:11:12 UTC
Patch checked-in...

/cvs/xorg/xc/ChangeLog,v  <--  xc/ChangeLog
new revision: 1.761; previous revision: 1.760
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
/cvs/xorg/xc/config/cf/gnu.cf,v  <--  xc/config/cf/gnu.cf
new revision: 1.3; previous revision: 1.2
cvs commit: Using deprecated info format strings.  Convert your scripts to use
the new argument format and remove '1's from your info file format strings.
Mailing the commit message to xorg-commit@lists.freedesktop.org...

... marking bug as FIXED.
Comment 3 Michael Banck 2005-02-09 05:31:30 UTC
(In reply to comment #2)
> ... marking bug as FIXED.

There are other issues when building xprint-xprintorg with that patch:

a)

gcc -c -O2 -fno-strength-reduce -fno-strict-aliasing  -ansi -pedantic -Wall
-Wpointer-arith -Wstrict-prot
otypes                    -Wmissing-prototypes -Wmissing-declarations          
          -Wredundant-dec
ls -Wnested-externs -Wundef    -I../.. -I../../exports/include   -D__i386__
-D_POSIX_C_SOURCE=199309L    
                           -D_POSIX_SOURCE -D_XOPEN_SOURCE                     
         -D_BSD_SOURCE -D
_SVID_SOURCE  -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS  -D_REENTRANT
-DXUSE_MTSAFE_API       AuGetBest.c
In file included from /usr/include/pthread/pthread.h:33,
                 from /usr/include/pthread.h:2,
                 from ../../exports/include/X11/Xthreads.h:232,
                 from AuGetBest.c:33:
/usr/include/bits/pthread.h:27: error: syntax error before "int"

This one is due to the Hurd libphread headers using a code construct which is 
not valid when compiling using -ansi, as is the case here.

This bug has been fixed upstream and the patch will be in the next version of
the Debian hurd package, so no worry.

b)

gcc -c -O2 -fno-strength-reduce -fno-strict-aliasing  -ansi -pedantic -Wall
-Wpointer-arith -Wstrict-prot
otypes                    -Wmissing-prototypes -Wmissing-declarations          
          -Wredundant-dec
ls -Wnested-externs -Wundef    -I../.. -I../../exports/include   -D__i386__
-D_POSIX_C_SOURCE=199309L    
                           -D_POSIX_SOURCE -D_XOPEN_SOURCE                     
         -D_BSD_SOURCE -D
_SVID_SOURCE  -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS  -D_REENTRANT
-DXUSE_MTSAFE_API    -DMALLOC_0_RETUR
NS_NULL     -fPIC XpJob.c
XpJob.c: In function `XpStartJob':
XpJob.c:108: error: too few arguments to function `getpwuid_r'
make[5]: *** [XpJob.o] Error 1

Not sure about that one, I need to investigate further.


c)

gcc -c -O2 -fno-strength-reduce -fno-strict-aliasing  -ansi -pedantic -Wall
-Wpointer-arith -Wstrict-prot
otypes                    -Wmissing-prototypes -Wmissing-declarations          
          -Wredundant-dec
ls -Wnested-externs -Wundef  -I../../../include/fonts -I../include
-I../../../lib/xtrans  -I../../.. -I..
/../../exports/include   -D__i386__ -D_POSIX_C_SOURCE=199309L                  
            -D_POSIX_SOUR
CE -D_XOPEN_SOURCE                               -D_BSD_SOURCE -D_SVID_SOURCE 
-DFUNCPROTO=15 -DNARROWPRO
TO    -DUNIXCONN -DTCPCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN -DIPv6 -DFONT_t
-DTRANS_CLIENT -DTRANS_SERVE
R -DTRANS_REOPEN -DBSD44SOCKETS   transport.c
In file included from transport.c:80:
../../../lib/xtrans/Xtranssock.c:1392: error: `MAXHOSTNAMELEN' undeclared here
(not in a function)
make[6]: *** [transport.o] Error 1


This is due to struct addrlist in Xtranssock.c declaring MAXHOSTNAMELEN without
checking whether this is actually defined. POSIX only mandates that
MAXHOSTNAMELEN be defined to the  maximum hostname length if a limitation
exists, which is not the case for GNU and thus this is undefined on GNU. We will
try to come up with a patch for this, if you do not have a clear view on how to
fix this yourself.


Thanks,

Michael Banck


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.